Provides a Model Context Protocol (MCP) interface for FastAPI endpoints, automatically generating tools from API endpoints decorated with @mcp_app.tool(), enabling interaction with CRUD operations through MCP clients
Integrates with Swagger UI to provide interactive API documentation at /docs, allowing developers to explore and test the API endpoints
FastAPI Application
Este é um projeto de exemplo de uma aplicação REST API construída com FastAPI.
Configuração do Ambiente
- Crie o ambiente virtual:
- Ative o ambiente virtual:
- Windows:
- macOS/Linux:
- Windows:
- Instale as dependências:
Executando a Aplicação
Para iniciar o servidor Uvicorn, execute:
Isso iniciará a aplicação em http://127.0.0.1:8000
. Você pode acessar a documentação interativa da API em http://127.0.0.1:8000/docs
(Swagger UI) ou http://127.0.0.1:8000/redoc
(ReDoc).
Usando a Interface MCP
Para interagir com as ferramentas MCP geradas automaticamente a partir dos seus endpoints FastAPI, acesse através de um cliente MCP:
Neste caminho, você encontrará a interface do Model Context Protocol (MCP), onde as ferramentas (seus endpoints CRUD decorados com @mcp_app.tool()
) estarão disponíveis para interação via clientes MCP ou diretamente através da interface.
Instalar no cursor
Para funcionar no cursor deve rodar o servidor com o comando acima e adicionar o json abaixo em mcp.json do cursor
"mcp-crud": { "url": "http://127.0.0.1:8000/mcp" }
This server cannot be installed
A REST API built with FastAPI that exposes endpoints via Model Context Protocol (MCP), allowing clients to interact with CRUD operations through MCP interfaces.
Related MCP Servers
- -securityAlicense-qualityA high-performance FastAPI server supporting Model Context Protocol (MCP) for seamless integration with Large Language Models, featuring REST, GraphQL, and WebSocket APIs, along with real-time monitoring and vector search capabilities.Last updated -5PythonMIT License
- -securityAlicense-qualityA Python-based MCP server that integrates OpenAPI-described REST APIs into MCP workflows, enabling dynamic exposure of API endpoints as MCP tools.Last updated -239PythonMIT License
- -securityAlicense-qualityAn MCP server that exposes HTTP methods defined in an OpenAPI specification as tools, enabling interaction with APIs via the Model Context Protocol.Last updated -2PythonMIT License
- -securityAlicense-qualityA zero-configuration tool that automatically converts FastAPI endpoints into Model Context Protocol (MCP) tools, enabling AI systems to interact with your API through natural language.Last updated -1PythonMIT License