Skip to main content
Glama
brainupgrade-in

minimal-mcp-http

minimal-mcp-http

A minimal Model Context Protocol server over Streamable HTTP (spec 2025-11-25) in one stdlib-only Python file — no pip install, no framework. Built as a starter for the Amazon AppDev 2026 Alexa+ track, useful anywhere you need a spec-shaped MCP endpoint for demos and judging.

Run

python3 minimal_mcp_server.py --port 8000
python3 -m unittest discover -s . -p "test_*.py"

Related MCP server: Streamable HTTP MCP Server

Protocol subset

Single POST /mcp endpoint: initialize → MCP-Session-Id → tools/list → tools/call (+ ping). GET returns 405 (spec-allowed when no SSE stream is offered). Origin validation (403 on mismatch) and MCP-Protocol-Version enforcement (400 on mismatch) included.

Add your own tool

def _hello(name="world"):
    return {"greeting": f"hello {name}"}

TOOLS["hello"] = (
    {"name": "hello", "description": "...",
     "inputSchema": {"type": "object", "properties": {"name": {"type": "string"}}}},
    _hello,
)

License

MIT — see LICENSE.

Related MCP Connectors

Related MCP Servers

  • -
    license
    Not graded
    quality
    Not graded
    maintenance
    Implements a Model Context Protocol server that enables streaming communication between Azure OpenAI GPT-4o and tool services, allowing for real-time intelligent tool usage via Server-Sent Events.
    -
  • A
    license
    Not graded
    quality
    D
    maintenance
    A minimal Model Context Protocol server that facilitates network-based client connections using Streamable HTTP transport. It provides a greeting tool and is optimized for consistent deployment across local environments, Docker, and Kubernetes.
    MIT