这是一个通过 OpenRPC 提供 JSON-RPC 功能的模型上下文协议(MCP)服务器。
https://github.com/user-attachments/assets/3447175a-f921-4ded-8250-b611edb2fb67
rpc_call - 调用任意 JSON-RPC 方法
rpc_discover - 发现可用的 JSON-RPC 方法
rpc.discover 规范安装依赖:
npm install
构建服务器:
npm run build
开发时自动重建:
npm run watch
要在 Claude Desktop 中使用,请添加服务器配置:
在 MacOS 上:~/Library/Application Support/Claude/claude_desktop_config.json
在 Windows 上:%APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"openrpc": {
"command": "npx",
"args": ["-y", "openrpc-mcp-server"]
}
}
}
由于 MCP 服务器通过标准 I/O 进行通信,调试可能会比较困难。我们推荐使用 MCP Inspector:
npm run inspector
Inspector 将提供一个 URL,以便您可以在浏览器中访问调试工具。