mcp2api
mcp2api
Любой MCP → обычный HTTP за 15 секунд. Один файл, ноль билда.
npx -y github/megamen32/mcp2api -- --command "npx @anthropic-ai/mcp-server-fetch" --port 8080Зачем
MCP — крутой протокол. Но есть проблема: не все ИИ умеют подключать MCP напрямую.
Claude Desktop подключает. Cursor подключает. А что если ты хочешь:
Дать ChatGPT Custom GPT доступ к MCP-тулам? ChatGPT не умеет в MCP.
Подключить MCP к Telegram-боту? Там только HTTP.
Использовать MCP-инструменты в Alice, GigaChat, DeepSeek? Нет MCP-клиента.
Дать chat.z.ai вызывать MCP? Там есть
web_fetch, но нет MCP.
А curl умеют все. Любой ИИ с доступом в интернет может сделать GET-запрос.
mcp2api берёт любой MCP-сервер и превращает его инструменты в простые HTTP-ручки. Один вызов npx — и готово.
Related MCP server: Swagger MCP
Как это решает проблему CustomGPT
У ChatGPT Custom GPT нет MCP. Но есть Actions — он умеет вызывать HTTP-эндпоинты.
Запускаешь mcp2api с нужным MCP-сервером:
npx -y github/megamen32/mcp2api -- \ --command "npx @anthropic-ai/mcp-server-fetch" \ --port 8080 \ --api-key your-secretВ настройках CustomGPT добавляешь OpenAPI-схему:
http://your-server:8080/Готово — Custom GPT вызывает MCP-инструменты через обычные HTTP-запросы.
GET-only режим (для агентов с web_fetch)
Некоторые ИИ-агенты не умеют POST-запросы. Только web_fetch / web_search. Для них есть --get-only:
npx -y github/megamen32/mcp2api -- \
--command "npx @anthropic-ai/mcp-server-fetch" \
--port 8080 \
--get-onlyВ этом режиме вызов инструмента — это просто GET:
GET /tools/echo?message=hello
GET /tools/fetch?url=https://example.com
GET /tools/search?query=mcp+protocol&limit=5Типы автоматически кастятся: "5" → 5, "true" → true.
Любой ИИ, который умеет делать web_fetch(url) — теперь может вызывать MCP-инструменты.
One-liner
# stdio (запускает MCP-сервер как процесс)
npx -y github/megamen32/mcp2api -- --command "npx @anthropic-ai/mcp-server-fetch" --port 8080
# SSE (подключается к уже запущенному MCP-серверу)
npx -y github/megamen32/mcp2api -- --transport sse --url http://localhost:3001/sse
# StreamableHTTP
npx -y github/megamen32/mcp2api -- --transport streamable-http --url http://localhost:3001/mcp
# GET-only (для агентов без POST, типа web_fetch)
npx -y github/megamen32/mcp2api -- --command "npx @anthropic-ai/mcp-server-fetch" --get-only --port 8080Endpoints
Method | Path | Описание |
GET |
| Инфо о сервере, список эндпоинтов |
GET |
| Health check |
GET |
| MCP capabilities |
GET |
| Список инструментов со схемами |
GET |
| Схема инструмента (без query params) |
GET |
| Вызов инструмента через query params |
POST |
| Вызов инструмента (body = аргументы) |
POST |
| Вызов через |
GET |
| Список ресурсов |
GET |
| Чтение ресурса |
GET |
| Список промптов |
POST |
| Получить промпт |
Примеры
# Список инструментов
curl http://localhost:4321/tools
# Схема конкретного инструмента
curl http://localhost:4321/tools/fetch
# Вызов через POST (полный режим)
curl -X POST http://localhost:4321/tools/fetch \
-H 'Content-Type: application/json' \
-d '{"url": "https://example.com"}'
# Вызов через GET (работает даже в web_fetch!)
curl 'http://localhost:4321/tools/fetch?url=https://example.com'
# Через /call
curl -X POST http://localhost:4321/call \
-H 'Content-Type: application/json' \
-d '{"name": "fetch", "arguments": {"url": "https://example.com"}}'Флаги
Флаг | Env Var | Default | Описание |
|
|
|
|
|
| — | Команда для запуска (stdio) |
|
| — | Доп. аргументы через запятую (stdio) |
|
| — | JSON с доп. env vars (stdio) |
|
| — | URL сервера (sse/streamable-http) |
|
|
| Порт |
|
|
| Хост |
|
| — | Bearer-токен для авторизации |
|
|
| Только GET (для web_fetch агентов) |
Авторизация (опционально)
npx -y github/megamen32/mcp2api -- --api-key mysecret --port 8080Передавай Authorization: Bearer mysecret или ?api_key=mysecret.
Лицензия
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
MCP server exposing the Backtest360 engine API as tools for AI agents.
Self-hosted MCP gateway: turn any API, database or MCP server into AI connectors — no code.
MCP server that lets AI assistants use all OneSchema features exposed via the public API.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceAutomatically converts any OpenAPI specification into an MCP server, exposing all HTTP endpoints as callable tools with support for various authentication methods and request types.2-
- FlicenseNot gradedqualityDmaintenanceAutomatically converts Swagger/OpenAPI specifications into MCP servers, enabling AI agents to interact with any REST API through natural language by exposing endpoints as AI-friendly tools.3-
- AlicenseNot gradedqualityBmaintenanceA dead simple MCP server for exposing your app functions to AI agents like Claude Desktop.215MIT
- AlicenseNot gradedqualityDmaintenanceAutomatically converts Python web backends (FastAPI, Flask, Django) into MCP servers by exposing API routes as MCP tools with near-zero boilerplate.MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/megamen32/mcp2api'
If you have feedback or need assistance with the MCP directory API, please join our Discord server