drio
Open app

Python CLI Tool for Generating MCP Servers from API Specs

Source

Generates an MCP server using Anthropic's SDK given input as OpenAPI or GraphQL specs.

Catalog onlyCatalog onlySTDIO

Overview

MCP is a Python CLI tool designed to generate Model Context Protocol (MCP) servers from API specifications such as OpenAPI or GraphQL. It automates the creation of a fully functional server project that adheres to best practices and integrates with Anthropic's MCP SDK.

To use MCP, provide an API specification file (in YAML or JSON for OpenAPI or SDL/IDL for GraphQL) and a JSON configuration file that defines generation options. Run the CLI tool, and it will generate the server project in the specified programming language (Python, TypeScript, Kotlin, or Rust).

  • Accepts OpenAPI or GraphQL specifications and auto-detects the type. - Generates an MCP server in the user-specified language with cleanly structured output. - Implements configurable authentication middleware and privacy/security measures. - Provides a structured README for installation, usage, and customization.
  1. Quickly exposing data or services through an MCP server.
  2. Automating the creation of server projects for various programming languages.
  3. Ensuring compliance with security and privacy standards in API development.

Add to your AI client

Use these steps to connect Python CLI Tool for Generating MCP Servers from API Specs in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.

Cursor

Add this to your .cursor/mcp.json file in your project root, then restart Cursor.

.cursor/mcp.json

{
  "mcpServers": {
    "mcp-jmcentire": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-jmcentire"
      ]
    }
  }
}

Claude Desktop

Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.

~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)

{
  "mcpServers": {
    "mcp-jmcentire": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-jmcentire"
      ]
    }
  }
}

Claude Code

Add this to your project's .mcp.json file. Claude Code will detect it automatically.

.mcp.json (project root)

{
  "mcpServers": {
    "mcp-jmcentire": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-jmcentire"
      ]
    }
  }
}

VS Code (Copilot)

Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.

.vscode/mcp.json

{
  "servers": {
    "mcp-jmcentire": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-jmcentire"
      ]
    }
  }
}

Windsurf

Add this to your Windsurf MCP config file, then restart Windsurf.

~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "mcp-jmcentire": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-jmcentire"
      ]
    }
  }
}

Cline

Open Cline settings, navigate to MCP Servers, and add this server configuration.

Cline MCP Settings (via UI)

{
  "mcpServers": {
    "mcp-jmcentire": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-jmcentire"
      ]
    }
  }
}

FAQ

Can MCP generate servers for all programming languages?

Currently, MCP supports Python, TypeScript, Kotlin, and Rust.

Is MCP free to use?

Yes! MCP is open-source and free to use.

How does MCP handle security and privacy?

MCP includes options for authentication, data redaction, and secure headers to ensure compliance with best practices.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":3510,"uuid":"4624bc8b-f0bf-4bde-a90b-e1ad24f7b62e","name":"mcp","title":"Python CLI Tool for Generating MCP Servers from API Specs","description":"Generates an MCP server using Anthropic's SDK given input as OpenAPI or GraphQL specs.","avatar_url":"https://avatars.githubusercontent.com/u/519490?v=4","created_at":"2025-03-20T00:37:15.209Z","updated_at":"2025-03-20T01:23:34.951Z","status":"created","author_name":"jmcentire","author_avatar_url":"https://avatars.githubusercontent.com/u/519490?v=4","tags":"mcp,python-cli-tool,api-spec-generator","category":"developer-tools","is_featured":false,"sort":1,"url":"https://github.com/jmcentire/mcp","target":"_self","content":"$29","summary":"$2a","img_url":null,"type":null,"metadata":"{\"star\":\"0\",\"license\":\"MIT license\",\"language\":null,\"is_official\":false,\"latest_commit_time\":\"2025-03-19 17:08:43\"}","user_uuid":null,"tools":null,"sse_url":null,"sse_provider":null,"sse_params":null,"is_official":false,"server_command":null,"server_params":null,"server_config":null,"allow_call":false,"is_innovation":false,"is_dxt":false,"dxt_manifest":null,"dxt_file_url":null,"is_audit":false},"randomProjects":[],"currentServerKey":"$undefined"}]]}]