MCP HubMCP Hub
shanejonas

openrpc-mpc-server

by: shanejonas

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

33created 03/12/2024
Visit
JSON-RPC
OpenRPC

📌Overview

Purpose: To provide a Model Context Protocol (MCP) server that enables JSON-RPC functionality using OpenRPC.

Overview: The OpenRPC MCP Server facilitates the implementation of JSON-RPC methods, allowing developers to create and interact with RPC services efficiently. It supports method discovery and offers an easy way to communicate over standardized RPC protocols.

Key Features:

  • rpc_call: This feature allows users to call arbitrary JSON-RPC methods by specifying the server URL, method name, and parameters. It returns the results in a JSON format, facilitating seamless interaction with RPC services.

  • rpc_discover: This feature enables the discovery of available JSON-RPC methods on a given server utilizing OpenRPC's discovery specification. It provides a comprehensive list of methods, enhancing the usability and accessibility of the server.


OpenRPC MCP Server

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

Features

Tools

  • rpc_call
    Call arbitrary JSON-RPC methods by specifying server URL, method name, and parameters. Returns JSON-formatted results.

  • rpc_discover
    Discover available JSON-RPC methods using 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 configuration:

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

Example config:

{
  "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.