Skip to Content
atrib protocol docs

Quick start

Sign the tool calls your MCP server handles, then find the records in the public log.

This page adds signing to an MCP server you already run. Each successful tool call becomes a signed record, and the record's commitment goes to the public log at log.atrib.dev. You need Node 22 or newer.

Install

pnpm add @atrib/mcp @modelcontextprotocol/server

@atrib/mcp is built on version 2 of the MCP TypeScript SDK, which speaks MCP 2026-07-28. A server on the version 1 SDK (@modelcontextprotocol/sdk) also works, but cannot use the stateless request shape in Stateless MCP.

Make a key

npx @atrib/cli keygen

This prints two lines. ATRIB_PRIVATE_KEY is the 32-byte Ed25519 seed that signs your records: keep it secret and set it in your server's environment. ATRIB_PUBLIC_KEY is the key verifiers will see on every record as creator_key.

Wrap the server

server.ts
import { McpServer } from '@modelcontextprotocol/server'
import { atrib } from '@atrib/mcp'

const server = atrib(new McpServer({ name: 'my-tool', version: '1.0.0' }), {
  creatorKey: process.env.ATRIB_PRIVATE_KEY!,
  serverUrl: 'https://my-tool.example.com',
})

Register tools the usual way. The wrapper does not change their arguments or results. serverUrl is your server's canonical URL: it and the tool name derive the record's content_id, so keep it stable.

Signing never blocks the call. If the key is missing, or the log cannot be reached, the tool still answers as it would without atrib, and the record is queued or skipped.

Find your records

Call a tool once, then open the explorer at https://explore.atrib.dev/identity/<your ATRIB_PUBLIC_KEY>. Each record has its own page under /action/<record_hash>.

Records are grouped by context_id. Unless the client sends atrib context with the call, each call starts a context of its own, so ten calls show as ten sessions. Set autoChain: true in the options to keep one context per server process and chain its calls together.

The log shows the 90-byte commitment for each record: its hash, your key, the context, the time and the event type. It never shows arguments or results.

Next