mcp-use
社区使用中by mcp-use
mcp-use 是一个全栈 TypeScript 框架,用于构建、测试和部署 MCP 服务器、ChatGPT 插件及 Claude 连接器。它提供完全类型化的 Zod schema 流、原生 React Views 绑定、内置 Inspector 调试工具,并支持 Agent-first 的无头开发模式,可显著提升 MCP 应用的开发效率。
安装配置
将以下配置添加到你的 AI 编程助手中
预览配置(粘贴到 claude_desktop_config.json 或 Cursor 设置中)
{
"mcpServers": {
"mcp-use": {}
}
}启动命令
npx -y create-mcp-use-app@latestJSON配置
{}描述
用于 MCP 的 TypeScript 框架
构建、测试并交付 MCP 服务器、ChatGPT 插件和 Claude 连接器
完全类型化,原生支持 Views 和 MCP Apps,内置 Inspector,并提供一流的 Agent 体验。
[!NOTE] 正在从 v1 迁移?把它交给你的 agent:
Migrate this mcp-use project to v2 following https://docs.mcp-use.com/v2/typescript/server/migration
快速开始
从你的 Agent 开始
Build an MCP server: https://mcp-use.com/prompt.md
从代码开始
npx -y create-mcp-use-app@latest
在生成的项目中运行 npm run dev · 打开 http://localhost:3000/mcp/inspector
交付 MCP 所需的一切
| 完全类型化 | 原生 Views | | --- | --- | | Zod schema 从工具流向结构化结果、View props 和工具调用。 | 将 React Views 直接绑定到工具,无需自定义扩展接线即可交付交互式应用。 | | Agent 优先且无头(headless) | 内置调试工具 | | 通过你的 agent 完成脚手架搭建、调用、检查、截图和部署。 | 在浏览器中或通过 CLI 以无头方式检查工具和 Views。 |
快速入门
脚手架为你提供服务器、TypeScript 配置、开发脚本、Inspector 和 React 视图管道。启动一次后,MCP 端点还会提供一个客户端就绪的落地页,其中包含连接 URL 和设置说明。
用如下绑定视图的工具替换其中的 index.ts:
index.ts — 服务器入口文件,用于工具定义和元数据
import { MCPServer } from "mcp-use";
import { z } from "zod";
const server = new MCPServer({
name: "weather-app",
title: "Weather App",
version: "1.0.0",
});
const weatherInput = z.object({
city: z.string().describe("City to look up"),
});
const weatherOutput = z.object({
city: z.string(),
temperature: z.number(),
conditions: z.string(),
});
export const getWeather = server.tool(
{
name: "get-weather",
title: "Get weather",
description: "Get the current weather for a city",
inputSchema: weatherInput,
outputSchema: weatherOutput,
view: { name: "weather-card" },
annotations: {
readOnlyHint: true,
destructiveHint: false,
openWorldHint: true,
},
},
async ({ city }) => {
const weather = {
city,
temperature: 22,
conditions: "Sunny",
};
return {
content: [
{
type: "text",
text: `Weather in ${city}: ${weather.conditions}, ${weather.temperature}°C`,
},
],
structuredContent: weather,
};
},
);
export default server;
为你的工具添加 Views
创建 views/weather-card/view.tsx。目录名称与工具上的 view.name 匹配:
统计信息
10k
星标
1.4k
Fork
TypeScript
语言
2026/8/18
更新
MIT
开源协议
标签
相关服务器
mcp-server-guide
Figma MCP server 将 Figma 设计文件中的设计信息直接提供给 AI 代理,使其能够基于设计生成代码、提取设计上下文(如变量、组件和布局数据),并支持通过 Code Connect 复用实际组件以提升代码一致性。该指南详细介绍了在 VS Code、Cursor 等 MCP 客户端中的安装与配置步骤,并说明了速率限制和 Beta 功能(如写入画布)的注意事项。
openapi-mcp-server
openapi-mcp-server 是一个基于 Model Context Protocol (MCP) 的服务器,专为 Claude 和 Cursor 等 AI 工具设计,用于通过简单语言搜索和探索 OpenAPI 规范。它通过三步流程帮助 AI 识别 OpenAPI 标识、获取简明摘要并确定所需端点,支持 JSON 和 YAML 格式,显著降低复杂 API 的理解与集成门
mcp-notion-server
mcp-notion-server 是一个基于 TypeScript 的 Model Context Protocol (MCP) 服务器,用于将 Notion API 连接到 MCP 兼容客户端(如 Claude Desktop)。它提供搜索、页面读取、数据源查询与创建、页面编辑等工具,并支持结构化结果和可选的 MCP Apps,帮助 AI 代理高效地读写 Notion 工作
drawio-mcp-server
drawio-mcp-server 是一个基于 Model Context Protocol (MCP) 的服务器,让 AI 代理能够通过 MCP 工具以编程方式创建、读取、更新和删除 Draw.io 图表元素,实现架构图、流程图和视觉文档的自动生成。它提供内置 Draw.io 编辑器或浏览器扩展两种使用方式,支持多文档多页面管理、Mermaid 导入、XML/SVG/PNG
