
0itsuki0/mcpdemo-typescript- 是从 https://github.com/0itsuki0/mcpdemo-typescript-. 导入的 MCP 服务器候选
概览
0itsuki0/mcpdemo-typescript- 是从 https://github.com/0itsuki0/mcpdemo-typescript-. 导入的 MCP 服务器候选
概述(AI 翻译)
更多细节请参见我的文章:
- 开始使用模型上下文协议。
- MCP服务器和客户端,支持SSE和新的可流式HTTP
- MCP授权:全新的RS与AS分离!
目录
- 带标准的MCP
- 服务器
- 带客户端托管
- MCP 与 SSE 合作
- 服务器
- 客户
- 带有可流式HTTP的MCP
- 服务器
- 客户
- 带授权的MCP(可流式HTTP)
- 授权服务器
- MCP 资源服务器
- MCP 客户端
本地MCP带标准
本地MCP服务器
一个向MCP主机暴露create-mcp-server-app工具的MCP服务器。
通过运行该工具,无论是在 Claude for Desktop 还是其他主机上,桌面文件夹中都会创建一个新的项目,用于创建包含必要设置和示例代码的 MCP 服务器。
示例代码将包括以下内容。
- 创建服务器实例
- 定义可用工具
- 处理工具执行
- 启动服务器
布置
- 运行
npm install以安装必要的依赖 - 运行
npm run build以构建项目 build/index.js服务器路径将在MCP主机中建立
用Claude测试桌面版
- 下载桌面版Claude
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Demo of Model Context Protocol
For more details, please refer to my article:
- Get Start with Model Context Protocol.
- MCP Server and Client with SSE & The New Streamable HTTP
- MCP Authorization: The NEW RS and AS Separation!
Table of Contents
Local MCP with stdio
Local MCP Server
An MCP server that exposes a create-mcp-server-app tool to MCP hosts.
By running this tool, either with Claude for Desktop or some other host, a new project for creating an MCP server with necessary set ups and sample code will be created in the desktop folder.
Sample Code will include the following.
- creating a server instance
- defining available tools
- handling tools execution
- starting the server
Set Up
- Run
npm installto install necessary dependency - Run
npm run buildto build the project build/index.jswill the server path to set up in the MCP host
Test with Claude for desktop
- Download Claude for Desktop
- Open the configuration file at
~/Library/Application Support/Claude/claude_desktop_config.json- If the file does not exist, create one with the same name
- Add server configuration
{
"mcpServers": {
"create-mcp-app": {
"command": "node",
"args": [
"/absolute-path-to/build/index.js"
]
}
}
}
- Save the file and restart Claude for Desktop.
- Enter the prompt create a new mcp server project. You should see a sample MCP Server project created at desktop directory with some responses indicating the success.
Local Host with MCP Clients
An OpenAI-chatbot host that uses MCP clients to connect to MCP servers.
Set up
- Set up
OPENAI_API_KEYin.env. - Add MCP server configurations to connect the host in
server-config.json.
{
"some-server-name-1": {
"command": "node",
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →