SO

shanejonas/openrpc-mcp-server

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

42 stars 13 forks 质量 62 趋势 0Apache-2.0

shanejonas/openrpc-mcp-server 是从 https://github.com/shanejonas/openrpc-mcp-server. 导入的 MCP 服务器候选服务器。

概览

shanejonas/openrpc-mcp-server 是从 https://github.com/shanejonas/openrpc-mcp-server. 导入的 MCP 服务器候选服务器。

概述(AI 翻译)

一个模型上下文协议(MCP)服务器,通过 OpenRPC 提供 JSON-RPC 功能。

https://github.com/user-attachments/assets/3447175a-f921-4ded-8250-b611edb2fb67

特色

工具

  • rpc_call - 调用任意的JSON-RPC方法
  • 指定服务器URL、方法名称和参数
  • 返回JSON格式的结果
  • rpc_discover - 发现可用的 JSON-RPC 方法
  • 使用 OpenRPC 的 rpc.discover 规范
  • 列出给定服务器上的所有方法

发展

安装依赖:

搭建服务器:

关于自动重建的开发:

安装

要配合Claude Desktop使用,添加服务器配置:

在MacOS上:~/Library/Application Support/Claude/claude_desktop_config.json Windows版:%APPDATA%/Claude/claude_desktop_config.json

调试

由于MCP服务器通过stdio通信,调试可能具有挑战性。我们建议使用MCP检查器:

检查器会提供一个访问浏览器调试工具的网址。

本页由 AI 翻译,技术细节请以原文为准。

README

OpenRPC MCP Server

A Model Context Protocol (MCP) server that provides JSON-RPC functionality through OpenRPC.

https://github.com/user-attachments/assets/3447175a-f921-4ded-8250-b611edb2fb67

Features

Tools

  • rpc_call - Call arbitrary JSON-RPC methods
    • Specify server URL, method name, and parameters
    • Returns JSON-formatted results
  • rpc_discover - Discover available JSON-RPC methods
    • Uses OpenRPC’s rpc.discover specification
    • Lists all methods on a given server

Development

Install dependencies:

npm install

Build the server:

npm run build

For development with auto-rebuild:

npm run watch

Installation

To use with Claude Desktop, add the server config:

On MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json On Windows: %APPDATA%/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "openrpc": {
      "command": "npx",
      "args": ["-y", "openrpc-mcp-server"]
    }
  }
}

Debugging

Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the MCP Inspector:

npm run inspector

The Inspector will provide a URL to access debugging tools in your browser.

在 GitHub 查看完整 README

安装

npx -y openrpc-mcp-server
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "openrpc": { "command": "npx", "args": ["-y", "openrpc-mcp-server"] } } }