A hands-on exploration of generating an MCP server automatically from an OpenAPI specification using FastMCP (Python). The author clones Atomic CRM, converts its OpenAPI v2 spec to v3, connects the server to GitHub Copilot, and works through real issues: authentication, the resource vs. tool distinction, and exploding token consumption. Custom discovery tools (list_api_resources, read_api_resource) are added to help agents navigate the API more efficiently. The conclusion is that auto-generated MCP servers from OpenAPI specs are fine for prototyping but unsuitable for production due to high token costs and poor agent ergonomics — feature-oriented or query-based tool designs are recommended instead.

6m read timeFrom marmelab.com
Post cover image
Table of contents
Setting Up Atomic CRMCreating a First MCP Server with FastMCPExploring the MCP Server with the InspectorConnecting the MCP Server to CopilotAdding Custom Discovery ToolsLimitations: Context Size and Token ConsumptionConclusion: Only Useful for Prototyping

Sort: