Esta página se muestra en inglés. Una traducción al español está en curso.
MCP ConfigsMay 14, 2026·3 min de lectura

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.

Listo para agents

Este activo puede ser leído e instalado directamente por agents

TokRepo expone un comando CLI universal, contrato de instalación, metadata JSON, plan según adaptador y contenido raw para que los agents evalúen compatibilidad, riesgo y próximos pasos.

Native · 94/100Política: permitir
Superficie agent
Cualquier agent MCP/CLI
Tipo
Mcp
Instalación
Uv|Pip
Confianza
Confianza: Established
Entrada
from fastmcp import FastMCP; mcp.run()
Comando CLI universal
npx tokrepo install 4c9dd8ef-7adc-5835-bb5a-2a2ccb2fda88
Introducción

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.
🙏

Fuente y agradecimientos

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.

Discusión

Inicia sesión para unirte a la discusión.
Aún no hay comentarios. Sé el primero en compartir tus ideas.

Activos relacionados