MCP.so
ログイン

MCP Server from OpenAPI

@rajeshm7910

MCP Server from OpenAPI について

概要はまだありません

基本情報

カテゴリ

その他

ライセンス

Apache-2.0 license

ランタイム

python

トランスポート

stdio

公開者

rajeshm7910

設定

以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。

{
  "mcpServers": {
    "mcp-server-from-openapi": {
      "command": "python3",
      "args": [
        "-m",
        "venv",
        "venv"
      ]
    }
  }
}

ツール

ツールは検出されませんでした

ツールは README から自動的に抽出されます。メンテナーは ## Tools という見出しの下に記載することで、このタブに反映できます。

概要

What is MCP Server from OpenAPI?

MCP Server from OpenAPI is a Model Context Protocol (MCP) server implementation that generates endpoints from OpenAPI specifications, supporting both Server-Sent Events (SSE) and streaming responses. It is designed for developers who want to interact with APIs through MCP clients or Google ADK agents using natural language queries.

How to use MCP Server from OpenAPI?

Install Python 3.x and pip, create a virtual environment, and run pip install -r requirements.txt. Start the server in SSE mode (python server/mcp_server_sse.py --spec <file> --name <name> --base-url <url>) or streaming mode (python server/mcp_server_stream.py ...). Then launch either the SSE client (python client/sse_client.py) or streaming client (python client/stream_client.py). For ADK agents, install google-adk, replace a mcp_session_manager.py file, and configure .env files with the appropriate API keys.

Key features of MCP Server from OpenAPI

  • OpenAPI specification-based endpoint generation
  • Support for both SSE and streaming responses
  • Multiple client implementations (MCP and ADK)
  • Easy configuration through environment variables
  • Example usage with httpbin.org API

Use cases of MCP Server from OpenAPI

  • Query an API (e.g., get headers) using natural language through an MCP client
  • Build agentic workflows with Google ADK agents that call REST APIs
  • Rapidly prototype API interactions without writing custom client code
  • Test and debug OpenAPI specifications with a live server

FAQ from MCP Server from OpenAPI

What are the prerequisites for using this server?

Python 3.x, pip, and an Anthropic API key (for MCP clients) or a Google API key (for ADK agents). The server also requires the dependencies listed in requirements.txt.

How do I run the server in SSE mode?

Run python server/mcp_server_sse.py --spec server/httpbin_openapi.yaml --name httpbin --base-url https://httpbin.org. Replace the spec file, name, and base URL with your own values.

How do I set up ADK agents with this server?

Install ADK (pip install google-adk), download the latest mcp_session_manager.py from the Google ADK repository and replace the existing file in your ADK installation. Then create .env files in the agent directories with GOOGLE_GENAI_USE_VERTEXAI="False" and GOOGLE_API_KEY="your_key". Start the ADK web interface with adk web.

What should I do if ADK streaming mode has issues?

Verify you have replaced the mcp_session_manager.py file, check that your Google API key is correctly set in the .env files, and ensure you are using the latest version of ADK.

Can I use this server with APIs other than httpbin?

Yes, you can provide any OpenAPI specification file using the --spec flag and set the appropriate base URL with --base-url.

コメント

「その他」の他のコンテンツ