MCP vs REST: ordering SMM services
MCP is one transport of the OpenSMM protocol; REST /v0 is the canonical HTTP binding. The same operation through either produces the same domain objects.
The one rule
One clientReference → one orderId on any transport. REST carries the Idempotency-Key header, MCP the clientReference field. A replay returns the same order; the same key with different parameters returns IDEMPOTENCY_CONFLICT.
bash
# REST: Idempotency-Key header
curl -X POST http://localhost:8080/v0/orders \
-H 'content-type: application/json' -H 'Idempotency-Key: my-order-1' \
-d '{"quoteId":"<quoteId>","link":"https://t.me/example_channel"}'
# MCP: clientReference field of the create_order tool
create_order({"quoteId":"<quoteId>","link":"https://t.me/example_channel","clientReference":"my-order-1"})
Command mapping
- searchServices —
GET /v0/services/search_services - getQuote —
POST /v0/quotes/get_quote - createOrder —
POST /v0/orders/create_order - getOrder —
GET /v0/orders/{id}/get_order_status - cancelOrder —
POST /v0/orders/{id}/cancel/cancel_order - requestRefill —
POST /v0/orders/{id}/refill/request_refill
The full list of ten commands is in SMM API for MCP.
Which to pick
- An agent in Claude Desktop, Cursor, LangChain or n8n — MCP: the node serves
/mcp(Streamable HTTP, sendaccept: application/json, text/event-stream). - A script, backend or cron job — REST
/v0:curlor any HTTP client. - You can mix them: an order created over one transport is visible and pollable over the other.
What is identical on both
- A quote is mandatory before ordering and is consumed exactly once.
paymentStatusandexecutionStatusare two separate state machines.- Creating an order answers HTTP 402 with payment requirements — expected, not a failure.
- Money is decimal strings on integer micro-units, never floats.
- An ambiguous submission becomes
SUBMISSION_UNKNOWNand waits for reconciliation — no blind provider retries.
Honest limitations
- The catalog on the site and on a local node is mock fixtures (
synthetic: true), not real supply. - x402 payments are validated on USDC Base Sepolia — testnet.
- The protocol is version 0.1, with no SLA.
The last step: run your own node
The node is a single process serving REST /v0 and MCP /mcp on one port. You need Node.js ≥ 22.18.
The step-by-step guide, node verification and reporting your node live on the “Run a node” page.