haive.mcp.servers.simple_http_server

Simple HTTP MCP server example.

Functions

add(x, y)

Add two numbers.

create_app()

Create the web application.

execute_tool(request)

Execute a tool.

get_time()

Get current time.

hello(name)

Say hello to someone.

index(request)

Root endpoint with server info.

list_tools(request)

List available tools.

Module Contents

async haive.mcp.servers.simple_http_server.add(x, y)

Add two numbers.

Parameters:
Return type:

int

haive.mcp.servers.simple_http_server.create_app()

Create the web application.

Return type:

aiohttp.web.Application

async haive.mcp.servers.simple_http_server.execute_tool(request)

Execute a tool.

Parameters:

request (aiohttp.web.Request)

Return type:

aiohttp.web.Response

async haive.mcp.servers.simple_http_server.get_time()

Get current time.

Return type:

str

async haive.mcp.servers.simple_http_server.hello(name)

Say hello to someone.

Parameters:

name (str)

Return type:

str

async haive.mcp.servers.simple_http_server.index(request)

Root endpoint with server info.

Parameters:

request (aiohttp.web.Request)

Return type:

aiohttp.web.Response

async haive.mcp.servers.simple_http_server.list_tools(request)

List available tools.

Parameters:

request (aiohttp.web.Request)

Return type:

aiohttp.web.Response