mcp.servers.simple_http_server

Simple HTTP MCP server example.

Attributes

Functions

add(→ int)

Add two numbers.

create_app(→ aiohttp.web.Application)

Create the web application.

execute_tool(→ aiohttp.web.Response)

Execute a tool.

get_time(→ str)

Get current time.

hello(→ str)

Say hello to someone.

index(→ aiohttp.web.Response)

Root endpoint with server info.

list_tools(→ aiohttp.web.Response)

List available tools.

Module Contents

async mcp.servers.simple_http_server.add(x: int, y: int) int

Add two numbers.

mcp.servers.simple_http_server.create_app() aiohttp.web.Application

Create the web application.

async mcp.servers.simple_http_server.execute_tool(request: aiohttp.web.Request) aiohttp.web.Response

Execute a tool.

async mcp.servers.simple_http_server.get_time() str

Get current time.

async mcp.servers.simple_http_server.hello(name: str) str

Say hello to someone.

async mcp.servers.simple_http_server.index(request: aiohttp.web.Request) aiohttp.web.Response

Root endpoint with server info.

async mcp.servers.simple_http_server.list_tools(request: aiohttp.web.Request) aiohttp.web.Response

List available tools.

mcp.servers.simple_http_server.app
mcp.servers.simple_http_server.mcp
mcp.servers.simple_http_server.routes