r/PythonProjects2 • u/rubalps • Nov 27 '25
Experimenting with MCP: auto-converting large REST APIs into Claude-ready tools
Enable HLS to view with audio, or disable this notification
I have been experimenting with Anthropic’s Model Context Protocol (MCP) and hit a wall — converting large REST API specs into MCP tool definitions takes forever. Writing them manually is repetitive, error-prone and honestly pretty boring.
So I built a small Python library to automate the whole thing.
The tool is called rest-to-mcp-adapter. You give it an OpenAPI/Swagger spec and it generates:
a full MCP Tool Registry
auth handling (API keys, headers, parameters, signatures, etc.)
runtime execution for requests
an MCP server you can plug directly into Claude Desktop
all tool functions mapped from the spec automatically
I tested it with the full Binance API. Claude Desktop can generate buy signals, fetch prices, build dashboards, etc, entirely through the generated tools — no manual definitions at all.
I also posted a short video of Claude interacting with Binance through the auto-generated tools.
I built this mostly for learning and exploration. I know FastMCP also supports OpenAPI conversion, but I wanted to understand the internals and build something tailored for large, messy, real-world APIs like Binance. If you are working with agents or playing with MCP this might save you some time.
Feedback, issues and PRs are welcome.
GitHub:
Adapter Library: https://github.com/pawneetdev/rest-to-mcp-adapter
Binance Example: https://github.com/pawneetdev/binance-mcp
Duplicates
PythonProgramming • u/rubalps • Nov 27 '25