Baton
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
🏃 Baton
Pass the context, not the chat log.
Secure, verifiable knowledge handoff for AI agents and the teams that use them.
Baton turns any agent session — Claude Code, Cursor, Copilot, Codex, Gemini CLI, Windsurf, your own agents — into a signed, redacted Handoff Packet that another person or agent can pick up and continue in seconds.
Quickstart · Agents · Teams & enterprise · Packet spec · Self-hosting · Security · SOC 2 mapping
Why
Real work now happens inside agent sessions — and that context dies when the session ends, the shift changes, or a person leaves. Copy-pasted transcripts are huge, noisy, leak secrets, and can't be checked.
Transcript / chat export | Hand-written doc | Baton packet | |
Small enough to load into any agent | ❌ | ✅ | ✅ |
Every claim cites a checkable source | ❌ | rarely | ✅ |
Detects when sources changed since | ❌ | ❌ | ✅ |
Secrets/PII removed before it leaves your machine | ❌ | ❌ | ✅ |
Tamper-evident (signed) | ❌ | ❌ | ✅ |
Expiring, revocable, audited | ❌ | ❌ | ✅ |
Works across vendors/tools | ❌ | ✅ | ✅ |
Safe against prompt injection on receive | ❌ | n/a | ✅ fenced as untrusted data |
Related MCP server: synapse-layer
How it works
flowchart LR
subgraph Sender["Sender machine"]
A[Agent session<br/>Claude Code · Cursor · Codex …] -->|/handoff| M1[baton MCP / CLI]
M1 --> R[Local redaction] --> S[ed25519 signing]
end
S -->|file, git, or TLS upload| T[(Baton team server<br/>encrypted at rest · RBAC · audit)]
T -->|link / id| M2
subgraph Receiver["Receiver machine"]
M2[baton MCP / CLI] --> V[Verify hash + signature<br/>re-check every file:line source] --> B[Agent context<br/>fenced as untrusted data]
end/handoff— your agent drafts a packet: summary, atomic facts with sources, decisions with rejected alternatives, pitfalls (dead ends), and open items with a concrete next step. You review it.Redact + sign locally — 29 secret/PII detectors (cloud keys, tokens, JWTs, private keys, connection strings, cards, emails, high-entropy strings, your org's custom patterns) run before anything leaves the machine. Then the packet is hashed and signed with your ed25519 key.
Share — as a file, in git, or via your team's Baton server (expiring, revocable links; every read audited).
/receive— the receiving agent verifies integrity, re-checks everyfile:linesource against its working tree (ok / moved / changed / missing → stale), and loads the packet fenced as untrusted data so instructions hidden in a packet can't hijack it. It summarizes, flags stale facts and proposes the next step — then waits for you.
Quickstart
Packages are published under
@batonhq/*. Until the first npm release, build from source:git clone https://github.com/RK905/baton && cd baton && pnpm install && pnpm build, then usenode packages/cli/dist/index.jsforbatonandnode packages/mcp/dist/index.jsfor the MCP server.
Solo (no server) — 60 seconds
npm i -g @batonhq/cli
baton init --user you@example.com # creates ~/.baton and your signing key
# Claude Code
claude mcp add baton -- npx -y @batonhq/mcp
# …or install the plugin (adds /handoff + /receive + skills):
# /plugin marketplace add RK905/baton
# /plugin install baton@batonIn a session: /handoff me "auth refactor — day 1". Tomorrow, in a fresh session (or a different tool):
/receive last.
Team
# 1. Run the server (Postgres + Baton)
echo "BATON_ENCRYPTION_KEYS=k1:$(openssl rand -base64 32)" > .env
docker compose up -d
docker compose run --rm baton bootstrap --slug acme --name "Acme" --email you@acme.com # prints an owner API key once
# 2. Each teammate
export BATON_API_KEY=bk_… # or sign in with your IdP token (OIDC)
baton login --server https://baton.acme.internal --register-keyNow /handoff to sam@acme.com returns a link; Sam runs /receive <link> in Cursor, Codex, or wherever they work.
CLI only (CI, scripts, non-MCP tools)
baton create -t "Flaky checkout test" -s "Fails 1 in 20 on CI; timing race in cart fixture." \
--fact "Race is in fixture setup | file:tests/fixtures/cart.ts:41" \
--next "Await cart.ready() before asserting" --pitfall "Retrying the job only hides it" --to team:web
baton send last --to server # redact → sign → upload → link
baton receive https://baton.acme.internal/s/… # verify → print for an agent
baton query last "why not just add a retry?" # retrieve the decision that answers it
baton verify ./handoff.baton.json --strict # CI gate: fail on integrity errors or stale sourcesWorks with your agents
Baton is an MCP server plus a CLI and SDKs, so it's vendor-neutral by design.
Agent | Setup |
Claude Code | Plugin: |
Claude Desktop | |
Cursor | |
VS Code / GitHub Copilot agent mode | |
Windsurf | |
OpenAI Codex CLI | |
Gemini CLI | |
Zed | |
Any MCP client |
|
Python agents (LangGraph, CrewAI, OpenAI Agents SDK, AutoGen, custom) | |
TypeScript agents / services |
MCP tools: handoff_create · handoff_redact · handoff_send · handoff_receive · handoff_verify ·
handoff_query · handoff_list · handoff_revoke. Prompts: handoff, receive. Resources: baton://packet/{id}.
For teams and enterprise
The open-source Baton team server (apps/server) is built for multi-team, regulated environments:
Area | What you get |
Identity | API keys (hashed, scoped, expiring), OIDC SSO (Okta, Entra ID, Google, Auth0, Keycloak) with JIT provisioning and group→role mapping, SCIM 2.0 user provisioning/deprovisioning |
Access control | Roles |
Multi-tenancy | Every row is org-scoped; packet ids can't collide or be probed across orgs (uniform 404s) |
Data protection | Client-side redaction plus server-side re-scan with org rules; AES-256-GCM envelope encryption at rest with key rotation and row-bound AAD; ed25519 signatures with an org signing-key registry ( |
Sharing controls | Expiring links, max-view links, org-only links by default, anonymous links only if policy allows (and never for confidential), revoke packet → every link dies, reshare permission |
Audit | Every create/read/query/link/revoke/admin action recorded in the same transaction as the change, hash-chained per org (tamper-evident; |
Governance | Org policy: expiry caps, retention (crypto-shred content after N days), audit retention, allowed classifications, custom redaction rules/allowlists, SSO-only for humans |
Integrations | HMAC-signed webhooks ( |
Operations | Stateless replicas, Postgres, |
See docs/compliance/soc2.md for how these controls map to the SOC 2 Trust Services
Criteria, and docs/security/threat-model.md for the threat model.
Baton gives you controls that support a SOC 2 program; it is not itself a certification. Your deployment, processes and auditor determine compliance.
The packet
{
"manifest": {
"spec": "baton/1.0", "id": "hp_01M8RYMYH0F96QHJKDPGXRCJQW",
"title": "Stage SQS sendMessage denied — root cause + fix",
"author": { "type": "human+agent", "user": "alex@example.com", "agent": "claude-code" },
"recipients": ["sam@example.com"], "status": "in_progress", "classification": "internal",
"scope": { "repos": ["orders-service"], "envs": ["stage"], "tags": ["sqs", "iam"] },
"expires_at": "2026-12-31T14:03:00.000Z",
"redaction": { "engine": "baton-redact/0.1", "findings": 0, "by_rule": {}, "reviewed_by_author": true },
"hash": "sha256:…", "signature": { "alg": "ed25519", "key_id": "k_…", "public_key": "…", "value": "…" }
},
"summary": "Producer lambdas on stage fail with AccessDenied… root cause is the queue resource policy…",
"facts": [{ "id": "f2", "claim": "Producer reads the queue URL from queues.orders",
"source": { "type": "file", "value": "orders-service/lambda/producer/main.ts:88", "hash": "sha256:…" },
"confidence": "verified" }],
"decisions": [{ "id": "d1", "decision": "Fix the queue policy, not the lambda role",
"rationale": "Role already allows SendMessage", "alternatives": ["Widen the IAM role"], "fact_ids": ["f1", "f3"] }],
"open_items": [{ "id": "o1", "text": "Update inventory-events policy principal to stage", "requires_confirmation": true }],
"pitfalls": [{ "id": "p1", "text": "CloudTrail shows the role as principal — looks like IAM, it isn't." }]
}Full spec: docs/spec.md · JSON Schema: packages/spec/schema/packet.schema.json ·
Examples: examples/
Repository layout
packages/
spec/ @batonhq/spec packet schema (zod + JSON Schema), canonical hashing, ed25519 signatures
redact/ @batonhq/redact local secret/PII detectors and redaction
core/ @batonhq/core build, source fingerprinting/verification, rendering, query, local store, transport
mcp/ @batonhq/mcp MCP server (stdio) — tools, prompts, resources
cli/ @batonhq/cli `baton` command
sdk/ @batonhq/sdk TypeScript client for the team server API
apps/
server/ @batonhq/server multi-tenant team server (Hono + Postgres)
sdks/python/ baton-sdk Python client + packet builder (wire-compatible signatures)
plugins/ Claude Code plugin + configs for Cursor, VS Code, Windsurf, Codex, Gemini CLI, Zed, Desktop
deploy/helm/ Helm chart
docs/ spec, architecture, API, self-hosting, SSO/SCIM, security, compliance
examples/ signed example packets (also used as cross-language test fixtures)Development
pnpm install
pnpm build # all packages
pnpm test # unit + server end-to-end tests (embedded Postgres via PGlite — no Docker needed)
pnpm dev:server # server on :8080 with in-memory DBDocs: architecture · API reference · SSO & SCIM · contributing.
Roadmap
Packet spec v1.0, local redaction, signing, source verification
MCP server, CLI, Claude Code plugin, configs for 8 agents
Team server: RBAC, teams, OIDC SSO, SCIM, audit chain, retention, webhooks, encryption at rest
Python + TypeScript SDKs
Web dashboard (team library, search, lineage graph) with browser SSO login
Semantic search across a team's packets (pgvector), knowledge distillation → PRs into
CLAUDE.md/ rules filesEnd-to-end encrypted packets (recipient public keys; server never sees plaintext)
Native Slack / GitHub PR / Linear / PagerDuty apps
SCIM Groups → teams, data-residency routing, customer-managed keys (KMS)
Eval harness: recorded sessions → packets → a fresh agent must answer and act correctly
Contributing & security
Contributions welcome — see CONTRIBUTING.md. Please report vulnerabilities privately as described in SECURITY.md.
License
MIT. "Claude", "Cursor", "Copilot", "Codex", "Gemini" and other names are trademarks of their owners; Baton is an independent project and is not affiliated with or endorsed by them.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Agent-native notes, tasks, dev-docs, vaults, sync & handoffs. MCP + OpenAPI dual surface.
MCP-native Trust Infrastructure for AI Agents. Persistent encrypted memory with Trust Quotient.
Tamper-evident proof creation and verification for AI agents via MCP, A2A, and REST.
Hash-chained HMAC-signed audit log MCP for A2A (agent-to-agent) calls. Every tool-call, agent-ha...
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceSecure, local-first collaboration layer for AI agent teams, enabling authenticated agent-to-agent communication, shared memory with provenance, and scoped service execution through MCP.Apache 2.0

synapse-layerofficial
AlicenseBqualityBmaintenanceMCP-native persistent memory for AI agents. Stores and retrieves encrypted memories with Trust Quotient scoring, cross-agent handover protocol, and immutable audit trail. 13 tools. Remote endpoint available.1348 PyPI13Apache 2.0- AlicenseNot gradedqualityDmaintenanceEnables AI agents to create and verify tamper-evident cryptographic evidence, manage key-bound Agent Passports, and support verifiable handoffs, approvals, and audit trails through MCP, REST, and A2A.MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI coding sessions across multiple agent CLIs to share one identity and inbox, hand off tasks, send encrypted files and conversation transcripts, publish living documents, and coordinate approvals through hooks and MCP tools.53 npmMIT