MCP.so
登录

OpenAPI to MCP Server

@gujord

基本信息

分类

其他

许可证

MIT

传输方式

stdio

作者

gujord

关于 OpenAPI to MCP Server

The OpenAPI-MCP proxy translates OpenAPI specs into MCP tools, enabling AI agents to access external APIs without custom wrappers!

OpenAPI to MCP Server 配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

{
  "mcpServers": {
    "petstore3": {
      "command": "full_path_to_openapi_mcp/venv/bin/python",
      "args": [
        "full_path_to_openapi_mcp/src/server.py"
      ],
      "env": {
        "SERVER_NAME": "petstore3",
        "OPENAPI_URL": "https://petstore3.swagger.io/api/v3/openapi.json"
      },
      "transport": "stdio"
    }
  }
}

OpenAPI to MCP Server 工具

工具列表暂未提供

当前收录暂时没有可展示的工具列表,不代表服务没有工具。请查阅项目文档了解支持的能力。

工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。

概览

What is OpenAPI to Model Context Protocol (MCP)?

OpenAPI to Model Context Protocol (MCP) is a proxy server that dynamically translates OpenAPI specifications into standardized MCP tools, resources, and prompts. It bridges the gap between AI agents and external APIs, eliminating the need for custom API wrappers. Built with FastMCP, it supports stdio, SSE, and streamable HTTP transports.

How to use OpenAPI to Model Context Protocol (MCP)?

Install using uvx openapi-mcp-proxy (recommended), pip install openapi-mcp-proxy, or from source. Set environment variables such as OPENAPI_URL and SERVER_NAME, then run the server. It can be configured for Claude Desktop, Cursor, or Windsurf using provided JSON configurations for HTTP or stdio transport.

Key features of OpenAPI to Model Context Protocol (MCP)

  • Dynamically converts OpenAPI operations into callable MCP tools.
  • Supports OAuth2 Client Credentials and username/password authentication.
  • Offers stdio, SSE, and streamable HTTP transports.
  • Automatically registers OpenAPI component schemas as MCP resources.
  • Generates contextual prompts to guide LLMs in API usage.
  • Provides robust error handling and structured logging.

Use cases of OpenAPI to Model Context Protocol (MCP)

  • Expose a public weather API (e.g., MET Norway) as MCP tools for Claude Desktop.
  • Run multiple OpenAPI services (e.g., weather and petstore) simultaneously for multi-tool AI agents.
  • Secure internal APIs behind authentication (OAuth2 or username/password) and make them accessible to LLM orchestrators.
  • Enable local OpenAPI specs with custom headers for development or private APIs.
  • Deploy as a Docker service for production-ready MCP integration.

常见问题

1

How do I install OpenAPI to Model Context Protocol (MCP)?

Use `uvx openapi-mcp-proxy` for immediate execution, or install with `pip install openapi-mcp-proxy` and then run `openapi-mcp`. You can also clone the GitHub repository and install from source.

2

What authentication methods are supported?

The server supports OAuth2 Client Credentials flow and username/password authentication. You can also provide custom headers via the `MCP_AUTH_HEADERS` environment variable.

3

Which transport protocols are available?

It supports stdio, MCP HTTP transport (streamable HTTP), and legacy SSE (deprecated). The recommended transport for Claude Desktop is HTTP transport.

4

Can I run multiple API servers at once?

Yes. Start each server with a different `SERVER_NAME` and port, then configure Claude Desktop to point to each endpoint (e.g., `http://127.0.0.1:8001/sse` and `http://127.0.0.1:8002/sse`).

5

How do I configure Claude Desktop to use this server?

Copy the provided `claude_desktop_config.json` to `~/Library/Application Support/Claude/claude_desktop_config.json`. For HTTP transport, set `MCP_HTTP_ENABLED=true` and `MCP_HTTP_PORT=8001`, then start the server.

评论

其他 分类下的更多 MCP 服务器