Python

API Gateway

Wrap any REST or GraphQL API as an MCP server. Transform external APIs into AI-consumable tools.

main.py
from mcp_server import MCPServer
from aiohttp import ClientSession

server = MCPServer("api-gateway")

# Configure API endpoint
api_config = {
    "base_url": "https://api.example.com",
    "auth": {"type": "bearer"},
    "rate_limit": {"requests": 100, "window": 60}
}

@server.tool()
async call_api(endpoint: str, method: str = "GET"):
    """Call external API endpoint."""
    async with ClientSession() as session:
        result = await session.request(method, api_config"base_url" + endpoint)
        return await result.json()

server.run()

REST & GraphQL

Support for any HTTP API with automatic JSON parsing.

Auth Handling

Bearer, API key, OAuth2 supported out of the box.

Rate Limiting

Protect downstream APIs with configurable limits.

Built With

Python 3.10+aiohttpFastMCP
Get Template Browse All Templates