Skip to main content
Glama
minimal-mcp-http

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: 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.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    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
      B
      maintenance
      Enables serving a remote Model Context Protocol endpoint by exposing tools, prompts, and resources with customizable authorization and hooks, allowing AI models to interact with your application through a standardized JSON-RPC interface.
      772 npm
      Business Source 1.1
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables developers to build and deploy secure, typed Model Context Protocol servers with tools, resources, prompts, bearer-token authentication, per-tool scopes, rate limiting, and health probes over Streamable HTTP.
      MIT