Cette page est affichée en anglais. Une traduction française est en cours.
MCP ConfigsMay 14, 2026·3 min de lecture

FastMCP — Python Framework for MCP Servers

FastMCP is a Python framework for building MCP servers/clients with generated schemas and lifecycle handling. Verified 25154★; pushed 2026-05-13.

MCP Hub
MCP Hub · Community
Prêt pour agents

Cet actif peut être lu et installé directement par les agents

TokRepo expose une commande CLI universelle, un contrat d'installation, le metadata JSON, un plan selon l'adaptateur et le contenu raw pour aider les agents à juger l'adaptation, le risque et les prochaines actions.

Native · 94/100Policy : autoriser
Surface agent
Tout agent MCP/CLI
Type
Mcp
Installation
Uv|Pip
Confiance
Confiance : Established
Point d'entrée
from fastmcp import FastMCP; mcp.run()
Commande CLI universelle
npx tokrepo install 4c9dd8ef-7adc-5835-bb5a-2a2ccb2fda88
Introduction

FastMCP is a Python framework for building MCP servers/clients with generated schemas and lifecycle handling. Verified 25154★; pushed 2026-05-13.

Best for: Python teams who want a structured way to ship MCP servers with fewer protocol edge cases

Works with: Python 3.x; uv/pip installs; integrates with MCP clients (per docs/README links)

Setup time: 5-12 minutes

Key facts (verified)

  • GitHub: 25154 stars · 2010 forks · pushed 2026-05-13.
  • License: Apache-2.0 · owner avatar + repo URL verified via GitHub API.
  • README-backed entrypoint: from fastmcp import FastMCP; mcp.run().

Main

  • Start from the minimal server example, then move each tool into small, testable Python functions with clear docstrings.

  • Keep tool contracts stable: treat schemas and return types as an API, and version changes in your MCP server like any other service.

  • Add production concerns early (timeouts, rate limits, auth) and keep a staging server to validate client compatibility.

  • Use the project docs links for server/client/app patterns instead of inventing protocol glue by hand.

README (excerpt)

FastMCP Logo

FastMCP 🚀

Move fast and make things.

Made with 💙 by Prefect

Docs Discord PyPI - Version Tests License

prefecthq%2Ffastmcp | Trendshift


The Model Context Protocol (MCP) connects LLMs to tools and data. FastMCP gives you everything you need to go from prototype to production:

from fastmcp import FastMCP

mcp = FastMCP("Demo 🚀")

@mcp.tool
def add(a: int, b: int) -> int:
    """Add two numbers"""
    return a + b

if __name__ == "__main__":
    mcp.run()

Why FastMCP

Building an effective MCP application is harder than it looks. FastMCP handles all of it. Declare a tool with a Python function, and the schema, validation, and documentation are generated automatically. Connect to a server with a URL, and transport negotiation, authentication, and protocol lifecycle are managed for you. You focus on your logic, and the MCP part just works: with FastMCP, best practices are built in.

Source-backed notes

  • README shows a minimal server using FastMCP("Demo"), a @mcp.tool function, and mcp.run().
  • README recommends installing via uv pip install fastmcp and links to a dedicated docs site.
  • Project description frames FastMCP as a higher-level way to build MCP servers/clients without manual schema wiring.

FAQ

  • Is FastMCP a server or a client?: README describes both server and client patterns; start by building a server first.
  • Do I need uv?: README recommends uv, but pip-based installs are also common for Python libraries.
  • How do I keep tool behavior predictable?: Treat tool schemas as an API contract, add tests, and version breaking changes.
🙏

Source et remerciements

Created by PrefectHQ. Licensed under Apache-2.0.

PrefectHQ/fastmcp — ⭐ 25154

Thanks to the upstream maintainers and contributors for publishing this work under an open license.

Fil de discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.

Actifs similaires