GitHunt
JR

JRWu/mcp-sse

FastMCP 2.0 implementation for a MCP SSE server

mcp-sse

Based on FastMCP
Provides a sample tool call and a sample resource for MCP servers.
Follow the guide on # Quickstart and the server should be running on http://localhost:8000/sse
Add the configuration in Windsurf and you should be able to call the tool and resource.

Dependencies

Tested with Python 3.13.2

brew install python3
npm install npx

Quickstart

cd mcp-sse/

source .venv/bin/activate
pip3 install -r requirements.txt

# For HTTP-streamable Servers
python3 server-http-streamable.py

# For SSE Servers (deprecated in support of http-streamable)
python3 server-sse.py

Configuration in Windsurf

This configuration is for SSE

{
    "mcpServers": {
        "mcp_example_sse": {
            "serverUrl": "http://localhost:8000/sse"
        }
    }
}

This configuration is for HTTP Streamable. The env configuration for AUTH_TEST is optional.

{
    "mcpServers": {
        "custom-mcp-server-sse-at": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "http://localhost:8000/mcp",
                "--header",
                "Authorization: Bearer ${AUTH_TEST}"
            ],
            "env":{
                "AUTH_TEST": "ABCXYZ"
            }
        }
    }
}

Languages

Python100.0%

Contributors

MIT License
Created May 29, 2025
Updated July 22, 2025