
gujord/openapi-mcp
Developer toolsЭта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал
gujord/openapi-mcp - кандидат на сервер MCP, импортированный из https://github.com/gujord/openapi-mcp.
Обзор
gujord/openapi-mcp - кандидат на сервер MCP, импортированный из https://github.com/gujord/openapi-mcp.
Обзор (машинный перевод)
Прокси OpenAPI-MCP переводит спецификации OpenAPI в инструменты MCP, позволяя агентам ИИ получать доступ к внешним API без пользовательских оберток!
Преодолейте разрыв между ИИ-агентами и внешними API
Прокси-сервер OpenAPI to Model Context Protocol (MCP) устраняет разрыв между агентами ИИ и внешними API-интерфейсами путем динамического перевода. Спецификации OpenAPI в стандартизированные инструменты MCP, ресурсы и подсказки. Это упрощает интеграцию, устраняя необходимость в пользовательских обертках API.
Построенный с использованием FastMCP в соответствии с официальными шаблонами MCP и лучшими практиками, сервер обеспечивает: Официальная интеграция FastMCP - использует новейшую платформу FastMCP для оптимальной производительности ** Правильный MCP транспорт ** - поддерживает стрио, SSE и потоковые HTTP-перевозки ** Модульная архитектура** - Чистое разделение проблем с инъекцией зависимости Производство готово - Надежная обработка ошибок, комплексная регистрация и безопасность типа
-
**Репозиторий: ** https://github.com/gujord/OpenAPI-MCP
Если вы находите это полезным, пожалуйста, дайте ему на GitHub!
Ключевые особенности
###Основные функции
Эта страница переведена автоматически. Технические детали смотрите в оригинале.
README
Показан фрагмент оригинального README. Открыть оригинал.
OpenAPI to Model Context Protocol (MCP)
OpenAPI-MCP exposes operations from an OpenAPI document as MCP tools. It also provides schema resources, a usage prompt, and request previews. The server uses FastMCP for MCP transport and tool registration.

Release candidate: 2.0.0rc1. This candidate targets FastMCP 4.1.6 and MCP
Python SDK 2.3.0, with compatible minor updates allowed. Version 1.0.4 does not
contain these fixes. Read the upgrade guide
before upgrading an existing installation. See the
review and validation record
for tested versions, findings, and remaining work.
Install and run
Python 3.10 or later is required. Install the candidate explicitly:
pip install 'openapi-mcp-proxy==2.0.0rc1'
To use this checkout:
python -m venv .venv
source .venv/bin/activate
pip install -e .
OPENAPI_URL="./test/fixtures/petstore.json" \
MCP_ALLOWED_OPERATIONS='["GET /pets"]' \
SERVER_NAME="petstore" openapi-mcp
The default transport is stdio. A client launches the process and communicates
through its standard input and output. OPENAPI_URL accepts a local JSON/YAML
file or an HTTP(S) URL. Use specifications and API endpoints you trust.
A stdio client configuration can use the installed executable:
{
"mcpServers": {
"petstore": {
"command": "/absolute/path/to/.venv/bin/openapi-mcp",
"env": {
"OPENAPI_URL": "/absolute/path/to/OpenAPI-MCP/test/fixtures/petstore.json",
"SERVER_NAME": "petstore",
"MCP_ALLOWED_OPERATIONS": "[\"GET /pets\"]"
}
}
}
}
For Streamable HTTP:
OPENAPI_URL="./test/fixtures/petstore.json" \
SERVER_NAME="petstore" \
MCP_ALLOWED_OPERATIONS='["GET /pets"]' \
MCP_HTTP_ENABLED=true \
MCP_HTTP_PORT=8001 \
openapi-mcp
The MCP endpoint is http://127.0.0.1:8001/mcp. The supplied
client configuration uses mcp-remote to connect
stdio clients to HTTP. Client applications and mcp-remote are separate
components and were not tested in the offline review.
Legacy SSE is available explicitly with MCP_TRANSPORT_TYPE=sse, at /sse.
The default HTTP endpoint changed from /sse to /mcp; update existing clients.
Choose which API operations to expose
By default, no API operations are exposed. Set MCP_ALLOWED_OPERATIONS to a
Установка
This server does not publish a one-line install command.
Open the repository installation guide Новичок в MCP? Начните с руководства на mcpskill.org →Конфигурация
{
"mcpServers": {
"petstore": {
"command": "/absolute/path/to/.venv/bin/openapi-mcp",
"env": {
"OPENAPI_URL": "/absolute/path/to/OpenAPI-MCP/test/fixtures/petstore.json",
"SERVER_NAME": "petstore",
"MCP_ALLOWED_OPERATIONS": "[\"GET /pets\"]"
}
}
}
}