Token导航 LogoToken导航TokenDH.com
Zen Citizen MCP logo
AI代理stdio官方级别未说明来源级核验

Zen Citizen MCP

MCP Server

create-mcp-use-app@latest

mcp-use是一个全栈MCP框架,用于为ChatGPT/Claude构建MCP应用和为AI代理构建MCP服务器。

工具数

2

提示词数

0

GitHub Stars

0

资源数

0
AI代理TypeScriptClaudeChatGPT集成ClaudeCursor

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

Mallikarjun63

提供方

Mallikarjun63

最后核验

2026/5/17 20:21

运行时

Node.js

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

npx create-mcp-use-app@latest

详细介绍

关于

mcp使用 是全栈MCP框架 为ChatGPT/Claude构建MCP应用程序,为AI代理构建MCP服务器。

  • 部署宏发MCP云:连接您的GitHub仓库,让您的MCP服务器和应用程序在生产环境中运行,并具有可观察性、指标、日志、分支部署等功能

文档

访问我们的 文档 或者跳到快速入门(TypeScript | python)

编码代理的技能

使用Claude Code、Codex、Cursor或其他AI编码代理? 安装mcp应用程序的mcp使用技巧

快速入门:MCP服务器和MCP应用程序

TypeScript

构建您的第一个MCP服务器或MPC应用程序:

npx create-mcp-use-app@latest

或者手动创建服务器:

import { MCPServer, text } from "mcp-use/server";
import { z } from "zod";

const server = new MCPServer({
  name: "my-server",
  version: "1.0.0",
});

server.tool({
  name: "get_weather",
  description: "Get weather for a city",
  schema: z.object({ city: z.string() }),
}, async ({ city }) => {
  return text(`Temperature: 72°F, Condition: sunny, City: ${city}`);
});

await server.listen(3000);
// Inspector at http://localhost:3000/inspector

→ 完整的TypeScript服务器文档

MCP应用程序

MCP应用程序允许您构建跨Claude、ChatGPT和其他MCP客户端工作的交互式小部件——一次编写,随处运行。

服务器:定义一个工具并将其指向一个小部件:

import { MCPServer, widget } from "mcp-use/server";
import { z } from "zod";

const server = new MCPServer({
  name: "weather-app",
  version: "1.0.0",
});

server.tool({
  name: "get-weather",
  description: "Get weather for a city",
  schema: z.object({ city: z.string() }),
  widget: "weather-display", // references resources/weather-display/widget.tsx
}, async ({ city }) => {
  return widget({
    props: { city, temperature: 22, conditions: "Sunny" },
    message: `Weather in ${city}: Sunny, 22°C`,
  });
});

await server.listen(3000);

小部件:在中创建一个React组件 resources/weather-display/widget.tsx:

import { useWidget, type WidgetMetadata } from "mcp-use/react";
import { z } from "zod";

const propSchema = z.object({
  city: z.string(),
  temperature: z.number(),
  conditions: z.string(),
});

export const widgetMetadata: WidgetMetadata = {
  description: "Display weather information",
  props: propSchema,
};

const WeatherDisplay: React.FC = () => {
  const { props, isPending, theme } = useWidget>();
  const isDark = theme === "dark";

  if (isPending) return 
Loading...
;

  return (
    

      
{props.city}

      
{props.temperature}° — {props.conditions}

    

  );
};

export default WeatherDisplay;

小工具在 resources/自动发现 --无需手动注册。

访问 MCP应用程序文档

______________________________________________________________________

python

pip install mcp-use
from typing import Annotated

from mcp.types import ToolAnnotations
from pydantic import Field

from mcp_use import MCPServer

server = MCPServer(name="Weather Server", version="1.0.0")

@server.tool(
    name="get_weather",
    description="Get current weather information for a location",
    annotations=ToolAnnotations(readOnlyHint=True, openWorldHint=True),
)
async def get_weather(
    city: Annotated[str, Field(description="City name")],
) -> str:
    return f"Temperature: 72°F, Condition: sunny, City: {city}"

# Start server with auto-inspector
server.run(transport="streamable-http", port=8000)
# 🎉 Inspector at http://localhost:8000/inspector

→ 完整的Python服务器文档

______________________________________________________________________

检查员

mcp-use Inspector允许您交互式地测试和调试mcp服务器。

包括汽车 使用时 server.listen():

server.listen(3000);
// Inspector at http://localhost:3000/inspector

在线的 连接到托管的MCP服务器时:

访问https://inspector.mcp-use.com

独立:检查任何MCP服务器:

