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.
这个资产会安全暂存
这个资产会先安全暂存。复制的指令会要求 Agent 读取暂存文件,并在激活脚本、MCP 配置或全局配置前先确认。
npx -y tokrepo@latest install bb0eb5f4-1bd4-4887-ae1d-a4788b20075e --target codex先暂存文件;激活前需要读取暂存 README 和安装计划。
What it is
mcp-use is a fullstack MCP (Model Context Protocol) framework for building servers and applications that work with ChatGPT, Claude, and any LLM that supports MCP. It provides both TypeScript and Python SDKs, an interactive inspector for debugging, cloud deployment tooling, and UI widgets for building agent interfaces.
The framework targets developers building MCP-powered tools who want a structured approach rather than wiring raw protocol handlers manually. It handles transport, serialization, tool registration, and client-side rendering so you can focus on the business logic of your MCP tools.
How it saves time or tokens
Building an MCP server from scratch requires understanding the protocol specification, implementing JSON-RPC transport, handling tool schemas, and managing lifecycle events. mcp-use abstracts these layers into a declarative SDK where you define tools as functions and the framework handles everything else. The inspector lets you test tools interactively before connecting to an LLM, catching issues early. Cloud deploy packages your server as a container with a single command.
How to use
- Create a new MCP app with TypeScript:
npx create-mcp-use-app@latest
Or install the Python SDK:
pip install mcp-use
- Define a tool in your server:
import { McpServer } from 'mcp-use';
const server = new McpServer({ name: 'my-tools' });
server.tool('get_weather', {
description: 'Get current weather for a city',
parameters: { city: { type: 'string' } },
handler: async ({ city }) => {
const data = await fetchWeather(city);
return { temperature: data.temp, condition: data.condition };
}
});
server.start();
- Test with the inspector, then add to your AI assistant's MCP config.
Example
Python SDK example:
from mcp_use import McpServer
server = McpServer(name='my-tools')
@server.tool(description='Search documents by query')
def search_docs(query: str, limit: int = 10):
results = db.search(query, limit=limit)
return [{'title': r.title, 'snippet': r.snippet} for r in results]
server.start()
Related on TokRepo
- MCP Chrome Integration — browser automation through MCP
- MCP GitHub Integration — GitHub access via MCP protocol
Common pitfalls
- The TypeScript and Python SDKs have slightly different API surfaces; do not assume code translates directly between them
- Cloud deploy requires Docker; ensure your tool dependencies are included in the container build
- Interactive widgets are client-side only and do not work in headless MCP connections from CLI tools like Claude Code
常见问题
MCP (Model Context Protocol) is a standard protocol for connecting AI assistants to external tools and data sources. It defines how an LLM discovers, calls, and receives results from tools. mcp-use makes building MCP-compatible tools straightforward.
Any LLM client that supports MCP can connect to mcp-use servers. This includes Claude (via Claude Code and Claude Desktop), ChatGPT (with MCP plugin support), and custom clients using the MCP SDK.
Yes. mcp-use includes cloud deployment tooling that packages your server as a Docker container. You can deploy to any container hosting platform including AWS ECS, Google Cloud Run, or Railway.
The inspector provides a web UI where you can call your MCP tools interactively, see the request/response payloads, and debug issues without connecting an LLM. It runs locally alongside your development server.
mcp-use implements the MCP specification and is interoperable with servers and clients built using the official Anthropic MCP SDK. You can mix mcp-use servers with official SDK clients and vice versa.
引用来源 (3)
- mcp-use GitHub— mcp-use fullstack MCP framework
- MCP Specification— Model Context Protocol specification
- Anthropic Docs— Anthropic MCP documentation
TokRepo 相关
来源与感谢
讨论
相关资产
mcp-use — Fullstack SDK for MCP Servers & Apps
mcp-use is a fullstack SDK to build MCP servers and MCP apps across Claude/ChatGPT, with inspector + quickstarts. Verified 9952★; pushed 2026-05-14.
WhatsApp MCP Server — Chat with WhatsApp via AI Agents
MCP server connecting Claude and AI agents to your personal WhatsApp. Search contacts, read messages, send replies and media via natural language.
Apify MCP Server — 8,000+ Web Scrapers for Agents
Apify MCP Server connects agents to Apify Actors via a hosted endpoint (mcp.apify.com) or local run, turning thousands of web scrapers into callable tools.
Notte — Browser Automation MCP for AI Agents
MCP server that turns web browsers into AI agent tools. Notte provides structured browser actions like click, type, navigate, and extract for LLM-driven automation.