Built a tool that converts any REST API spec into an MCP server

Posted by rubalps@reddit | Python | View on Reddit | 19 comments

I have been experimenting with Anthropic’s Model Context Protocol (MCP) and hit a wall — converting large REST API specs into tool definitions takes forever. Writing them manually is repetitive, error-prone and honestly pretty boring.

So I wrote a Python library that automates the whole thing.

The tool is called rest-to-mcp-adapter. You give it an OpenAPI/Swagger spec and it generates:

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.

If you are working with agents or playing with MCP this might save you a lot of 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