Run a Node — Step-by-step gateway setup from source | OpenSMM

Run a node in 5 minutes

A gateway node is a single process serving REST /v0 and MCP /mcp on one port, with no keys and no external services. It runs directly from a checkout of the protocol repository with Node.js ≥ 22.18.

Choose your launch method

Compare options to launch an OpenSMM gateway node: cloud browser instance, single-command container, or native checkout from source.

Method Time Cost Environment Launch command Action
Docker Compose 2 min 0 ₽ Local Docker docker compose up (one command) Docker guide
From source 5 min 0 ₽ Node.js ≥ 22.18 npm ci && npm run gateway Step-by-step ↓

1. Clone and install

Clone the protocol repository and install dependencies with npm ci. Node.js ≥ 22.18 is required because it supports native TypeScript type stripping without flags.

bash
git clone https://github.com/opensmm-protocol/mcp-server.git
cd mcp-server
npm ci

2. Start the gateway node

Launch the gateway server. By default, it binds to port 8080 and boots against the built-in MockProvider catalog.

bash
npm run gateway

The node reports its listening port on stderr:

stderr
OpenSMM 0.1.0 gateway listening on http://localhost:8080 (REST /v0, MCP /mcp; provider: mock, mock catalog — not real supply)

3. Check the node (REST and MCP)

Verify that your node is answering requests on both transports. Check GET /v0/services to inspect the catalog and POST /mcp for JSON-RPC MCP initialization.

bash
curl -s http://localhost:8080/v0/services | head -30   # every service has "synthetic": true
curl -s http://localhost:8080/v0/providers             # provider-alpha, synthetic: true
curl -s -X POST http://localhost:8080/mcp \
  -H 'content-type: application/json' -H 'accept: application/json, text/event-stream' \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"qa","version":"1"}}}'   # serverInfo.name = "opensmm"
node scripts/node-census.mjs --url http://127.0.0.1:8080   # "status": "up"

The catalog you see is the mock catalog: every service carries "synthetic": true. It exists to exercise the protocol end to end without placing real orders or spending balances. The live catalog appears when you connect a real provider via OPENSMM_REST_V1_*.

4. Census & node definition

The OpenSMM protocol tracks active independent nodes for network decentralization. A public URL is counted as an active node when both checks pass:

  • GET <url>/v0/services returns HTTP 200 with a JSON services array.
  • POST <url>/mcp with initialize (JSON-RPC) returns HTTP 200 with a JSON-RPC result.

Full census rules, weekly measurement lines, and census scripts are documented in docs/NODES.md.