JSON MCP Server

Demonstrates a basic JSON-RPC client and server implementation using Node.js.

Local serverstdio 3

What is the JSON MCP server?

Demonstrates a basic JSON-RPC client and server implementation using Node.js. Exposed over MCP by the json mcp server, that capability becomes something an assistant can invoke while it works, not something you go and do afterwards.

What it actually does

This repository contains a simple, beginner-friendly example of an MCP-inspired JSON‑RPC client and server implemented in JavaScript. The project demonstrates a basic communication flow using Node.js's built‑in modules without any external dependencies.

Its toolset

Everything the assistant can do here goes through one of these:

  • initialize — Returns a basic capabilities object (advertising an "echo" tool)
  • echo — Echoes back the parameters provided by the client
  • server.js — The JSON‑RPC server implementation
  • client.js — The JSON‑RPC client implementation

Configuration

  • Node.js installed on your system (v10 or later is recommended).

Adding it to your client

Installation goes through your MCP client rather than a global install: point it at @smithery/cli on npm and it is fetched when the client starts. The copy-paste blocks for Claude Desktop, Claude Code and Cursor are further down this page.

When to reach for it

Among the developer tooling options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. JSON's toolset — initialize, echo, server.js and 1 more — is a fair guide to whether it matches your workflow. It is maintained by melvincarvalho; worth a glance at recent repository activity before you build anything load-bearing on it.

This entry was verified against JSON's own documentation before publication; SyncDev keeps the directory reviewed rather than auto-generated.

Caveats

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the json mcp server does with a few real requests.

Available tools

ToolWhat it does
initializeReturns a basic capabilities object (advertising an "echo" tool).
echoEchoes back the parameters provided by the client.
server.jsThe JSON‑RPC server implementation.
client.jsThe JSON‑RPC client implementation.

How to install the JSON MCP server

{
  "mcpServers": {
    "json-rpc-client-and-server-example": {
      "command": "npx",
      "args": ["-y", "@smithery/cli"]
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

  • Node.js installed on your system (v10 or later is recommended).

Example prompts to try

  • Use JSON to initialize.
  • Use JSON to echo.
  • Use JSON to server.js.

Frequently asked questions

This example includes a server with 'initialize' and 'echo' methods, a client for sending requests, and uses Node.js built-in modules. It's designed to be beginner-friendly.