python-demo-mcp-server

MCP.Pizza Chef: sevalla-templates

The python-demo-mcp-server is a demonstration implementation of the Model Context Protocol (MCP) using Python. It features Server-Sent Events (SSE) to handle streaming content production and management, providing a practical example for developers to build MCP servers that support real-time data streaming. It is designed for easy setup and deployment, including development and production environments, and integrates smoothly with MCP clients like Cursor.

Use This MCP server To

Stream real-time data to MCP clients using Server-Sent Events Demonstrate MCP server implementation in Python for learning Test and prototype MCP streaming server features locally Integrate with MCP clients for live content updates Deploy MCP server in production with Docker support

README

Python Demo MCP Server

Introduction

This is a demonstration server implementing the Model Context Protocol (MCP) with Server-Sent Events (SSE). It provides a practical example of how to build a server that can handle streaming content production and management.

Getting Started

  1. Set up your Python environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install the required packages
uv pip install -r requirements.txt

Run the server

Development Environment

python server.py

The server will start on http://localhost:8080 by default.

Production Environment

For deployment on Sevalla, make sure to select Dockerfile based build environment!

Usage in Cursor

To use this server in Cursor, paste the following in your mcp.json file:

"demo-mcp": {
  "url": "https://<your-mcp-server-domain>/sse"
}

Make sure to replace <your-mcp-server-domain> with the actual domain of your server.

python-demo-mcp-server FAQ

How do I set up the python-demo-mcp-server?
Create a Python virtual environment, activate it, and install dependencies using 'pip install -r requirements.txt'.
How do I run the server in development mode?
Run 'python server.py' to start the server locally on http://localhost:8080.
Can this server handle streaming data?
Yes, it uses Server-Sent Events (SSE) to stream real-time content to clients.
How do I deploy the server in production?
Use the provided Dockerfile for containerized deployment, suitable for platforms like Sevalla.
How do I connect this server to an MCP client like Cursor?
Add the server URL with the '/sse' endpoint in the client's mcp.json configuration file.
Is this server suitable for production use?
It is a demo server but includes production deployment instructions; further customization may be needed for production readiness.
What Python version is required?
The server requires a Python environment; specific version details should be checked in requirements.txt or documentation.