TinyMCP
БесплатноНе проверенA lightweight MCP router for FastAPI that enables adding MCP tools to FastAPI applications with ease.
Описание
A lightweight MCP router for FastAPI that enables adding MCP tools to FastAPI applications with ease.
README
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": "[email protected]"}
}
# 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"))
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.py
Note 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.
Установка TinyMCP
У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.
▸ github.com/grab/tinymcpFAQ
TinyMCP MCP бесплатный?
Да, TinyMCP MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для TinyMCP?
Нет, TinyMCP работает без API-ключей и переменных окружения.
TinyMCP — hosted или self-hosted?
Доступен hosted-вариант: Unyly запускает сервер в облаке, локальная установка не обязательна.
Как установить TinyMCP в Claude Desktop, Claude Code или Cursor?
Открой TinyMCP на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
GitHub
PRs, issues, code search, CI status
автор: GitHubFilesystem
Secure file operations with configurable access controls.
Memory
Knowledge graph-based persistent memory system.
Template MCP Server
A CLI tool to create a new Model Context Protocol server project with TypeScript support, dual transport options, and an extensible structure
автор: mcpdotdirectCompare TinyMCP with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории development
