docfy-mcp
Exposes an OpenAPI catalog as tools for AI agents (e.g., Claude Code, Cursor) to query API endpoints via list_endpoints and get_endpoint tools, enabling interactive API exploration without a browser.
README
docfy-mcp
Servidor MCP (stdio) que expõe um catálogo OpenAPI — de preferência um já
documentado com nestjs-docfy, mas funciona com qualquer
spec OpenAPI 3.0/3.1 válida — como tools pra agentes de código (Claude Code,
Cursor etc.) consultarem durante a implementação de um client, sem abrir o
navegador.
Tools
list_endpoints— lista todos os endpoints (method + path + summary). Aceitafilteropcional (substring case-insensitive em path/summary/tags).get_endpoint— recebemethod+path, devolve o texto completo no formato "Copy for AI" (Purpose, Request, Parameters, Validation, Success Response, Error Responses).
Uso
Publicado no npm — não precisa clonar nem buildar:
# a partir de um arquivo estático
npx docfy-mcp --spec ./openapi.json
# a partir de um servidor NestJS rodando localmente
npx docfy-mcp --url http://localhost:3000/docs-json
--urlfaz o fetch da spec diretamente (não delega ao resolver HTTP do swagger-parser), justamente para funcionar contralocalhost— osafeUrlResolverdo swagger-parser bloqueia URLs locais/privadas por padrão (proteção SSRF), o que quebraria o caso de uso mais comum daqui: apontar pro dev server NestJS local.
O path do JSON não é convenção fixa — depende do que o projeto passou pra
SwaggerModule.setup() (/api-json, /docs-json, /swagger-json...). Se
--url der 404, o docfy-mcp sonda os paths mais comuns na mesma origem e
sugere qualquer um que pareça um documento OpenAPI de verdade.
Pra specs atrás de auth, repita --header quantas vezes precisar:
npx docfy-mcp --url https://api.exemplo.com/api-json --header "Authorization: Bearer xyz"
Pra desenvolver neste repo: npm install && npm run build, depois
node dist/cli.js --spec/--url ... (ou npm run dev via tsx).
Registrar como MCP server local (Claude Code / Cursor)
Adicione um .mcp.json na raiz do projeto onde o client MCP vai rodar:
{
"mcpServers": {
"docfy": {
"command": "npx",
"args": ["-y", "docfy-mcp", "--url", "http://localhost:3000/docs-json"]
}
}
}
Reinicie o client MCP; as tools list_endpoints e get_endpoint devem
aparecer na lista de tools disponíveis.
Escopo do fim de semana
Fora do escopo por ora (ver docfy-mcp-planejamento.md na raiz do
container): CI/lint completo, transporte HTTP/SSE, search_endpoints
(busca semântica), autenticação/spec atrás de login.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.