mcpgen tool auto-converts OpenAPI specs into ready-to-use MCP servers
A developer has released mcpgen, an open-source Python tool that automatically generates Model Context Protocol (MCP) servers from OpenAPI 3.0 and 3.1 JSON or YAML specification files. The tool creates one MCP tool per API endpoint, handles authentication methods such as API keys and Bearer tokens, and outputs a readable Python script with minimal dependencies. Users can install it via pip and generate a working server in a single command, which can then be connected to clients like Claude Desktop. The project was validated against a real-world OpenAPI 3.1 fixture involving tweet and user endpoints, passing all 18 tests on the first attempt. Available on GitHub and PyPI under the MIT license, mcpgen aims to eliminate boilerplate code for developers building LLM agents that interact with REST APIs.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in