attest-mcp-server
The attest-mcp-server is a control plane for AI agents, providing scoped credential management, immutable audit logging, and human-in-the-loop approvals.
Credential Management
Issue credentials — Create root signed JWTs scoped to a human user and instruction
Delegate credentials — Create narrower child credentials from a parent, enforcing child scopes are a strict subset
Revoke credentials — Revoke a credential and cascade revocation to all descendants
Verify credentials — Check validity using the org's JWKS
Check revocation — Look up revocation status by credential ID (JTI)
Task & Audit Visibility
List tasks — Retrieve recent task trees with optional filters by user, agent, or status
Get audit trail — Fetch the full chronological audit event chain for a task tree
Get evidence — Retrieve a signed, portable evidence packet for compliance or incident review
Audit Logging
Report action — Append a tool execution outcome (success/failure/error/skipped) to the audit log
Report status — Record agent lifecycle events (started/completed/failed)
Human-in-the-Loop Approvals
Request approval — Create a pending approval challenge for high-risk delegations requiring human sign-off
Get approval — Check the status of a pending approval challenge
Grant approval — Approve a challenge via OIDC identity token, minting an authorized child credential
Deny approval — Reject a pending approval without issuing any credential
Allows authorization and auditing of actions targeting Gmail, such as sending emails, by issuing scoped credentials and recording signed execution receipts.
Allows authorization and auditing of risky actions targeting Stripe, such as processing refunds or credits, by issuing scoped credentials and recording signed execution receipts.
Attest
Attest controls and proves risky AI actions before they hit production systems. It gives agents signed, scope-limited credentials, routes high-risk mutations through policy and optional approval, issues short-lived execution grants, and leaves signed receipts that can be verified later.
This repository also includes a standalone MCP server:
TypeScript MCP server — a real stdio Model Context Protocol server that exposes Attest tools like
issue_credential,delegate_credential,list_tasks,get_audit_trail,get_evidence, and approval actions.TypeScript MCP middleware — middleware for protecting your own MCP server with Attest.
Quickstart (TypeScript)
import { AttestClient } from '@attest-dev/sdk';
const client = new AttestClient({ baseUrl: 'http://localhost:8080', apiKey: 'dev' });
// 1. Issue a root credential for your agent workflow
const root = await client.issue({
agent_id: 'support-bot',
user_id: 'alice@acme.com',
scope: ['refund:execute', 'credit:execute'],
instruction: 'Review support incidents and safely process eligible refunds.',
});
// 2. Request a risky action before touching the target system
const action = await client.requestAction({
action_type: 'refund',
target_system: 'stripe',
target_object: 'order_ORD-4821',
action_payload: {
amount_cents: 4799,
currency: 'USD',
reason: 'damaged_item',
},
agent_id: 'support-bot',
sponsor_user_id: 'alice@acme.com',
att_tid: root.claims.att_tid,
});
if (action.status !== 'approved' || !action.grant?.token) {
throw new Error(`refund needs approval: ${action.status}`);
}
// 3. Execute with the short-lived grant, then record the receipt
const receipt = await client.executeAction(action.id, {
outcome: 'success',
provider_ref: 're_abc123',
response_payload: { stripe_status: 'succeeded' },
});
console.log(receipt.signed_packet_hash);
// 4. Fetch the immutable receipt later
const confirmed = await client.getReceipt(action.id);
console.log(confirmed.outcome, confirmed.provider_ref);Related MCP server: Zendesk MCP Server by CData
Scope syntax
Scopes follow the pattern resource:action. Either field may be * as a wildcard.
Expression | Meaning |
| Send via Gmail only |
| All Gmail actions |
| Read access to any resource |
| Full access (root grants only) |
Delegation still enforces that child scope is a strict subset of the parent scope. The Action API builds on top of that delegation substrate to gate risky writes.
Getting started
Prerequisites: Docker and Docker Compose.
# Clone and start everything
git clone https://github.com/chudah1/attest-dev
cd attest-dev
docker compose up --build
# The server is now running at http://localhost:8080
# PostgreSQL at localhost:5432
# Issue your first credential (replace YOUR_API_KEY with the key from POST /v1/orgs)
curl -s -X POST http://localhost:8080/v1/credentials \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-d '{
"agent_id": "orchestrator-v1",
"user_id": "usr_alice",
"scope": ["research:read", "gmail:send"],
"instruction": "Research competitors and email the board"
}' | jq .
# Open the interactive demo
open demo/index.htmlIf you want to run the Go server outside Docker, point it at the Compose database:
docker compose up -d postgres
cd server
DATABASE_URL=postgres://attest:attest@localhost:5432/attest go run ./cmd/attestAPI reference
Method | Path | Description |
|
| Create an organization and get an API key |
|
| Issue a root credential |
|
| Delegate to a child agent |
|
| List action requests |
|
| Create an action request and run policy |
|
| Fetch an action request |
|
| Approve a pending action |
|
| Deny a pending action |
|
| Record execution and mint a receipt |
|
| Fetch the signed execution receipt |
|
| Revoke credential and all descendants |
|
| Check revocation status (public, no auth) |
|
| Retrieve the audit chain for a task |
|
| Report an agent action to the audit log |
|
| Report agent lifecycle event (started/completed/failed) |
|
| Request human-in-the-loop approval |
|
| Grant a pending HITL approval |
|
| Public key set for offline verification |
|
| Health check |
Specification
The credential format is defined in spec/WCS-01.md (Attest Credential Standard, revision 01).
License
Apache 2.0 — see LICENSE.
Latest Blog Posts
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/chudah1/attest-dev'
If you have feedback or need assistance with the MCP directory API, please join our Discord server