mcp-fastapi-proxy

wdhorton/mcp-fastapi-proxy

3.3

If you are the rightful owner of mcp-fastapi-proxy and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

This document provides a structured summary of a Model Context Protocol (MCP) server created from an existing FastAPI server.

Tools
  1. get_weather

    A tool to retrieve weather information.

MCP FastAPI Proxy

Hacking on a way to automatically create an Anthropic MCP server from an existing FastAPI server. NOT FOR PRODUCTION USE, this uses exec() which could be very bad if you pointed it at untrusted servers.

How to run

Start FastAPI server

uv run fastapi dev fastapi_server.py

Run the MCP server

uv run fastmcp dev mcp_server.py

Now you can go to http://localhost:5173/#tools, hit "List Tools", and you should be able to see the get_weather tool and run it with "Run Tool".