Skip to main content
Glama

PyPI-Version Python-Versionen FastAPI CI Abdeckung

Merkmale

  • Integrierte Authentifizierung unter Verwendung Ihrer vorhandenen FastAPI-Abhängigkeiten!

  • FastAPI-native: Nicht nur ein weiterer OpenAPI -> MCP-Konverter

  • Keine/minimale Konfiguration erforderlich – richten Sie es einfach auf Ihre FastAPI-App und es funktioniert

  • Beibehalten der Schemata Ihrer Anforderungs- und Antwortmodelle

  • Bewahren Sie die Dokumentation aller Ihrer Endpunkte auf, genau wie in Swagger

  • Flexible Bereitstellung – Binden Sie Ihren MCP-Server in dieselbe App ein oder stellen Sie ihn separat bereit

  • ASGI-Transport - Nutzt die ASGI-Schnittstelle von FastAPI direkt für eine effiziente Kommunikation

Related MCP server: FastAPI-MCP

Installation

Wir empfehlen die Verwendung von uv , einem schnellen Python-Paketinstallationsprogramm:

uv add fastapi-mcp

Alternativ können Sie mit pip installieren:

pip install fastapi-mcp

Grundlegende Verwendung

Die einfachste Möglichkeit, FastAPI-MCP zu verwenden, besteht darin, Ihrer FastAPI-Anwendung direkt einen MCP-Server hinzuzufügen:

from fastapi import FastAPI
from fastapi_mcp import FastApiMCP

app = FastAPI()

mcp = FastApiMCP(app)

# Mount the MCP server directly to your FastAPI app
mcp.mount()

Das war's! Ihr automatisch generierter MCP-Server ist jetzt unter https://app.base.url/mcp verfügbar.

Dokumentation, Beispiele und erweiterte Nutzung

FastAPI-MCP bietet eine umfassende Dokumentation . Im Beispielverzeichnis finden Sie außerdem Codebeispiele, die diese Funktionen in Aktion demonstrieren.

FastAPI-First-Ansatz

FastAPI-MCP ist als native Erweiterung von FastAPI konzipiert und nicht nur als Konverter, der MCP-Tools aus Ihrer API generiert. Dieser Ansatz bietet mehrere wichtige Vorteile:

  • Native Abhängigkeiten : Sichern Sie Ihre MCP-Endpunkte mit vertrauten FastAPI Depends() zur Authentifizierung und Autorisierung

  • ASGI-Transport : Kommuniziert direkt mit Ihrer FastAPI-App über die ASGI-Schnittstelle, sodass keine HTTP-Aufrufe vom MCP an Ihre API erforderlich sind

  • Einheitliche Infrastruktur : Ihre FastAPI-App muss nicht separat vom MCP-Server ausgeführt werden (obwohl auch eine separate Bereitstellung unterstützt wird).

Diese Designphilosophie gewährleistet minimale Reibung beim Hinzufügen von MCP-Funktionen zu Ihren vorhandenen FastAPI-Diensten.

Entwicklung und Mitwirkung

Vielen Dank, dass Sie zu FastAPI-MCP beitragen möchten! Wir ermutigen die Community, Probleme zu melden und Pull Requests zu erstellen.

Bevor Sie beginnen, lesen Sie bitte unseren Beitragsleitfaden .

Gemeinschaft

Treten Sie der MCParty Slack-Community bei, um sich mit anderen MCP-Enthusiasten zu vernetzen, Fragen zu stellen und Ihre Erfahrungen mit FastAPI-MCP zu teilen.

Anforderungen

  • Python 3.10+ (empfohlen 3.12)

  • UV

Lizenz

MIT-Lizenz. Copyright (c) 2024 Tadata Inc.

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.

Maintenance

ActivityInactive
ResponsivenessSyncing

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

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    A 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.
    2
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Exposes FastAPI endpoints as Model Context Protocol (MCP) tools while preserving existing authentication, schemas, and documentation. It enables seamless integration of FastAPI services into MCP ecosystems using a native ASGI transport layer.
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    Turn any OpenAPI spec into MCP tools for Claude — instantly. Point mcp-openapi at any OpenAPI 3.x spec and Claude can call every endpoint through natural language. No custom integration code. No manual tool definitions. One line of config.
    2
    68
    1
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    Converts any REST API endpoints into MCP tools, enabling AI clients like Cursor and Claude Desktop to call internal services directly.
    -

Latest Blog Posts

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/tadata-org/fastapi_mcp'

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