FastAPI MCP Application
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
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@FastAPI MCP Applicationlist all users in the database"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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:
python -m venv venvAtive o ambiente virtual:
Windows:
.\venv\Scripts\activatemacOS/Linux:
source venv/bin/activate
Instale as dependências:
pip install -r requirements.txt
Related MCP server: MCP REST API Server
Executando a Aplicação
Para iniciar o servidor Uvicorn, execute:
uvicorn main:app --reload
ou
python main.pyIsso 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:
http://127.0.0.1:8000/mcpNeste 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 deployed
Maintenance
Related MCP Connectors
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
Hosted MCP server for AI-driven data ops. Create apps, manage schemas, and CRUD structured data.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
An MCP server that provides an API to LLMs to manage their JumpCloud resources.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA FastAPI-based implementation of the Model Context Protocol that enables standardized interaction between AI models and development environments, making it easier for developers to integrate and manage AI tasks.10MIT
- FlicenseNot gradedqualityDmaintenanceA server implementation of the Model Context Protocol (MCP) that provides REST API endpoints for managing and interacting with MCP resources.-
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol (MCP) server implementation built with Python and FastAPI for educational purposes. Demonstrates MCP server functionality through a books API interface.MIT
- FlicenseNot gradedqualityCmaintenanceAn end-to-end test MCP server built with FastMCP that exposes a REST API as a set of tools for AI agents. It enables LLMs to perform CRUD operations on an upstream API by mapping HTTP methods to MCP tools.-