Registry / ai-ml / fastmcp-slim

fastmcp-slim

JSON →
library3.4.2pypypiunverified

FastMCP (slim variant) is a Python framework for building MCP (Model Context Protocol) servers quickly and with minimal dependencies. It provides a high-level abstraction over JSON-RPC and Streamable HTTP transports, allowing you to define tools, resources, and prompts with simple decorators. Version 3.4.2, active development.

pip install fastmcp-slim
INSTALL
IMPORT
SIG · FASTMCP-SLIM
F
fastmcp-slim
ai-mlpythonv3.4.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

FastMCP
✓ from fastmcp import FastMCP
✗ from mcp.server.fastmcp import FastMCP

Minimal FastMCP server with one tool.

from mcp.server.fastmcp import FastMCP import os mcp = FastMCP("My App") if os.environ.get('MCP_API_KEY'): mcp.auth = os.environ['MCP_API_KEY'] @mcp.tool() def add(a: int, b: int) -> int: return a + b if __name__ == "__main__": mcp.run()
Debug
Known issues
gotchaImport path: Use 'from mcp.server.fastmcp import FastMCP'. The package name 'fastmcp-slim' does not match the import path.
fix
Always import from 'mcp.server.fastmcp'.
affects: all
breakingVersion 3.x moved to asynchronous core. Sync tools are wrapped; async is preferred. Some decorators changed.
fix
Use async def for tool definitions and call await when invoking tools. Check migration guide.
affects: >=3.0.0
gotchaTransport defaults: FastMCP now defaults to 'streamable-http' (JSON-RPC over HTTP) instead of stdio. If you need SSE, set transport='sse'.
fix
Explicitly set transport when creating FastMCP instance if you need SSE.
affects: >=3.0.0
Upgrade
Version history
3.4.2latest on PyPI · released Jun 6, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
19 hits · last 30 days
node
16
OpenAI (training)
1
Resources
fastmcp-slim — pip install fastmcp-slim · libregistry