🚀 MCPY-CLI: 快速从 Python 文件构建 MCP 服务
@liuhaotian9420
About 🚀 MCPY-CLI: 快速从 Python 文件构建 MCP 服务
A cli tool to auto discover and build MCP service from Python files
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"mcpy-cli": {
"command": "uv",
"args": [
"pip",
"install",
"mcpy-cli"
]
}
}
}Tools
No tools detected
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is 🚀 MCPY-CLI: 快速从 Python 文件构建 MCP 服务?
🚀 MCPY-CLI is a command-line toolkit that converts one or more Python functions or scripts into standard MCP (Model Context Protocol) services. It automatically generates service routes, supports multiple transport protocols, and offers one‑click deployment. It is designed for developers who want to quickly build and deploy MCP services from existing Python code.
How to use 🚀 MCPY-CLI: 快速从 Python 文件构建 MCP 服务?
Install via pip install mcpy-cli (requires Python ≥ 3.10 and FastMCP). Use mcpy-cli run --source-path <file_or_dir> to launch a local MCP service on port 8080 (default). Use mcpy-cli package --source-path <path> --package-name <name> to package the service for production. Options include --mode (composed/routed) and --enable-event-store for persistence.
Key features of 🚀 MCPY-CLI: 快速从 Python 文件构建 MCP 服务?
- Converts Python functions into MCP tools automatically.
- Supports two server architectures: composed and routed.
- Provides both local run and production packaging commands.
- Offers Streamable HTTP transport (default) and legacy SSE.
- Supports event store persistence with SQLite.
- Includes session‑level tool call caching for performance.
Use cases of 🚀 MCPY-CLI: 快速从 Python 文件构建 MCP 服务?
- Quickly expose existing Python utility functions as MCP tools.
- Prototype and debug MCP services with automatic reload during development.
- Package multiple Python modules into a deployable MCP service for production.
- Build modular MCP services with separate routes for different tool groups (routed mode).
FAQ from 🚀 MCPY-CLI: 快速从 Python 文件构建 MCP 服务?
What are the dependencies and runtime requirements?
Python ≥ 3.10 and the FastMCP library are required. The uv package manager is recommended but not mandatory.
How does persistence work?
By using the --enable-event-store flag, the service stores JSON‑RPC messages in a local SQLite database (default ./mcp_event_store.db), enabling state recovery after restarts. The path can be customized with --event-store-path.
What transport protocols are supported?
The default transport is Streamable HTTP (stable and recommended). Legacy SSE mode can be enabled via --legacy-sse but is deprecated and may have path issues in cloud environments like Knative/Istio.
How does caching work?
The SessionToolCallCache is an in‑memory cache tied to a user session. It stores results of tool calls performed with the same arguments, avoiding redundant executions. It is primarily active in stateful JSON response mode.
What are the two server modes?
- Composed mode (default): All tools are mounted under one FastMCP instance; tool names are prefixed with the source file name.
- Routed mode: Each file gets its own FastMCP instance serving at a separate URL path (e.g.,
/math_tools).
Frequently asked questions
What are the dependencies and runtime requirements?
Python ≥ 3.10 and the FastMCP library are required. The `uv` package manager is recommended but not mandatory.
How does persistence work?
By using the `--enable-event-store` flag, the service stores JSON‑RPC messages in a local SQLite database (default `./mcp_event_store.db`), enabling state recovery after restarts. The path can be customized with `--event-store-path`.
What transport protocols are supported?
The default transport is Streamable HTTP (stable and recommended). Legacy SSE mode can be enabled via `--legacy-sse` but is deprecated and may have path issues in cloud environments like Knative/Istio.
How does caching work?
The `SessionToolCallCache` is an in‑memory cache tied to a user session. It stores results of tool calls performed with the same arguments, avoiding redundant executions. It is primarily active in stateful JSON response mode.
What are the two server modes?
- **Composed mode** (default): All tools are mounted under one FastMCP instance; tool names are prefixed with the source file name. - **Routed mode**: Each file gets its own FastMCP instance serving at a separate URL path (e.g., `/math_tools`).
Basic information
More Developer Tools MCP servers
endoflife.ai
endoflife.aiFree MCP server for software end-of-life intelligence: EOL dates, support status, and the 0-100 EOL Risk Score across 485 tracked products. Agents can check a single version, pull a product's full lifecycle schedule, or
Grafana MCP server
grafanaMCP server for Grafana
mcp-excalidraw
yctimlinMCP server and Claude Code skill for Excalidraw — programmatic canvas toolkit to create, edit, and export diagrams via AI agents with real-time canvas sync.

Moxie Docs
Jackalope-DevAutomated codebase documentation for GitHub: searchable docs, MCP context for AI agents, doc drift detection, and Friday Cleanup PRs.

discoverGPT
Joe MonastierodiscoverGPT is visualAI's unified MCP gateway for AI commerce, exposing 29 tools across four capabilities on one canonical product catalog: trimodal search (natural-language, precise-color, and image-similarity), AI cata
Comments