TinyMCP
OfficialAllows building MCP servers using FastAPI as the underlying web framework, enabling easy integration of MCP tools into FastAPI applications.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@TinyMCPlist the MCP tools in my FastAPI application"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
TinyMCP
A lightweight MCP router for FastAPI.
Quick Start
from tinymcp import create_mcp_router, mcp_tool
@mcp_tool(description="Get current time")
def get_time() -> str:
from datetime import datetime
return datetime.now().isoformat()
@mcp_tool(description="Get user data with structured output")
def get_user_data():
return {
"content": [{"type": "text", "text": "User data retrieved"}],
"structured": {"user_id": 123, "email": "user@example.com"}
}
# Add to FastAPI
app.include_router(create_mcp_router(name="My App"))
# Custom prefix (default: "/mcp")
app.include_router(create_mcp_router(name="My App", prefix="/my-mcp"))Related MCP server: FastAPI-MCP
Quick Demo
Once you have this repo cloned, from root, run the following (install the missing dev dependencies as required)
uv run python docs/sample_server/simple_fastapi_server.pyNote on Authentication
Authentication has been intentionally left out of TinyMCP to keep it... tiny. Any auth that can be setup with FastAPI in general can be setup with this. However, for MCP server to interact with most MCP clients like cursor, several specific configurations, endpoints etc. are required. If you have an existing OAuth mechanism in your FastAPI server, it is quite easy to make it work for the TinyMCP server as well. See oauth_integration_guide.md for a complete setup guide.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityDmaintenanceA production-ready MCP server built with FastAPI, providing an enhanced tool registry for creating, managing, and documenting AI tools for Large Language Models (LLMs).Last updated34
- Alicense-qualityDmaintenanceA 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.Last updated1MIT
- Flicense-quality-maintenanceAuto-converts FastAPI endpoints into MCP tools for semantic search, data ingestion (text, code, conversations), and knowledge graph operations. Provides dual access through MCP protocol and direct API calls with automatic tool generation from FastAPI routes.Last updated
- Alicense-qualityDmaintenanceExposes 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.Last updatedMIT
Related MCP Connectors
The official MCP Server from Mia-Platform to interact with Mia-Platform Console
MCP (Model Context Protocol) server for Appwrite
MCP server for Pentest-Tools.com: run scans, manage findings and reports via your preffered LLM.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/grab/tinymcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server