attestive-mcp-example
Click on "Install 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., "@attestive-mcp-exampleIssue a refund for order 12345"
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.
attestive-mcp-example
A thin wrapper that hooks Attestive's AuditClient.record()
into an MCP server's tool-call lifecycle — the natural interception point on the
server side of MCP, the same way
attestive-agent-sdk-example's
PostToolUse hook is the natural interception point on the client side. One
line — auditMcpServer(server, auditClient) — and every tool registered on
that server from then on gets its calls recorded automatically, no matter
which MCP host (Claude Desktop, Claude Code, or anything else speaking MCP)
ends up calling it.
Extracted from Attestive's main repo (git subtree split) so it's readable
and runnable on its own. The canonical, currently-maintained version of
AuditClient lives at github.com/magves56/Attestive;
see "Standalone vs. canonical source" below for what that means here.
attestive-audit.ts— the reusable wrapper.withAudit()wraps one tool callback;auditMcpServer()wrapsserver.registerToolso every future registration getswithAudit()applied automatically. This is the file to read if you're integrating this into your own server — everything else here is example scaffolding.demo-server.ts— a real MCP server with two tools a support agent might call (check_order_status, a read-only lookup;issue_refund, an actual decision with a real approve/deny outcome), both audited via one call toauditMcpServer(). Runs on stdio, exactly like any MCP server a real host spawns.run-example.ts— the real thing: spawnsdemo-server.tsas an actual subprocess, connects a real MCPClientoverStdioClientTransport, calls both tools through the real MCP protocol, then exports and verifies the resulting chain with the actual publishedattestive-verifypackage.smoke-test.ts— exerciseswithAudit()directly against fake tool callbacks (both MCP callback shapes, plus a callback that throws), no MCP server or subprocess involved. Useful for iterating on the wrapper itself.attestive-client.ts— a self-contained copy ofAuditClientand the hash-chain/framework-citation logic it depends on, so this repo runs on its own with nothing butnpm install. See its own header comment, and "Standalone vs. canonical source" below.
Steps: npm install → first verified logged decision
npm install
npm run smoke-test # proves the wrapping logic works in isolation
npm run start # the real thing -- spawns a real MCP server, calls real tools, verifies the chainNeither command needs any credentials — MCP tool-calling doesn't require an
LLM in the loop to demonstrate, unlike the Claude Agent SDK example, which
needs ANTHROPIC_API_KEY or a Claude Code login to run the live agent path.
That's a real difference worth knowing if you're choosing which example to
try first: this one you can fully verify end to end with nothing but Node
installed.
Related MCP server: GoLogX (logx-mcp)
Honest timing
Measured against this repo, standalone, on a clean install:
Step | Time |
| ~9s |
| instant; proves |
| clean, no errors |
| ~2.4s wall clock, all in |
Total, start to a verified logged decision: under 15 seconds, no external accounts needed.
What "real running MCP server" means here
run-example.ts doesn't mock anything: demo-server.ts is spawned as a
genuine child process (node demo-server.ts, via the SDK's own
StdioClientTransport, which is exactly how Claude Desktop and Claude Code
launch MCP servers), and every tool call crosses a real stdio pipe as real
JSON-RPC messages, dispatched by the real @modelcontextprotocol/sdk
McpServer. The one piece of demo-only plumbing is _export_chain, a third
tool registered before auditMcpServer() runs (so it isn't itself
audited — exporting a chain isn't a decision) purely so run-example.ts has
a way to read back what the subprocess recorded in its own memory, the same
way a real integrator's own tooling would need to reach into wherever they
point ChainStore.
Coverage and limits, stated plainly
Only the current, recommended
registerTool()API is wrapped byauditMcpServer(). The deprecated.tool()overloads are not intercepted automatically — migrate toregisterTool()first (the MCP SDK already recommends this regardless of auditing), or callwithAudit()directly around a.tool()callback if you can't migrate yet:server.tool("name", schema, withAudit("name", auditClient, handler)).The default
agentIdis the MCP transport'ssessionIdif one is available (Streamable HTTP provides this), falling back to"mcp-server"otherwise. Stdio transports are typically one server process per session already, so one chain per process is a reasonable default there — but for a multi-tenant server wheresessionIdalone isn't the right audit boundary, passagentId: (extra) => yourOwnId(extra)toauditMcpServer().The default
decisionTypeis"automated_decision"— the same value the Claude Agent SDK example uses, whichsuggestControlsForDecisionType()maps to human-oversight and record-keeping citations. PassdecisionTypetoauditMcpServer()(or per-tool towithAudit()) if a more specific type fits your tools better.An audit-logging failure (the backing
ChainStorethrows) is caught and logged to stderr, never allowed to change what the MCP client actually receives back from the tool call — verified insmoke-test.ts's thrown-error case.
Standalone vs. canonical source
attestive-client.ts in this repo is a deliberate copy of AuditClient, not
an import of it — AuditClient isn't published as an installable package
yet (unlike attestive-verify, which this example genuinely depends on via
npm install), and the monorepo paths it lives at only resolve inside that
monorepo's own layout. If you're evaluating Attestive, treat
github.com/magves56/Attestive's
src/client.ts as the source of truth; this copy exists purely so this repo
runs on its own. The monorepo guards the two from silently drifting apart
with a cross-check test that isn't (and can't be) included here — see
attestive-client.ts's own header comment.
Swapping in the real backend
This example uses InMemoryChainStore — the point is proving the MCP
integration works, not standing up a database. For a real deployment, swap
in a persistent ChainStore implementation (see attestive-client.ts's
ChainStore interface, and src/store/supabase-chain-store.ts in the main
Attestive repo for how the hosted product backs it with Postgres), and pass
a real organizationId/apiKey to AuditClient instead of the
"local-demo" placeholder used here.
License
MIT — see LICENSE.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityCmaintenanceSecurity gateway that wraps any MCP server with per-tool policies, approval gates, and optional Ed25519-signed decision receipts. Shadow mode logs every tool call without blocking; enforce mode applies block, rate-limit, and minimum-tier rules. Receipts are independently verifiable offline with no accounts needed.Last updated54109MIT
- Alicense-qualityAmaintenanceTamper-evident audit logging for AI agents. Append-only, hash-chained, optionally Ed25519-signed log. The MCP server lets an agent keep and verify a record of what it actually did.Last updated5MIT
- AlicenseAqualityAmaintenanceAI-agent observability server whose distinguishing feature is a SHA-256 hash-chained, tamper-evident audit log with chain verification and signed export. Works with Claude Desktop, Cursor, and any MCP client.Last updated22217MIT
- FlicenseAqualityCmaintenanceMCP server that auto-emits tamper-evident receipts for every tool call, enabling EU AI Act Article 12 compliance with signed, chain-linked receipts.Last updated1
Related MCP Connectors
Hash-chained HMAC-signed audit log MCP for A2A (agent-to-agent) calls. Every tool-call, agent-ha...
A paid remote MCP for CLI tool MCP, built to return verdicts, receipts, usage logs, and audit-ready
A paid remote MCP for hosted MCP server, built to return verdicts, receipts, usage logs, and audit-r
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/magves56/attestive-mcp-example'
If you have feedback or need assistance with the MCP directory API, please join our Discord server