Navigate:
All Reposfastmcp
~$FASTMC0.3%

FastMCP: Python framework for MCP servers and clients

Build Model Context Protocol servers with decorators.

LIVE RANKINGS • 06:51 AM • STEADY
TOP 50TOP 50TOP 50TOP 50TOP 50TOP 50TOP 50TOP 50TOP 50TOP 50TOP 50TOP 50
OVERALL
#32
13
AI & ML
#19
6
30 DAY RANKING TREND
ovr#32
·AI#19
STARS
21.8K
FORKS
1.6K
DOWNLOADS
167.0K
7D STARS
+72
7D FORKS
-1
Tags:
See Repo:
Share:

Learn more about fastmcp

FastMCP is a Python framework that simplifies development of Model Context Protocol applications. It uses Python decorators to expose functions as MCP tools and provides built-in support for resources, prompts, and context management. The framework includes authentication integrations, deployment utilities, and client libraries for connecting to MCP servers. Common use cases include building AI agent backends, integrating data sources with LLM applications, and creating composable tool ecosystems.


1

Decorator-Based Tool Definition

Python decorators expose functions as MCP tools and resources without manual protocol implementation. Reduces boilerplate while maintaining compatibility with the standard Python SDK.

2

Enterprise Authentication Integrations

Pre-built support for Google, GitHub, WorkOS, Azure, and Auth0 authentication providers. Eliminates custom OAuth implementation for production deployments requiring user authentication.

3

Server Composition and Proxying

Combine multiple MCP servers, proxy requests between instances, and generate OpenAPI/FastAPI interfaces from MCP definitions. Enables modular architectures and integration with existing web frameworks.


from fastmcp import FastMCP

mcp = FastMCP("My AI Agent")

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

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

vv2.13.0.2

Fixes dependency constraints: bumps py-key-value-aio minimum to 0.2.8 and replaces openapi-core with jsonschema-path.

  • Upgrade py-key-value-aio to at least 0.2.8 to meet the new minimum version requirement.
  • Expect openapi-core removed in favor of jsonschema-path for OpenAPI validation; verify custom validation logic.
vv2.13.0.1

Patch release fixing Azure OAuth scope validation bug introduced in 2.13.0.

  • Upgrade immediately if using Azure OAuth provider to restore correct scope handling.
  • Review Azure OAuth configurations after upgrade to confirm scopes are validated as expected.
vv2.13.0

Breaking: lifespan parameter behavior changed; server-level hooks now run once per instance instead of per client session. Adds pluggable storage backends with encrypted disk persistence, OAuth token introspection (RFC 7662), and response caching middleware.

  • Review lifespan usage—initialization and cleanup hooks now execute once per server instance, not per client connection.
  • Enable response caching middleware to reduce redundant API calls; configure TTLs for tool and resource responses as needed.

See how people are using fastmcp

Loading tweets...


[ EXPLORE MORE ]

Related Repositories

Discover similar tools and frameworks used by developers