agent-services-mcp
The agent-services-mcp server is a unified MCP gateway exposing seven tools across three core services: content provenance certification, content quality scoring, and agent action auditing. Paid tools require an x402 micropayment; all paid tools return Ed25519-signed receipts that can be independently verified.
Content Provenance
certify_provenance(paid) – Certifies content origin, returning an Ed25519-signed receipt with a SHA-256 hash and caller-attested metadata, proving the content is unmodified.verify_provenance(free) – Re-hashes content and validates the signature of an existing provenance receipt.
Content Quality
score_quality(paid) – Scores content against a published rubric across four dimensions (clarity, completeness, internal consistency, obvious-error freedom), returning a signed score receipt. Supports an optionaltarget_scorefor "no pass, no pay" conditional payment.verify_quality(free) – Validates the signature and content hash of a quality score receipt.get_quality_rubric(free) – Fetches the current quality rubric in markdown format, including the rubric version and scoring criteria.
Agent Action Auditing
audit_action(paid) – Creates a tamper-evident, Ed25519-signed audit receipt for an agent's claimed action, including actor metadata and context.verify_audit(free) – Verifies the integrity and authenticity of an audit receipt.
The server operates over stdio as an MCP server, supports configuration of underlying service URLs via environment variables, and forwards x402 payment tokens to upstream services without directly managing client wallets.
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., "@agent-services-mcp show me the quality rubric"
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.
agent-services-mcp
A single thin MCP (Model Context Protocol) server that exposes three existing services as discoverable tools, so AI agents and MCP-compatible clients can find and use them through one connection:
provenance-receipts — certifies content origin; returns an Ed25519-signed receipt.
quality-gate — scores content quality against a published rubric; returns an Ed25519-signed score receipt.
agent-action-audit — signs a tamper-evident audit receipt for an action an agent took (agent accountability); returns an Ed25519-signed audit receipt.
It is a thin wrapper. Every tool forwards an HTTP call to the underlying Worker and returns its response verbatim. It does not reimplement signing, scoring, or payment logic — those live in the underlying services. The honesty about what each service proves carries through to the tool descriptions.
Quickstart — your first (free) call in ~2 minutes
npm install && npm run build
node examples/free-call.mjs # connects to the LIVE services and calls a free toolexamples/free-call.mjs runs an MCP client against this server (pointed at the live
deployments) and calls get_quality_rubric and verify_audit — both free, no
wallet needed. To wire the server into an MCP client (Claude Desktop / Claude Code
style), see Connecting an MCP client below.
Free vs paid at a glance: verify_provenance, verify_quality, verify_audit,
and get_quality_rubric are free. certify_provenance, score_quality, and
audit_action are paid (an x402 USDC micropayment on Base) — see Calling paid
tools for the two-step payment flow and a working example.
Related MCP server: contextboundary-gw
What the wrapped services prove (and do not)
Provenance: proves the content is unmodified (SHA-256 hash) and the receipt was issued by the service's key. The
generator_metadatais caller-attested — it proves you claimed it, not that a specific model ran. Not AI-detection, not a truth guarantee.Quality: a reproducible score against the published rubric (clarity, completeness, internal consistency, obvious-error freedom). Not absolute truth, not an external standard, not a fact-check. Read the rubric via the
get_quality_rubrictool.Audit: proves the action record is genuine (issued by the service's key) and unaltered since issue (tamper-evident). The
action,actor_metadata, andcontextare caller-attested — it proves you claimed this record, not that the agent's claim is true. An accountability/audit tool, not a lie-detector.
Tools
Tool | Forwards to | Paid? | Input |
| provenance-receipts | yes (x402) |
|
| provenance-receipts | no |
|
| quality-gate | yes (x402) |
|
| quality-gate | no |
|
| quality-gate | no | none |
| agent-action-audit | yes (x402) |
|
| agent-action-audit | no |
|
Full descriptions and Zod input/output schemas: src/tools.ts.
Each tool returns the service's raw JSON (or markdown, for the rubric) as text; the
verify_* and score_quality tools also declare an outputSchema and return
parsed structuredContent you can read directly (e.g. result.structuredContent.valid).
A non-2xx response (including a 402 Payment Required) is surfaced with
isError: true and the body preserved — for a 402 the wrapper prepends a short,
actionable note on how to pay. The three paid tools also accept an optional
x_payment input (the x402 X-PAYMENT token) to settle payment through the
wrapper — see Calling paid tools.
Configuration
The three service URLs are environment-configurable (no secrets — just base URLs):
Env var | Live (deployed) | Local dev fallback |
|
|
|
|
|
|
|
|
|
.env.example and the client config below point at the live deployments. If
the vars are unset, the server falls back to localhost for local wrangler dev
(the Workers default to :8787, so run quality-gate on :8788 and
agent-action-audit on :8789 to avoid clashes).
Against the live services, the paid tools (
certify_provenance,score_quality,audit_action) require x402 — this wrapper forwards the request and holds no wallet, so without anX-PAYMENTthey return a402(the payment requirements) surfaced asisError. The free tools work as normal.
Calling paid tools (x402)
The three paid tools require an x402 micropayment (USDC on Base mainnet). The wrapper holds no wallet — it never spends on your behalf — so paying is a two-step flow:
Call the tool with no
x_payment. You get back a402whose body is the x402 payment requirements (network, asset, amount,payTo). The wrapper prepends a one-line note explaining what to do next.Build an x402
X-PAYMENTtoken from those requirements with an x402 client + a funded wallet, then call the tool again with that token in thex_paymentinput. The wrapper forwards it as theX-PAYMENTheader; the underlying service verifies, settles, and returns the signed receipt.
Easiest path to a working paid call — let an x402 client settle for you against the underlying service directly:
npm install x402-fetch
BUYER_PRIVATE_KEY=0x... node examples/paid-call.mjsexamples/paid-call.mjs uses x402-fetch + a throwaway Base-mainnet wallet
(holding a little real USDC) to pay for and call audit_action. ~$0.01 USDC moves
buyer → the service's payTo, gasless (the facilitator pays gas). Real money — use
a disposable key with a few cents only. The same applies to certify_provenance
and score_quality.
Quickstart (local)
# 1. Build the MCP server
npm install
npm run build # -> dist/index.js
# 2. In separate terminals, run the three services (free; payments off)
# (provenance-receipts) npm run dev # http://localhost:8787
# (quality-gate) npx wrangler dev --port 8788 # http://localhost:8788
# (agent-action-audit) npx wrangler dev --port 8789 # http://localhost:8789
# 3a. Smoke-test the free tool paths through an MCP stdio client
node scripts/test-client.mjs
# 3b. (optional, costs ~$0.012) prove the paid score_quality path end-to-end
node scripts/test-score.mjs
# 3c. Smoke-test the wrapper against the LIVE deployed services (free — the
# paid tools return a forwarded 402; no payment, no scoring call)
node scripts/test-live.mjsscripts/test-client.mjs exercises the free tools locally; scripts/test-score.mjs
makes one real Anthropic scoring call through score_quality;
scripts/test-live.mjs points the wrapper at the deployed workers.dev URLs and
asserts the free tools work and the paid tools forward the x402 402.
Connecting an MCP client (stdio)
This server speaks MCP over stdio (stdin/stdout). Any MCP client launches it
as a subprocess. Example for a Claude Desktop / Claude Code style
mcpServers config:
{
"mcpServers": {
"agent-services": {
"command": "node",
"args": ["C:\\Users\\Gareth\\agent-services-mcp\\dist\\index.js"],
"env": {
"PROVENANCE_URL": "https://provenance-receipts.gpmiddleton71.workers.dev",
"QUALITY_GATE_URL": "https://quality-gate.gpmiddleton71.workers.dev",
"AUDIT_URL": "https://agent-action-audit.gpmiddleton71.workers.dev"
}
}
}
}Run
npm run buildfirst sodist/index.jsexists.The client connects, calls
tools/list(it will see the 7 tools above), and invokes them viatools/call.The underlying services must be reachable at the configured URLs when a tool is called.
Logs go to stderr; stdout is reserved for the MCP protocol.
Programmatically, connect with the SDK's Client + StdioClientTransport
(command: "node", args: ["dist/index.js"]) — see scripts/test-client.mjs.
x402 payments (forwarded, not handled here)
The paid endpoints (/v1/certify, /v1/score, /v1/audit) are gated by
x402 on the underlying services. This wrapper
forwards requests and does not hold a wallet. If a service has payments
enabled and no valid X-PAYMENT is supplied, it returns 402 with the payment
requirements — the wrapper surfaces that as isError with the requirements body
intact. Settling a payment (signing an x402 authorization) is the client's
responsibility against the underlying service. See each service's README.md /
docs/API.md for the x402 details. Base Sepolia testnet only — no mainnet.
Verifying receipts independently
The receipts returned by certify_provenance, score_quality, and audit_action
are Ed25519-signed and verifiable without trusting any of these services —
re-hash the content/record and check the signature against the service's public
key. Each service ships a runnable independent verifier and recipe: see
provenance-receipts/docs/VERIFYING.md,
quality-gate/docs/VERIFYING.md,
and agent-action-audit's docs/VERIFYING.md.
Build status
Step 1 — skeleton + tool definitions (
src/tools.ts)Step 2 — tool handlers (HTTP forwarding) + local smoke test
Step 3 — README: what it is, the tools, and how an MCP client connects
Live — pointed at the deployed services (
*.gpmiddleton71.workers.dev) and verified end-to-end viascripts/test-live.mjs: free tools work; paid tools forward the x402402.
All seven tool paths verified against the live deployments (including one paid
score_quality call end-to-end through the wrapper); the paid tools
(certify_provenance, score_quality, audit_action) forward the x402 402.
Stack
Official MCP SDK:
@modelcontextprotocol/sdkv1.29.0 (TypeScript), stdio transport,zodinput schemas.Node ESM + TypeScript (
tsc→dist/).
Project layout
agent-services-mcp/
├── src/
│ ├── index.ts # MCP server: registers tools, forwards HTTP, stdio transport
│ └── tools.ts # the 7 tool definitions (names, descriptions, Zod schemas)
├── scripts/
│ ├── test-client.mjs # MCP stdio client — free tool smoke test (local)
│ ├── test-score.mjs # MCP stdio client — one paid score_quality e2e check
│ └── test-live.mjs # MCP stdio client — against the live deployed services
├── package.json
├── tsconfig.json
├── .gitignore
└── .env.example # PROVENANCE_URL, QUALITY_GATE_URL, AUDIT_URLAvailable Tools
5 toolscertify_provenanceCertify content provenanceA
Certify the ORIGIN of a piece of content via the provenance-receipts service. Returns an Ed25519-signed receipt committing to a SHA-256 hash of the content, your caller-attested generator_metadata, and a service-set timestamp.
PROVES: the content is unmodified (hash) and the receipt was issued by the holder of the service's signing key. DOES NOT PROVE: it does not independently verify generator_metadata — the receipt proves you CLAIMED that metadata at certification time, not that a specific model actually produced the content. This is proof-of-origin/tamper-evidence, not AI-detection and not a truth guarantee.
Note: /v1/certify is the paid action; when the underlying service has x402 payments enabled it may require a micropayment. This wrapper forwards the request as-is.
Inputs: content (required), generator_metadata.
get_quality_rubricGet the published quality rubricA
Fetch the published Quality Gate rubric (markdown) that score_quality grades against, along with its version. Read this to understand exactly what a quality score means and does not mean. Free; takes no input.
Inputs: no named parameters.
score_qualityScore content against the published quality rubricA
Score content against the quality-gate service's PUBLISHED rubric and get an Ed25519-signed score receipt. The rubric scores four dimensions — clarity, completeness, internal consistency, and obvious-error freedom (0–25 each, summing to 0–100) — plus flags from a closed vocabulary. Read the exact rubric with get_quality_rubric.
WHAT THIS IS: a reproducible score AGAINST OUR PUBLISHED RUBRIC (vX). WHAT IT IS NOT: a measure of absolute truth, an external/third-party standard, or a fact-check — 'obvious-error freedom' catches errors evident from the text or common knowledge, not external verification.
Optional target_score (0–100) enables 'no pass, no pay': if the score is below your target, no receipt is issued and (when payments are on) no charge is made — the response returns the failing breakdown with receipt: null.
Note: /v1/score is the paid action (one Claude API scoring pass per call) and may require an x402 micropayment when the underlying service has payments enabled.
Inputs: content (required), rubric_version, target_score.
verify_provenanceVerify a provenance receiptA
Verify a provenance receipt against its content via provenance-receipts. Re-hashes the content and checks the Ed25519 signature; returns { valid, details }. valid is true only if BOTH the content hash matches the receipt AND the signature is valid under the service's public key. Free. A 200 response means verification ran — always read valid (false means the content was modified or the receipt was altered/forged).
Inputs: content (required), receipt (required).
verify_qualityVerify a quality score receiptA
Verify a quality score receipt against its content via quality-gate. Re-hashes the content and checks the Ed25519 signature, which covers the score itself — so a forged or altered score fails. Returns { valid, details }. Free. A 200 response means verification ran — always read valid.
Inputs: content (required), receipt (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool has a distinct purpose: certifying provenance, fetching the quality rubric, scoring quality, and verifying receipts for both provenance and quality. No overlap or ambiguity.
All tool names follow a consistent verb_noun pattern in snake_case (e.g., certify_provenance, verify_quality), making the set predictable and easy to navigate.
With only 5 tools, the set is well-scoped for the domain of provenance and quality attestation. Each tool earns its place, covering core actions without unnecessary bloat.
The tool surface covers the full workflow: certification, scoring with a rubric, and verification for both. There are no obvious gaps for the stated purpose of provenance and quality assurance.
Maintenance
Related MCP Connectors
Guarded MCP server for agent-readable business truth, provenance, readiness, and discovery.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Free OpenAI-compatible inference with signed provenance receipts and 3 focused MCP tools.
AI Reasoning Cache & Consensus Layer with 11 MCP tools via Streamable HTTP.
Related MCP Servers
- AlicenseAqualityDmaintenanceMCP server for AI agent identity — verify agents with Ed25519 signatures, check trust scores, sign and verify content, exchange encrypted messages. Built on the Agent Identity Protocol (AIP).81MIT
- AlicenseNot gradedqualityCmaintenanceSelf-hosted MCP gateway that applies deterministic, compiled policy to tool discovery, invocation, and outbound data flow, with no model in the enforcement path. Every decision emits a hash-chained receipt sealed with Ed25519 and verifiable using public keys only.Apache 2.0
- AlicenseAqualityCmaintenanceMCP server for AI agent guardrails — validates and signs agent decisions (OAA tokens) so third parties can verify them without server access32MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for tracking and verifying AI reasoning state, with signed action receipts, repo-history records, and preflight gating for tool calls.Apache 2.0