
baryhuang/mcp-server-any-openapi
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
baryhuang/mcp-server-any-openapiは[https://github.com/baryhuang/mcp-server-any-openapi.からインポートされたMCPサーバーの候補です
概要
baryhuang/mcp-server-any-openapiは[https://github.com/baryhuang/mcp-server-any-openapi.からインポートされたMCPサーバーの候補です
概要(AI 翻訳)
#TODO(トード)
- ドッカーのイメージは前ダウンロードされたモデルなしで2GBです。 プリダウンロードしたモデルで3.76GB! 大きすぎると、サイズを減らすのに役立ちます。
設定
環境変数によってカスタマイズして下さい。 GLOBAL TOOL PROMPT 重要!
-
[
OPENAPI_JSON_DOCS_URL: OpenAPI 仕様 JSON への URL (デフォルトで https://api.staging.readymojo.com/openapi.json)]) -
[
MCP_API_PREFIX:カスタマイズ可能なツール名空間(デフォルト「any openapi」): -
[
GLOBAL_TOOL_PROMPT]: すべてのツールの説明に優先するオプションのテキスト。 これは、Claude選択をし、あなたのツールを正確に選択しないことが重要です。
#Tシャツ 私はこれを作成なぜ: 私は私のプライベート API を提供したいです。, スワッガ openapi docs は数百 KB サイズで.
- Claude MCP は、これらのファイルサイズを処理する際のエラーだけ
- 結果をYAMLに変換しようとしました, 十分な小さず、多くのエラー. フィードバック
- 私はAPIカテゴリを提供しようとしました, その後、MCPクライアントを尋ねます (Claudeデスクトップ) グループでAPIドキュメントを取得するには. それでも大きすぎる、FAILED。
結局、私はこのソリューションにダウンしました:
- それは自然な言語(リスト プロダクトのような)によって関連したApiのエンドポイントを見つけるためにin記憶の皮の調査を使用します
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 README の抜粋です。原文を見る。
MCP Server: Scalable OpenAPI Endpoint Discovery and API Request Tool
TODO
- The docker image is 2GB without pre-downloaded models. Its 3.76GB with pre-downloaded models!! Too big, someone please help me to reduce the size.
Configuration
Customize through environment variables. GLOBAL_TOOL_PROMPT is IMPORTANT!
OPENAPI_JSON_DOCS_URL: URL to the OpenAPI specification JSON (defaults to https://api.staging.readymojo.com/openapi.json)MCP_API_PREFIX: Customizable tool namespace (default “any_openapi”):# Creates tools: custom_api_request_schema and custom_make_request docker run -e MCP_API_PREFIX=finance ...GLOBAL_TOOL_PROMPT: Optional text to prepend to all tool descriptions. This is crucial to make the Claude select and not select your tool accurately.# Adds "Access to insights apis for ACME Financial Services abc.com . " to the beginning of all tool descriptions docker run -e GLOBAL_TOOL_PROMPT="Access to insights apis for ACME Financial Services abc.com ." ...
TL’DR
Why I create this: I want to serve my private API, whose swagger openapi docs is a few hundreds KB in size.
- Claude MCP simply error on processing these size of file
- I attempted convert the result to YAML, not small enough and a lot of errors. FAILED
- I attempted to provide a API category, then ask MCP Client (Claude Desktop) to get the api doc by group. Still too big, FAILED.
Eventually I came down to this solution:
- It uses in-memory semantic search to find relevant Api endpoints by natural language (such as list products)
- It returns the complete end-point docs (as I designed it to store one endpoint as one chunk) in millionseconds (as it’s in memory)
Boom, Claude now knows what API to call, with the full parameters!
Wait I have to create another tool in this server to make the actual restful request, because “fetch” server simply don’t work, and I don’t want to debug why.
https://github.com/user-attachments/assets/484790d2-b5a7-475d-a64d-157e839ad9b0
Technical highlights:
query -> [Embedding] -> FAISS TopK -> OpenAPI docs -> MCP Client (Claude Desktop)
MCP Client -> Construct OpenAPI Request -> Execute Request -> Return Response
Features
- 🧠 Use remote openapi json file as source, no local file system access, no updating required for API changes
- 🔍 Semantic search using optimized MiniLM-L3 model (43MB vs original 90MB)
- 🚀 FastAPI-based server with async support
- 🧠 Endpoint based chunking OpenAPI specs (handles 100KB+ documents), no loss of endpoint context
- ⚡ In-memory FAISS vector search for instant endpoint discovery
Limitations
インストール
docker run -i --rm -e OPENAPI_JSON_DOCS_URL=https://api.finance.com/openapi.json -e MCP_API_PREFIX=finance -e GLOBAL_TOOL_PROMPT='Access to insights apis for ACME Financial Services abc.com .' buryhuang/mcp-server-any-openapi:latest設定
{
"mcpServers": {
"finance_openapi": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"OPENAPI_JSON_DOCS_URL=https://api.finance.com/openapi.json",
"-e",
"MCP_API_PREFIX=finance",
"-e",
"GLOBAL_TOOL_PROMPT='Access to insights apis for ACME Financial Services abc.com .'",
"buryhuang/mcp-server-any-openapi:latest"
]
},
"healthcare_openapi": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"OPENAPI_JSON_DOCS_URL=https://api.healthcare.com/openapi.json",
"-e",
"MCP_API_PREFIX=healthcare",
"-e",
"GLOBAL_TOOL_PROMPT='Access to insights apis for Healthcare API services efg.com .",
"buryhuang/mcp-server-any-openapi:latest"
]
}
}
}