Skip to main content
Glama

FastAPI MCP Application

FastAPI Application

Este é um projeto de exemplo de uma aplicação REST API construída com FastAPI.

Configuração do Ambiente

  1. Crie o ambiente virtual:

    python -m venv venv
  2. Ative o ambiente virtual:

    • Windows:

      .\venv\Scripts\activate
    • macOS/Linux:

      source venv/bin/activate
  3. Instale as dependências:

    pip install -r requirements.txt

Executando a Aplicação

Para iniciar o servidor Uvicorn, execute:

uvicorn main:app --reload ou python main.py

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:

http://127.0.0.1:8000/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" }

-
security - not tested
A
license - permissive license
-
quality - not tested

Related MCP Servers

  • -
    security
    A
    license
    -
    quality
    A 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 -
    9
    MIT License
  • -
    security
    A
    license
    -
    quality
    An MCP server that exposes HTTP methods defined in an OpenAPI specification as tools, enabling interaction with APIs via the Model Context Protocol.
    Last updated -
    8
    MIT License
  • -
    security
    F
    license
    -
    quality
    A server implementation of the Model Context Protocol (MCP) that provides REST API endpoints for managing and interacting with MCP resources.
    Last updated -
  • -
    security
    A
    license
    -
    quality
    A FastAPI library that provides Model Context Protocol tools for endpoint introspection and OpenAPI documentation, allowing AI agents to discover and understand API endpoints.
    Last updated -
    3
    MIT License

View all related MCP servers

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/christian-felipe9/MCP-API'

If you have feedback or need assistance with the MCP directory API, please join our Discord server