MCP-Use — Build Full-Stack MCP Apps
MCP-Use is a full-stack framework for building MCP apps that work with ChatGPT, Claude, and any AI agent. 9.6K+ stars. Python SDK. MIT.
这个资产会安全暂存
这个资产会先安全暂存。复制的指令会要求 Agent 读取暂存文件,并在激活脚本、MCP 配置或全局配置前先确认。
npx -y tokrepo@latest install 0edfad7e-d0f4-4be8-87a0-280c8e3e1129 --target codex先暂存文件;激活前需要读取暂存 README 和安装计划。
What it is
MCP-Use is a full-stack Python framework for building Model Context Protocol (MCP) applications. It provides the SDK, server runtime, and client libraries needed to create MCP servers and applications that work with ChatGPT, Claude, and any MCP-compatible AI agent. MCP-Use handles protocol compliance, tool registration, and message routing.
MCP-Use is for AI developers who want to build MCP servers or full-stack MCP applications without dealing with low-level protocol details.
The project is actively maintained with regular releases and a growing user community. Documentation covers common use cases, and the open-source nature means you can inspect the source code, contribute fixes, and adapt the tool to your specific requirements.
How it saves time or tokens
Implementing the MCP specification from scratch requires handling JSON-RPC transport, tool schema registration, SSE streaming, and authentication. MCP-Use provides all of this as a Python SDK. You define your tools as decorated functions and MCP-Use handles the protocol layer, reducing development time from days to hours.
How to use
- Install MCP-Use via pip or uv.
- Define your MCP tools as Python functions with the
@tooldecorator. - Run the MCP server and connect it to your AI agent.
Example
from mcp_use import MCPServer, tool
server = MCPServer(name='my-tools')
@server.tool
def search_database(query: str) -> str:
'''Search the internal database for matching records.'''
results = db.search(query)
return f'Found {len(results)} results: {results[:5]}'
@server.tool
def create_ticket(title: str, description: str) -> str:
'''Create a support ticket in the issue tracker.'''
ticket = tracker.create(title=title, description=description)
return f'Created ticket #{ticket.id}'
if __name__ == '__main__':
server.run()
Related on TokRepo
- AI Tools for Agents -- Agent frameworks and MCP tools
- MCP Integrations -- MCP server integrations on TokRepo
Common pitfalls
- MCP tool descriptions are sent as part of the prompt to the AI model. Vague descriptions lead to incorrect tool calls. Write precise, specific descriptions for each tool.
- MCP-Use servers run as long-lived processes. If your tools make external API calls, implement proper error handling and timeouts to prevent the server from hanging.
- The MCP protocol version matters. Ensure your MCP-Use version matches the protocol version expected by your AI agent client.
Before adopting this tool, evaluate whether it fits your team's existing workflow. Read the official documentation thoroughly, and start with a small proof-of-concept rather than a full migration. Community forums, GitHub issues, and Stack Overflow are valuable resources when you encounter edge cases not covered in the documentation.
常见问题
MCP-Use creates MCP-compliant servers that work with any MCP-compatible client, including Claude Desktop, ChatGPT plugins, Cursor, and custom agents built with the MCP client SDK.
MCP-Use provides higher-level abstractions for building full-stack applications, including server management, tool composition, and client utilities. The official MCP SDK provides lower-level protocol primitives.
Yes. MCP-Use servers can be deployed as standalone processes, Docker containers, or behind a reverse proxy. For production use, configure proper authentication and rate limiting.
Yes. MCP-Use supports Server-Sent Events (SSE) for streaming tool responses back to the client. This is useful for long-running tools that produce incremental output.
Yes. MCP-Use is open source under the MIT license. The full SDK, server runtime, and examples are available on GitHub.
引用来源 (3)
- MCP-Use GitHub— MCP-Use is a full-stack framework for MCP applications
- MCP Specification— Model Context Protocol specification
- Anthropic MCP Docs— MCP enables AI agents to interact with external tools
讨论
相关资产
mcp-use — Fullstack MCP Framework for AI Agents & Apps
Build MCP servers and apps for ChatGPT, Claude, and any LLM with TypeScript or Python SDK. Includes inspector, cloud deploy, and interactive widgets.
bolt.diy — AI Full-Stack App Builder, Any LLM
Community fork of Bolt.new. Prompt, edit, and deploy full-stack web apps with any LLM provider. 19K+ GitHub stars.
Argo CD MCP — Manage Argo Apps via MCP
Argo CD MCP server connects MCP clients to Argo CD app/resource operations over stdio/HTTP; verified 462★ and pushed 2026-05-03.
mcp2cli — Turn MCP Servers into CLI Tools, Zero Codegen
Convert any MCP server, OpenAPI spec, or GraphQL endpoint into a full CLI at runtime. Saves 96-99% of tokens wasted on tool schemas every turn.