npx @mcp-use/inspector --url http://localhost:3000/mcp

访问 检查员文件

______________________________________________________________________

部署

将MCP服务器部署到生产环境:

npx @mcp-use/cli login
npx @mcp-use/cli deploy

或者将您的GitHub仓库连接到 manufact.com --生产就绪,具有可观察性、度量、日志和分支部署。

______________________________________________________________________

包装概述

这个monorepo包含Python和TypeScript的多个包:

Python 包

描述版本
mcp使用完整的MCP服务器和MCP代理SDK![PyPI](https://pypi.org/project/mcp_use/)

TypeScript软件包

描述版本
mcp使用MCP服务器、MCP应用程序和MCP代理的核心框架](https://www.npmjs.com/package/mcp-use)
@mcp使用/cli带有热装和自动检查器的构建工具](https://www.npmjs.com/package/@mcp-use/cli)
@mcp使用/检查员用于MCP服务器的基于Web的预览器和调试器](https://www.npmjs.com/package/@mcp-use/inspector)
创建mcp使用应用程序项目脚手架工具](https://www.npmjs.com/package/create-mcp-use-app)

______________________________________________________________________

另外:MCP代理和客户

mcp的使用还提供了完整的mcp代理和客户端实现。

Build an AI Agent

python

pip install mcp-use langchain-openai
import asyncio
from langchain_openai import ChatOpenAI
from mcp_use import MCPAgent, MCPClient

async def main():
    config = {
        "mcpServers": {
            "filesystem": {
                "command": "npx",
                "args": ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"]
            }
        }
    }

    client = MCPClient.from_dict(config)
    llm = ChatOpenAI(model="gpt-4o")
    agent = MCPAgent(llm=llm, client=client)

    result = await agent.run("List all files in the directory")
    print(result)

asyncio.run(main())

→ 完整的Python代理文档

TypeScript

npm install mcp-use @langchain/openai
import { ChatOpenAI } from "@langchain/openai";
import { MCPAgent, MCPClient } from "mcp-use";

async function main() {
  const config = {
    mcpServers: {
      filesystem: {
        command: "npx",
        args: ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"],
      },
    },
  };

  const client = MCPClient.fromDict(config);
  const llm = new ChatOpenAI({ modelName: "gpt-4o" });
  const agent = new MCPAgent({ llm, client });

  const result = await agent.run("List all files in the directory");
  console.log(result);
}

main();

→ 完整的TypeScript代理文档

Use MCP Client

python

import asyncio
from mcp_use import MCPClient

async def main():
    config = {
        "mcpServers": {
            "calculator": {
                "command": "npx",
                "args": ["-y", "@modelcontextprotocol/server-everything"]
            }
        }
    }

    client = MCPClient.from_dict(config)
    await client.create_all_sessions()

    session = client.get_session("calculator")
    result = await session.call_tool(name="add", arguments={"a": 5, "b": 3})

    print(f"Result: {result.content[0].text}")
    await client.close_all_sessions()

asyncio.run(main())

→ Python客户端文档

TypeScript

import { MCPClient } from "mcp-use";

async function main() {
  const config = {
    mcpServers: {
      calculator: {
        command: "npx",
        args: ["-y", "@modelcontextprotocol/server-everything"],
      },
    },
  };

  const client = new MCPClient(config);
  await client.createAllSessions();

  const session = client.getSession("calculator");
  const result = await session.callTool("add", { a: 5, b: 3 });

  console.log(`Result: ${result.content[0].text}`);
  await client.closeAllSessions();
}

main();

→ TypeScript客户端文档

______________________________________________________________________

符合模型上下文协议

______________________________________________________________________

社区与支持

______________________________________________________________________

星迹

![Star History Chart](https://www.star-history.com/#mcp-use/mcp-use&Date)

______________________________________________________________________

贡献者

感谢我们所有出色的贡献者!

核心贡献者

  1. 彼得罗 (@皮埃特罗祖洛)
  2. 路易吉 (@函数=随机(浮点)@描述=随机(浮点数)@描述=RAND(浮点))
  3. 恩里科 (@tonxxd)

______________________________________________________________________

Built with ❤️ by Manufact team and the mcp-use community

San Francisco | Zürich

目录标签

目录标签

AI代理TypeScriptClaudeChatGPT集成全栈框架本地部署MCP应用开发Claude集成

支持客户端

ClaudeCursor

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

session

运行时(runtime,运行环境)

Node.js

来源包(packageName,安装包名)

create-mcp-use-app@latest

工具数量(toolCount,工具数)

2

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdiosession部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP