空mcp
使用stdio传输的最小MCP(模型上下文协议)服务器支架。
设置
npm install用法
node index.js添加到客户端
将以下内容添加到MCP客户端配置中(例如。 claude_desktop_config.json):
{
"mcpServers": {
"empty-mcp": {
"command": "node",
"args": ["/absolute/path/to/empty-mcp/index.js"]
}
}
}添加工具
在服务器连接到传输之前,在服务器上注册工具:
server.tool("hello", { name: z.string() }, async ({ name }) => ({
content: [{ type: "text", text: `Hello, ${name}!` }]
}));