ondc-mcp
Officialondc-mcp is a stateless MCP server for testing ONDC network participants end-to-end through mock sessions, flow orchestration, payload validation, and evidence collection.
Run over stdio or Streamable HTTP, including stateless HTTP suitable for round-robin replicas.
Create and inspect mock sessions against a BAP/BPP participant under test, with the server taking the opposite role.
Discover published domains, versions, use-cases, and flows, and inspect full flow sequences and required inputs.
Start, restart, drive, and await ONDC flows, including automatic chaining or manual step-by-step control.
Host or fill forms, and submit form results to advance a flow.
Start/stop the inbound callback receiver and report the callback URL the participant must use.
Validate protocol payloads against ONDC JSON Schema and contextual rules without sending them.
Read recorded payloads, business data, flow status, and session event journal for debugging and compliance evidence.
Configure header signing/validation, JWT or API-key auth, Redis or in-memory state, and health/readiness probes.
Capture incidents and submit/read redacted feedback and issue reports about stuck runs or participant failures.
Click on "Deploy 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., "@ondc-mcp start a new flow for seller onboarding"
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.
ondc-mcp
A production MCP server boilerplate: stdio + Streamable HTTP, built on the MCP TypeScript SDK v2 against spec revision 2026-07-28.
The design goal is horizontal scalability. The 2026-07-28 transport is
stateless — no Mcp-Session-Id, no initialize handshake, no long-lived GET
stream — so any replica can answer any request behind a plain round-robin load
balancer. src/app.test.ts proves it: one instance lists the tools, a second
instance with no shared state executes the call
npm install
cp .env.example .env
npm run dev # HTTP transport on :3000
npm run dev:stdio # stdio transport
npm run inspect # MCP Inspector against the stdio entrypoint
npm run typecheck && npm run lint && npm testLayout
src/
mcp/server.ts buildMcpServer(container, ctx) — THE factory, no transport
mcp/capabilities.ts one line per module
entrypoints/stdio.ts serveStdio(...) — only stdio binder
entrypoints/http.ts listen() — only file that binds a port
app.ts buildHttpApp(...) — Fastify host, no listen()
container.ts boot-once singletons + dependency health checks
config/env.ts zod env, parsed once, exits non-zero when invalid
plugins/ security · error-handler · auth · mcp
modules/catalog/ config-service client: builds, flows, mock configs
modules/session/ sessions, NP identity, role inversion
modules/flow/ the loop — derived state machine, start/proceed/await
modules/record/ exchanges, payloads and business data
modules/transport/ inbound receiver routes + outbound signed sender
modules/signing/ sign + verify the Authorization header, registry lookup
modules/forms/ forms this mock hosts, and forms it has to fill
modules/health/ /health and /ready
lib/ errors · define-tool · logger · cache · mock-engine · events
test/harness.ts in-process client ↔ server (the app.inject() analogue)Related MCP server: mcp-apps-demo-engine
The one architectural idea
The SDK's central type is McpServerFactory = (ctx) => McpServer. Both
entrypoints consume it, so the scaffold has a direct analogue of buildApp():
buildMcpServer(container, ctx)registers every capability and binds no transport. Entrypoints own transports. Tests consume the factory directly.
Keep the factory cheap. Over HTTP it runs once per request — that is
what makes the transport stateless. Anything expensive (connection pools, HTTP
agents, caches) belongs in createContainer, built once at boot and closed
over. Get this wrong and you open a pool per request; the symptom is a capacity
cliff under load, not a failing test. So src/mcp/server.test.ts asserts the
factory performs no I/O across 100 constructions.
Layering
tool → service → repository, one-way, never skipped — the MCP analogue of
routes → controller → service → repository.
File | Role |
| Protocol edge. Schemas, annotations, result shaping. Knows MCP only. |
| Business logic.Imports nothing from the SDK. Throws |
| Data access. Interface + in-memory implementation. |
| zod schemas; |
A service never returns { content: [...] }; a tool never contains a business
rule. That is what lets one service back a tool, a resource, and later a REST
route.
MCP-specific conventions
These are the rules with no REST analogue. They are the substance of the scaffold.
1. Every tool declares both schemas
defineTool requires inputSchema and outputSchema — a tool missing
either will not typecheck. outputSchema drives structuredContent, which is
what makes a tool consumable by code rather than only by a model reading prose.
Handlers return typed domain data; the helper builds the envelope, so no tool
can return half of it.
defineTool({
name: "session_get",
title: "Get session",
description: "Fetch a session by id: the participant under test, the role …",
inputSchema: GetSessionInput,
outputSchema: GetSessionOutput,
annotations: { readOnlyHint: true, idempotentHint: true },
render: ({ session }) => renderSession(session),
handler: async ({ session_id }) => ({
session: await service.requireSession(session_id),
}),
});2. Two error channels — pick by who can fix it
Failure | Channel | Who acts |
Bad arguments, not found, conflict, upstream down |
| Themodel — it reads the failure and retries differently |
Auth failure, unknown method | JSON-RPC error | Theclient — the model cannot mint a token or invent a method |
Report a model-fixable failure as a protocol error and the model never learns the call failed; it sees a transport fault and retries the identical call.
Argument validation sits on the tool channel — which is also what the SDK
does for inputSchema violations it catches itself. session.tool.test.ts
pins that behaviour so the two layers stay consistent.
A protocol NACK is emphatically on the tool channel too: the participant rejecting a payload is the most informative result a compliance run produces, and the model has to read it.
Each AppError subclass declares its own channel; handleToolError routes it.
3. stdout belongs to the protocol
On stdio, stdout is the JSON-RPC channel. One stray console.log corrupts
the stream and surfaces as an unrelated-looking parse error in the client.
pino writes to stderr in every mode. There is no config that changes it.
no-consoleis an ESLint error — load-bearing here, not stylistic.src/entrypoints/stdio.test.tsspawns the real entrypoint and fails if a single non-protocol byte reaches stdout.
This also matches 2026-07-28, which deprecates the MCP logging capability in
favour of stderr (stdio) and OpenTelemetry (HTTP).
4. No module-level mutable state
The point of the stateless revision. Cross-request state goes to the injected
ServerEventBus — in-process by default; pass a Redis-backed implementation to
createMcpHandler({ bus }) when running more than one replica.
This server's own domain state (sessions, transactions, payloads) goes through
the CacheStore port in src/lib/cache/ instead. See
State persistence.
5. Cache hints are free throughput
Cacheable results (tools/list, prompts/list, resources/*,
server/discover) carry ttlMs / cacheScope. The SDK default is
ttlMs: 0, cacheScope: "private" — no caching at all. mcp/server.ts sets
them deliberately, and a test asserts tools/list really carries them. Treat an
unset hint as a decision you skipped.
6. Trace context is propagated
_meta carries W3C traceparent / tracestate / baggage (formalised for
MCP in 2026-07-28). defineTool lifts them into the per-call child logger, so
a tool call correlates with the rest of your traces. There is no separate
observability plugin: request logging is Fastify's own (pointed at the shared
stderr logger in app.ts), and the MCP-level context belongs where the call
is served.
7. Deprecated surface is avoided
roots, sampling, and the logging capability are all deprecated in
2026-07-28. Nothing here builds on them. Server→client requests are expressed
with inputRequired(...) instead.
Talking to the HTTP transport
A 2026-07-28 request is stricter than 2025. Three things are mandatory:
Accept: application/json, text/event-stream— both. The server picks per response whether to answer with JSON or upgrade to a stream; sending only JSON earns a406.A full
_metaenvelope on every request —protocolVersion,clientInfo,clientCapabilities. A missing key is a-32602naming it.Mcp-Method, plusMcp-Namefortools/call(SEP-2243) — and they must agree with the body. These exist so load balancers and rate limiters can route and meter on the operation without parsing JSON-RPC.
curl -sS localhost:3000/mcp \
-H 'content-type: application/json' \
-H 'accept: application/json, text/event-stream' \
-H 'mcp-method: tools/list' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{"_meta":{
"io.modelcontextprotocol/protocolVersion":"2026-07-28",
"io.modelcontextprotocol/clientInfo":{"name":"curl","version":"1.0"},
"io.modelcontextprotocol/clientCapabilities":{}}}}'Clients still speaking 2025 keep working: plugins/mcp.ts sets
legacy: "stateless", so they are served per-request from the same factory.
Set legacy: "reject" to go modern-only.
Authorization
AUTH_MODE=jwt turns /mcp into an OAuth 2.1 Resource Server:
Unauthenticated calls get
401withWWW-Authenticate: Bearer ... resource_metadata="…".That URL serves an RFC 9728 document at
/.well-known/oauth-protected-resource/mcp, unauthenticated — it is how a client discovers which authorization server to use./healthand/readystay open so orchestrators can probe without a token.
Swap lib/token-verifier.ts for introspection or a vendor SDK; it is a
one-method interface.
Gotcha worth knowing: the SDK rejects any token whose
AuthInfo.expiresAtis unset — silently, as a plain401. Every shipped verifier populates it.
Per-user API keys
Under AUTH_MODE=apikey, setting AUTH_APIKEY_VERIFY_URL also accepts each
user's own ondc_mcp_… key, which they get from the Workbench website after
GitHub login and consent. Keys last 90 days. The MCP stores no keys: it calls
Workbench's POST /mcp/verify, sending AUTH_APIKEY_VERIFY_TOKEN as
X-Service-Token, and remembers the answer briefly (see "Key-check cache"
below).
AUTH_APIKEY_VERIFY_URLmust include the/automation-user-managementprefix, e.g.https://dev-workbench.ondc.tech/automation-user-management/mcp/verify. The bare host is the website and answers every path with200and HTML; that is refused with503, never read as a valid key.AUTH_API_KEYSare checked first and need no network. They're for services such as the batch peer, and for the old shared key during the move.Valid user key: tools run as that user, and every tool-call log line carries their
user_idascaller.Key not shaped like
ondc_mcp_plus 43 base64url characters:401, with no network call.Workbench answers
401(not found, revoked, expired):401, with a message telling the user what to do.Anything else (timeout, network error,
403wrong service token,429,5xx, an unexpected body):503withRetry-After. The request is never let through unchecked.
Key-check cache
Answers are remembered in the state store, which is Redis when REDIS_URL is
set, under <REDIS_KEY_PREFIX>::mcp_key_check:<sha256 hex of the key>. Only
the hash is stored, never the key.
Valid keys:
AUTH_APIKEY_CACHE_TTL_MS(default 60s), never past the key's ownexpires_at.Rejected keys: 10s, with their reason, so the user still sees the right message.
"Couldn't check" answers are never remembered.
Workbench deletes the entry when a key is regenerated, revoked or deleted, so a dead key stops working at once, as the consent promises. If that delete ever fails, the entry still expires within the TTL.
If Redis is down, lookups count as misses and Workbench is asked directly.
AUTH_APIKEY_CACHE_TTL_MS=0turns the cache off.
The verify contract is Workbench's integration guide, mcp-key-verification.md.
env.ts refuses to boot with AUTH_MODE=none when NODE_ENV=production, so
an unauthenticated production deploy cannot happen by configuration alone.
State persistence
Sessions, transactions, stored payloads and business data live behind the
CacheStore port (src/lib/cache/). Two implementations ship:
| Store | Behaviour |
unset |
| Zero infrastructure. A restart wipes everything. |
|
| State survives restarts and is shared by replicas. |
Unset is the default so the server runs with nothing installed. In development
that has a sharp edge: npm run dev is tsx watch, so every file save
restarts the process and drops the session you were mid-flow in. Pointing at a
local Redis fixes that:
docker compose -f docker-compose.dev.yml up -d # redis:8-alpine, loopback only, appendonly
echo 'REDIS_URL=redis://127.0.0.1:6379' >> .env # .env is read by npm run dev
npm run devKeys are the workbench's own layout (session::{id}, {txn}::{sub}) under a
REDIS_KEY_PREFIX namespace, so one local Redis can serve several projects —
and setting the prefix empty writes the workbench's literal keys, should you
ever want to share a Redis with it.
Two deliberate choices worth knowing:
The flow catalog never goes to Redis.
FlowService.load()reads a ~330KB mock-runner config on everyflow_proceedand every inbound callback. It is derived data, TTL'd at 15 minutes and re-fetched transparently on a miss, so it stays in-process — one 330KB transfer per loop iteration, half of them inside the ACK window, would buy nothing.createContainersays so in place.A failed read throws, it does not return
undefined.undefinedmeans "no such session", and the model answers that by starting a new transaction against a real participant. An outage has to look like an outage.
Header validation
The mock signs its outbound calls and can verify participants' signatures on
inbound calls (ONDC's Authorization header). Verification is a per-session
setting, header_validation: on by default, and it can be turned on or off
at session_create or mid-session with session_update_settings. A call that
fails it is refused with HTTP 401, NACK 10001.
It needs WORKBENCH_SUBSCRIBER_ID, UKID, SIGN_PRIVATE_KEY and
IN_HOUSE_REGISTRY set in .env (see .env.example); without them, header
validation stays off.
Issue reporting
When a run gets stuck — a blocked step, a NACK in either direction, a send that
failed — the server records what happened, strips it of payload content, and
writes it to a local spool directory. If FEEDBACK_ENDPOINT_URL is set it also
uploads it. This is on by default; FEEDBACK_DISABLED=1 turns it off, and the
choice is logged once at boot along with where reports go.
FEEDBACK_DISABLED=1 npm run dev # off
FEEDBACK_SPOOL_DIR=/tmp/fb npm run dev # spool somewhere you can readWhat leaves is deliberately narrow. Payload leaf values are replaced by type
tokens ("<string:12>"), so key names, types and array lengths survive and no
value does; identifiers are HMAC-pseudonymised with a per-install salt; free
text — including the model's own account — is scrubbed for emails, phone
numbers, GPS pairs and the rest. The rule is default-deny: a field nobody
anticipated is redacted by omission rather than leaked by oversight.
src/test/pii-fixtures.ts is the canary, and feedback.redact.ts is where the
tests live.
Nothing about this depends on the model cooperating. Capture is deterministic
and the report ships with narration: null if it is never answered;
feedback_submit_report only adds the model's diagnosis on top. To see exactly
what would be sent, call feedback_list_reports with include_body: true, or
read the spool directory — it is the same JSON.
Testing
Layer | Mechanism |
Service | Plain unit test — no MCP involved |
Tool / resource / prompt |
|
HTTP |
|
stdio | Real subprocess, asserting stdout purity |
| One shared contract suite ( |
Redis is exercised two ways: a fake client in the default suite, and a real
server behind an opt-in gate — RUN_REDIS_TESTS=1 npm test -- redis-cache-store,
which needs docker-compose.dev.yml up. Each run namespaces its keys and cleans
up with SCAN, never FLUSHDB, because the Redis it finds may not be its own.
Scaffold-level guarantees under test: the factory does no I/O; stdout carries
only protocol bytes; /ready returns 503 when a dependency is down; cache
hints are emitted; DNS-rebinding protection rejects bad Host/Origin; the 401
challenge is discoverable; a second instance serves a call the first never saw.
Adding a module
src/modules/<name>/with*.schema.ts,*.service.ts,*.tool.ts—session/is the smallest complete example.Write schemas first — everything else derives from them.
Keep the service free of SDK imports.
Add one line to
src/mcp/capabilities.ts.
Both transports pick it up automatically.
Notes on versions
The SDK is pinned to exact
2.0.0-beta.5, deliberately. v2 is in beta and the API is still settling.@modelcontextprotocol/fastifypublishes alatesttag that lags its siblings, so a caret range silently mixes versions.npm run sdk:checksurfaces the GA bump.SDK types are confined to
mcp/,entrypoints/,plugins/mcp.ts,lib/define-tool.tsandlib/errors.ts. Services and repositories import nothing from the SDK, so a v2 API change has a small blast radius.TypeScript is pinned to 6.0.3, not 7.x:
typescript-eslintsupports<6.1.0, and a supported dependency graph beats a forced install.types: ["node"]is required either way — TS 6 no longer auto-includes@types/*and the SDK's.d.mtsreferencesBuffer.@modelcontextprotocol/nodepeer-depends onhonoeven under Fastify. It is a transitive requirement of the adapter, not a stray dependency.
Available Tools
21 toolscatalog_describe_flowDescribe a flowARead-onlyIdempotent
The full ordered sequence of one flow. Every step is tagged with an actor: 'mock' means this server must produce it, 'np' means it must arrive from the participant under test. Also lists the inputs each step needs and any parallel or unsolicited steps.
Inputs: flow_id (required), session_id (required). Returns: tags, flow_id, sequence, mock_role, +3 more
catalog_list_buildsList available buildsARead-onlyIdempotent
List every domain, version and use-case published by the ONDC config-service. Call this before session_create when the exact domain code, version or use-case name is uncertain — use-case names are case- and space-sensitive and must match exactly.
Inputs: domain. Returns: total, builds
catalog_list_flowsList flows for a sessionARead-onlyIdempotent
List every flow published for the session's build, with the number of steps this server must produce versus the number expected from the participant under test. Use catalog_describe_flow for the full sequence.
Inputs: session_id (required). Returns: build, flows, total, mock_role, +1 more
catalog_load_flow_configLoad a flow's mock configAIdempotent
Fetch and cache the mock-runner configuration for a flow — the per-step generation, validation, requirement and save-data logic the workbench uses to drive it. Returns a summary of what each step carries; the configuration itself is held server-side under the returned cache_key for later execution, because it is far too large to read directly.
Inputs: flow_id (required), session_id (required). Returns: meta, steps, flow_id, cache_key, +4 more
feedback_list_reportsList issue reports for this sessionARead-onlyIdempotent
Every incident this session has opened, with its derived state and whether it still needs your account. Pass include_body: true to see the fully-redacted report exactly as it would be uploaded — that is the honest answer to a user asking what is being sent about them.
Inputs: session_id (required), limit, include_body. Returns: events, sharing, incidents
feedback_submit_reportReport what went wrongA
Record your account of an incident this session opened — you will see one as an ISSUE_OPEN event on a tool result. Call it AFTER you have tried to resolve the problem, so you can say how it turned out; report it whether or not you succeeded, because a failure you could not rescue is the more useful of the two. tooling_gap is the most valuable field: it is what changes the tools you are given next time. Do not paste payload values into any field — name the JSONPath instead; values are stripped either way.
Inputs: outcome (required), diagnosis (required), session_id (required), incident_id (required), +3 more. Returns: state, events, message, accepted, +1 more
flow_awaitWait for the participantARead-only
Block until something happens, then report it. Two scopes: Name a flow_id (or transaction_id) and it waits on that one run, returning as soon as the participant calls back — pass the seq from your last call as after_seq so nothing is seen twice. When the participant sends the flow's first action this is where you learn the transaction_id, because it was theirs to choose. Name neither and it waits on the whole session: any callback on any run, a step auto-advance sent, a refused call, a form submitted. That is the one to use when you have nothing to do — it needs no seq bookkeeping, and it comes back with runs telling you where every flow stands. Narrow what wakes it with kinds / flow_ids; anything filtered out is still reported, it just does not end the wait. timed_out: true means nothing happened yet — call again. Always prefer this over polling flow_get_status.
Inputs: session_id (required), kinds, flow_id, flow_ids, +3 more. Returns: seq, next, runs, event, +4 more
flow_get_statusGet flow statusARead-onlyIdempotent
Where a run has got to: every step with its status and who owes it, any exchanges that arrived off-sequence, and what the loop needs next. State is derived from the recorded exchanges on every call, so this is always current. Name the run by flow_id (or transaction_id once it has one). Read it whenever you lose track; next says exactly which tool to call.
Inputs: session_id (required), flow_id, transaction_id. Returns: seq, next, events, attempt, +10 more
flow_proceedAdvance the flowA
The loop driver. Takes the next step this mock owns, checks its preconditions, generates its payload from the flow's own mock config, and POSTs it to the participant — then records both the payload and whatever the step saved for later steps. If the step needs values it comes back INPUT_REQUIRED with the declarations; call again with inputs. If the next move is the participant's it comes back WAITING; call flow_await. Pass dry_run: true to generate and inspect a payload without sending it, or trigger_extra to fire a named side-channel step. When a step is blocked because the flow's own config generates a non-compliant payload, payload_overrides patches the offending fields so the run can continue instead of being abandoned. Sending the flow's first action is what mints its transaction_id, which the answer then reports.
Inputs: session_id (required), inputs, dry_run, flow_id, +3 more. Returns: ack, action, events, reason, +16 more
flow_restartRestart a flowA
Abandon this run's current attempt and open a fresh one of the same flow, in the same session. Use it when a run has gone wrong and you want another go: a flow's state is derived by replaying what was exchanged, so a NACKed step or an out-of-sequence callback stays part of the history and flow_start would only resume it. Nothing recorded is destroyed — the abandoned attempt keeps its payloads and stays readable with record_get_payload, because a failed attempt is a compliance finding, not a mistake to erase. The new attempt starts unbound: transaction_id comes back null and the next action mints a fresh one. Prefer this over creating a second session; an abandoned session keeps competing for the participant's callbacks on the endpoint every session shares.
Inputs: flow_id (required), session_id (required), reason. Returns: events, attempt, flow_id, outcome, +6 more
flow_startStart a flowA
Open a run of one flow and report what its first step needs. Returns the callback URL the participant under test must be able to reach — every payload this server sends advertises it as bap_uri or bpp_uri, so a participant that cannot reach it will never call back. Fails immediately if the flow has no mock config or any step with no owner, so a flow that cannot be driven is rejected before anything is sent. transaction_id comes back null: it belongs to whoever sends the flow's first action, so when that is the participant it is theirs to choose and does not exist yet. Drive the run by flow_id with flow_proceed and flow_await, which report the id once it exists.
Inputs: flow_id (required), session_id (required), auto_advance, transaction_id. Returns: events, attempt, flow_id, outcome, +5 more
form_fetchRead a pending formARead-onlyIdempotent
Read the form a flow is waiting on. When the participant hosts it, this fetches the page, screens it for active content, and returns its fields ready to fill — then call form_submit. When this mock hosts it, there is nothing to do but wait for the participant, and the answer says so. In a manual-mode session it returns the link to hand to a person instead of the fields. Omit step_key to use whichever form the flow is currently waiting on.
Inputs: session_id (required), transaction_id (required), step_key. Returns: mode, role, events, fields, +6 more
form_submitSubmit a pending formA
Complete the form step and advance the flow. In llm_auto sessions pass fields (the names come from form_fetch) and this posts them to the participant and reads back the submission id it issues. In manual sessions pass the submission_id the person was given instead. Either way the id is saved where the next step's payload expects it.
Inputs: session_id (required), transaction_id (required), fields, step_key, +1 more. Returns: events, outcome, step_key, raw_response, +1 more
payload_validateValidate a payloadARead-onlyIdempotent
Check a protocol payload against the ONDC spec for this session's build, without sending it anywhere. Runs L0 (JSON Schema) and L1 (the spec's contextual rules); every failure comes back with a rule code and a JSONPath. Use it to inspect a body before committing to it, or to understand a refusal. Note that flow_proceed already gates what it sends, so this is not a required step in the loop. A valid verdict only covers the layers listed in checked.
Inputs: payload (required), session_id (required), action. Returns: action, events, status, checked, +3 more
receiver_startStart the inbound receiverAIdempotent
Make sure this mock can receive the participant's callbacks, and report the URL it must use. Call it once before session_create. Under the HTTP transport the receiver is already mounted and this just reports the address; on stdio it binds a listener. Safe to call repeatedly. The address must be reachable from the participant — for a remote participant, set RECEIVER_PUBLIC_URL (or the session's receiver_public_url) to a tunnel address instead.
Inputs: session_id. Returns: mode, port, running, base_url, +2 more
receiver_stopStop the inbound receiverADestructiveIdempotent
Close the standalone inbound listener. Only meaningful on the stdio transport; under HTTP the receiver shares this server's port and stops with it, and this explains that rather than failing.
Inputs: no named parameters. Returns: reason, stopped
record_get_dataRead a transaction's business dataARead-onlyIdempotent
The values a flow has accumulated across its steps — provider ids, order ids, form submission ids — as the mock config saved them. This is what the next step's payload is generated from, so read it when a step reports missing requirements. Large values (resolved form HTML) are listed under 'omitted' rather than returned; ask for one by name.
Inputs: session_id (required), transaction_id (required), keys. Returns: data, events, omitted, transaction_id
record_get_eventsRe-read the session event journalARead-onlyIdempotent
Read this session's event journal without consuming it. You do not normally need this: every session-scoped tool result already carries the events since your last call, delivered once each. Reach for it when a result said more was outstanding, when you want to re-read something already delivered, or to recover a delta lost to an error — reading here never moves the delivery cursor, so it cannot consume what piggyback has not yet shown you.
Inputs: session_id (required), limit, since_seq. Returns: more, events, delivered_through
record_get_payloadRead a recorded payloadARead-onlyIdempotent
Fetch a payload this session sent or received, by the handle reported in flow_get_status or flow_await. Payload bodies are held server-side and can be very large — a catalog runs to hundreds of kilobytes — so prefer a jsonpath slice (e.g. $.message.catalog.providers[*].id) over the whole body. The result says whether it was truncated.
Inputs: payload_id (required), session_id (required), jsonpath, max_bytes. Returns: ack, action, events, payload, +7 more
session_createCreate mock sessionA
Open a session against a network participant under test and list every flow available for its build. Supply the participant's subscriber URL and whether it is a BAP (buyer app) or BPP (seller app); this server automatically takes the opposite role and answers as that counterparty. Domain, version and use-case must be a published combination — call catalog_list_builds first if unsure, because an unknown use-case is rejected rather than silently returning no flows. The returned callback_url is what the participant must send its callbacks to; give it to them before starting a flow.
Inputs: domain (required), np_type (required), usecase (required), version (required), +5 more. Returns: flows, total, session
session_getGet sessionARead-onlyIdempotent
Fetch a session by id: the participant under test, the role this server plays against it, the build, and when the session expires. Returns an error result if the session is unknown or has expired.
Inputs: session_id (required). Returns: events, session
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 21 tools
Every tool targets a distinct resource and action: flow control (start/proceed/await/restart/status), session management (create/get), catalog discovery (list_builds/list_flows/describe_flow/load_config), receiver lifecycle (start/stop), form handling (fetch/submit), payload validation, record retrieval (payload/data/events), and feedback (submit/list). Even similar-sounding tools like flow_get_status and flow_await have clearly separated purposes: one is pull-based state inspection, the other is push-based waiting with event delivery. No two tools could be confused for each other.
All tool names follow a strict noun_verb or noun_verb_object pattern (e.g., flow_start, session_create, catalog_list_builds, form_submit, record_get_payload). The prefix consistently identifies the resource, and the verb indicates the action. There is no mixing of conventions; all names are lowercase with underscores.
At 21 tools, the set is above the typical 3-15 range but not excessive. Each tool serves a distinct purpose in the ONDC mock participant workflow, and the complexity of the domain (sessions, flows, catalogs, forms, records, feedback) justifies the number. It feels slightly heavy but well-scoped, with no redundant tools.
The tool surface covers the core lifecycle: session creation, flow start/proceed/await/restart, catalog exploration, form processing, payload validation, and record retrieval. Minor gaps exist, such as no session listing or explicit cancellation flow (though flow_restart covers restarting), and no generic message-sending tool outside of flow_proceed. These are workable gaps, not blockers, for the stated testing purpose.
Related MCP Connectors
Build and run AI workflows, agents, data tables and 1000+ API integrations from any MCP client.
Host any HTTP API as MCP tools with a tamper-evident cross-agent settlement ledger.
MCP server for Boson Protocol — on-chain agentic commerce for physical & digital goods.
Self-sovereign BYOC headless commerce & agentic MCP checkout engine for B2B storefronts.
Related MCP Servers
- AlicenseBqualityBmaintenanceGoverned agent execution gateway for LLM workflows, providing deterministic FSM-based execution, audit trails, and idempotency guarantees via MCP.6MIT
- FlicenseNot gradedqualityDmaintenanceAn extensible MCP server and generative UI engine for hosting interactive B2B enterprise workflows with dynamic styling and stateful simulators.-
- AlicenseNot gradedqualityCmaintenanceProvides a sovereign, MIT-licensed MCP server for professional-service workflows, running entirely on your infrastructure with Ed25519 cryptographic signing for every action.MIT
- AlicenseNot gradedqualityCmaintenanceA sovereign, MIT-licensed MCP server for professional-service workflow automation, enabling offline-capable, cryptographically signed operations without vendor lock-in.MIT