Skip to main content
Glama
shanejonas

openrpc-mpc-server

by shanejonas

rpc_call

Execute JSON-RPC methods on remote servers by specifying the server URL, method name, and parameters to interact with JSON-RPC APIs.

Instructions

Call any JSON-RPC method on a server with parameters. A user would prompt: Call method on with params

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
serverYesServer URL
methodYesJSON-RPC method name to call
paramsNoStringified Parameters to pass to the method

Implementation Reference

  • The switch case handling 'rpc_call': extracts server URL, method, and params from arguments; creates HTTPTransport and Client from @open-rpc/client-js; calls the JSON-RPC method; returns the result as a text content block with formatted JSON.
    case "rpc_call": { const server = String(request.params.arguments?.server); const method = String(request.params.arguments?.method); const params = JSON.parse(String(request.params.arguments?.params)); let transport = new HTTPTransport(server); let client = new Client(new RequestManager([transport])); const results = await client.request({ method: method, params: params as any}); return { toolResult: { content: [{ type: "text", text: JSON.stringify(results, null, 2) }], isError: false } }; }
  • src/index.ts:45-67 (registration)
    Registers the 'rpc_call' tool in the ListTools response, including its name, description, and inputSchema defining server (string, required), method (string, required), and optional stringified params.
    { name: "rpc_call", description: "Call any JSON-RPC method on a server with parameters. A user would prompt: Call method <method> on <server url> with params <params>", inputSchema: { type: "object", properties: { server: { type: "string", description: "Server URL" }, method: { type: "string", description: "JSON-RPC method name to call" }, // this is a bit of a hack since claude seems to have issues with nested parameters params: { type: "string", description: "Stringified Parameters to pass to the method" } }, required: ["server", "method"] } },
  • Input schema for rpc_call tool: object with required 'server' and 'method' strings, optional 'params' as string (JSON stringified).
    inputSchema: { type: "object", properties: { server: { type: "string", description: "Server URL" }, method: { type: "string", description: "JSON-RPC method name to call" }, // this is a bit of a hack since claude seems to have issues with nested parameters params: { type: "string", description: "Stringified Parameters to pass to the method" } }, required: ["server", "method"] }

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/shanejonas/openrpc-mpc-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server