
baryhuang/mcp-server-any-openapi
Developer tools이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
baryhuang/mcp-server-any-openapi는 MCP 서버 후보로 https://github.com/baryhuang/mcp-server-any-openapi.에서 가져온
개요
baryhuang/mcp-server-any-openapi는 MCP 서버 후보로 https://github.com/baryhuang/mcp-server-any-openapi.에서 가져온
개요(AI 번역)
토도
- 도커 이미지는 사전 다운로드 된 모델없이 2GB입니다. 3.76GB의 사전 다운로드 모델!! 너무 큰, 누군가가 크기를 줄이기 위해 나를 도와주세요.
구성
환경 변수를 통해 사용자 지정합니다. ** GLOBAL TOOL PROMPT ** ** 중요 **!
-
OPENAPI_JSON_DOCS_URL: OpenAPI 사양 JSON에 URL (기본값 [T1]] -
MCP_API_PREFIX: 사용자 정의 도구 네임스페이스 (기본 “any openapi”): -
GLOBAL_TOOL_PROMPT: 모든 도구 설명에 prepend 옵션 텍스트. Claude select를 만들고 툴을 정확하게 선택하지 않는 것이 중요합니다.
TL’DR의 특징
왜 이를 만듭니다: 나는 개인 API를 봉사하고 싶어, 그의 swagger openapi docs는 몇 수백 KB 크기.
- Claude MCP 파일의 이러한 크기를 처리하는 오류
- 나는 YAML에 결과를 변환, 작은 충분하지 않고 많은 오류. 사이트맵
- API 범주를 제공하려고 한 다음 MCP Client (Claude Desktop)을 요청하여 그룹에 의해 api doc을 얻을 수 있습니다. 아직 너무 큰, FAILED.
결국 나는이 솔루션에 내려왔다 :
- 자연적인 언어에 의해 관련 Api endpoint를 찾아내는 in-memory semantic 수색을 이용합니다 (리스트 제품과 같은)
이 페이지는 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"
]
}
}
}