MCP JSON-RPC Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP JSON-RPC Serverecho back 'Hello, world!'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP JSON-RPC Client and Server Example
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.
Overview
Server (
server.js):Listens on TCP port 4000.
Implements two JSON‑RPC methods:
initialize: Returns a basic capabilities object (advertising an "echo" tool).echo: Echoes back the parameters provided by the client.
Client (
client.js):Connects to the server on port 4000.
Sends an
initializerequest followed by anechorequest.Logs the responses received from the server.
Related MCP server: Echo MCP Server
Prerequisites
Node.js installed on your system (v10 or later is recommended).
Getting Started
Installing via Smithery
To install MCP JSON-RPC Client and Server Example for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @melvincarvalho/mcpjs --client claudeManual Installation
Clone the Repository:
git clone https://github.com/sandy-mount/mcpjs.git cd mcp-jsonrpc-exampleRun the Server:
Open a terminal window and run:
node server.jsYou should see a message like:
Server listening on port 4000Run the Client:
Open another terminal window and run:
node client.jsThe client will connect to the server, send the initialize and echo requests, and display the responses.
How It Works
The server listens for incoming TCP connections on port 4000. When it receives a JSON‑RPC message (each terminated by a newline), it processes the request:
For the
initializemethod, it returns a JSON‑RPC response with basic capabilities and server info.For the
echomethod, it returns the parameters that were sent in the request.If an unknown method is requested, it responds with a JSON‑RPC error.
The client connects to the server, sends a JSON‑RPC
initializerequest, waits a short time, and then sends anechorequest. Responses from the server are printed to the console.
Files
server.js — The JSON‑RPC server implementation.
client.js — The JSON‑RPC client implementation.
Customization
You can extend this example by:
Adding more JSON‑RPC methods to the server.
Implementing additional error handling and logging.
Experimenting with different transport protocols or adding TLS support.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Contributing
Feel free to open issues or submit pull requests with improvements or suggestions.
Happy coding!
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseCqualityDmaintenanceA Node.js-based MCP server implementing JSON-RPC 2.0, allowing users to generate random US State and signature soup combinations through a fun and simple tool.Last updated12,9551ISC
- Flicense-qualityDmaintenanceA simple demonstration MCP server that provides an echo tool and resource for learning how to build MCP servers. Serves as a starting point and template for creating custom MCP server implementations.Last updated
- Flicense-qualityDmaintenanceA Model Context Protocol (MCP) server designed for learning and experimentation. It provides a foundational setup for developers to build, run, and debug MCP server implementations using Node.js.Last updated
- Flicense-qualityCmaintenanceAn educational MCP server that teaches implementing the Model Context Protocol from scratch, enabling AI models to discover and invoke tools via JSON-RPC over stdio.Last updated
Related MCP Connectors
MCP server for understanding Javascript internals from ECMAScript specification.
A basic MCP server to operate on the Postman API.
A very simple remote MCP server that greets you, with a custom icon.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/melvincarvalho/mcpjs'
If you have feedback or need assistance with the MCP directory API, please join our Discord server