Skip to main content
Glama
MLValidationDebug

MCP HTTP Server Demo

MCP HTTP Server (Standalone)

Minimal MCP server using Streamable HTTP transport and a few demo tools.

Structure

  • mcp_server_http/server.py — HTTP MCP server

  • mcp_server/tools — demo tools (calculator, notes, time)

Related MCP server: MCP Boilerplate

Install

  1. Create and activate a virtual environment (optional).

  2. Install dependencies:

    pip install -r requirements.txt

Run

From this folder:

  • PowerShell:

    $env:MCP_HTTP_HOST = "0.0.0.0" $env:MCP_HTTP_PORT = "8001" python .\mcp_server_http\server.py

The server listens on http://0.0.0.0:8001

Quick connectivity test

PowerShell:

Invoke-RestMethod -Method Post -Uri http://127.0.0.1:8001/ -ContentType "application/json" -Headers @{Accept="application/json, text/event-stream"} -Body '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","clientInfo":{"name":"ps","version":"0.1"}}}'

Gateway registration

Register this server with your gateway using the gateway’s registration endpoint, using transport type "streamable-http" and the server URL.

Example payload:

{ "name": "mcp-http-server", "url": "http://:8001/", "transport": "streamable-http" }

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    A minimal, production-ready MCP server with a simple addition calculator tool that demonstrates integration with the Model Context Protocol.
    4 npm
    1
    MIT
  • F
    license
    C
    quality
    D
    maintenance
    A reference implementation of a Model Context Protocol server that demonstrates core primitives including tools, resources, and prompts. It enables users to perform basic arithmetic operations and manage notes through a simple storage system.
    4
    -
  • A
    license
    Not graded
    quality
    D
    maintenance
    Mock HTTP server implementing MCP (Model Context Protocol) with streamable HTTP transport, health endpoint, and example tools like echo and time.
    280 npm
    MIT