Get the FREE Ultimate OpenClaw Setup Guide →

mcp

mcp server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio sandy-mount-mcp-server npx mcp-server

How to use

The mcp-server is a lightweight JSON-RPC 2.0 server that implements the Model-Client-Protocol (MCP). It exposes a simple echo tool out of the box, allowing clients to send JSON-RPC requests and receive responses that mirror their input. The server enables CORS to allow cross-origin requests, making it convenient to call from web frontends or other services. To interact with the server, you’ll send standard JSON-RPC 2.0 requests, for example a method named echo with a string or payload, and the server will respond with the same payload. By default, the server runs on port 4333, so ensure your client targets that port unless you configure a different one.

Typical usage involves sending a request like {"jsonrpc": "2.0", "method": "echo", "params": {"message": "hello"}, "id": 1} and receiving a response that echoes back the message. You can leverage the built-in initialization flow to boot the server and then query the available methods or tools through the MCP’s JSON-RPC interface. If you’re building a client, you can use any JSON-RPC 2.0 library and simply point requests at http://localhost:4333 or the appropriate host/port if you’ve configured a different location.

How to install

Prerequisites:

  • Node.js (and npm) installed on your system
  • Access to the internet to fetch the package from npm
  1. Install the MCP server package globally or locally in your project:
npm install mcp-server
  1. Run the server using npx (as shown in the Quick Start) or run after installation:
npx mcp-server

By default, the server will start on port 4333. If you want to customize the port, check the package documentation for environment variables or startup flags and set them accordingly before launching.

  1. (Optional) Verify installation by querying the server’s health or echo method using a JSON-RPC client to http://localhost:4333. If you installed locally, you can also run a one-off request with curl once the server is running:
curl -s -X POST http://localhost:4333/ \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"echo","params":{"message":"ping"},"id":1}'
  1. If you prefer to run the server in your project scripts, add a script to package.json and invoke npm run start (ensure mcp-server is in your dependencies).

Additional notes

Notes and tips:

  • Default port is 4333; configure a different port if needed by the server’s options/environment variables.
  • The server enables CORS by default, useful for browser-based clients, but consider restricting origins in production.
  • The built-in echo tool is the primary capability; MCP is designed to be extensible, so additional methods may be available depending on versions or extensions.
  • If you encounter issues connecting, verify network/firewall settings and ensure the server process is running.
  • Check the npm package page for mcp-server for any version-specific features or additional configuration options.

Related MCP Servers

Sponsor this space

Reach thousands of developers