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.
Available Tools
14 toolscheck_revocationA
Check whether a specific credential JTI is currently revoked. Use this for a one-time revocation lookup when you already know the credential ID; it does not verify signature, expiry, or task history. Returns a small revocation status object, and network or API failures are returned as MCP errors.
Inputs: jti (required).
delegate_credentialA
Create a narrower child credential from an existing parent credential. Use this when handing work to a sub-agent or isolated step that should receive only a subset of the parent scope. The server enforces that child_scope is a subset of the parent; if you need the original root authority, use issue_credential instead.
Inputs: parent_token (required), child_agent (required), child_scope (required), ttl_seconds.
deny_approvalA
Reject a pending approval challenge without minting a child credential. Use this when a human declines the requested access; for passive inspection use get_approval instead. This changes the approval status in Attest and returns the final rejected state for that challenge.
Inputs: challenge_id (required).
get_approvalA
Fetch the current status for one approval challenge by challenge_id. Use this after request_approval when you need a one-time status check for whether the request is still pending, approved, or rejected; it does not perform repeated polling by itself. Returns the approval record from Attest, and invalid or unknown challenge IDs will surface as an MCP error response.
Inputs: challenge_id (required).
get_audit_trailA
Fetch the full audit event chain for a single task tree. Use this when you already know the task_id and need detailed chronology for issuance, delegation, actions, lifecycle events, approvals, or revocations; use list_tasks first if you need to discover candidate tasks. Returns the raw Attest audit events for that task and does not change state.
Inputs: task_id (required).
get_evidenceA
Fetch the signed evidence packet for one task tree. Use this when you need a portable proof artifact for compliance review, incident analysis, or independent verification; use get_audit_trail for a simpler raw event timeline. Returns the full evidence packet produced by Attest and does not mutate any task state.
Inputs: task_id (required).
grant_approvalA
Approve a pending approval challenge and mint the HITL-authorized child credential. Use this only when a human approver has already authenticated and you have their OIDC identity token; for status checks use get_approval instead. This changes system state, consumes the pending approval, and returns the delegated token that should be used for the gated step.
Inputs: challenge_id (required), id_token (required).
issue_credentialA
Issue a new root credential for a task. Use this at the start of a workflow when an orchestrator or top-level agent needs explicit scoped authority tied to a human user and instruction. Returns a signed JWT plus claims including the task tree ID; use delegate_credential for child agents instead of issuing multiple unrelated root credentials.
Inputs: agent_id (required), user_id (required), scope (required), instruction (required), +1 more.
list_tasksA
List recent Attest task trees for the authenticated organization, optionally filtered by user, agent, status, or limit. Use this to recover recent workflows when you do not already know the task ID; use get_audit_trail or get_evidence once you have a specific task_id. This is a read operation that returns task summaries only and does not mutate task state.
Inputs: user_id, agent_id, status, limit.
report_actionA
Append a tool execution outcome to the Attest audit log for the credential in use. Use this after a meaningful business action such as sending email, updating billing, or calling an internal API; it records side effects rather than authorizing them. Returns a small confirmation object, and callers should use report_status for lifecycle transitions like started or completed.
Inputs: token (required), tool (required), outcome (required), meta.
report_statusA
Append an agent lifecycle event such as started, completed, or failed to the Attest audit log. Use this to mark step boundaries or overall task progress; use report_action for concrete tool outcomes instead. Returns a confirmation object and does not mint, verify, or revoke credentials.
Inputs: token (required), status (required), meta.
request_approvalA
Create a pending approval request for a high-risk delegation. Use this after issuing or delegating a credential when a human must approve extra scope before work continues. Requires a valid parent token and returns a challenge object that can later be inspected with get_approval or resolved with grant_approval or deny_approval.
Inputs: parent_token (required), agent_id (required), att_tid (required), intent (required), +1 more.
revoke_credentialA
Revoke one credential and cascade that revocation through all of its descendants in the same task tree. Use this when a workflow should be stopped or contained; this is a state-changing operation, not a dry run. Returns a confirmation object, and later checks should use check_revocation or list_tasks rather than calling revoke_credential again.
Inputs: jti (required), revoked_by.
verify_credentialA
Perform an offline-style validity check for one credential using the org JWKS fetched from Attest. Use this to inspect a token before acting on it or when debugging why a credential was rejected; for revocation-only checks use check_revocation instead. Requires the org_id that issued the token and returns validity, decoded claims, and warning details.
Inputs: token (required), org_id (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 14 tools
Every tool targets a distinct action or resource: credential issuance vs delegation, verification vs revocation-only checks, audit trail vs evidence retrieval, and action logging vs status reporting are all clearly separated, often with explicit cross-references in the descriptions.
All tools use a consistent verb_noun convention (issue_credential, list_tasks, grant_approval), with straightforward nouns and predictable prefixes.
14 tools is a well-scoped surface for the attestation domain: credential lifecycle, audit/evidence, reporting, and approval workflows are all represented without redundancy.
Coverage is complete for the stated purpose: issuing and delegating credentials, revocation, verification, task discovery, audit/evidence retrieval, reporting, and the full approval lifecycle are all present with no apparent dead ends.
Maintenance
Related MCP Connectors
MCP server for mandates, delegation, policy-gated execution, credential grants, and audit.
One MCP server for all your MCP servers: code mode, per-tool permissions, approvals and audit.
Independent trust scores, tool surfaces and change history for MCP servers.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceThe Stripe Model Context Protocol server allows you to integrate with Stripe APIs through function calling. This protocol supports various tools to interact with different Stripe services.31,367 npm2,068-
- AlicenseNot gradedqualityFmaintenanceThis read-only MCP Server allows you to connect to Zendesk data from Claude Desktop through CData JDBC Drivers. For full CRUD support, check out the first managed MCP platform: CData Connect AI (https://www.cdata.com/ai/).1MIT
- AlicenseNot gradedqualityDmaintenanceMCP Server for AI agent identity and authorization. Create, verify, and manage agent identities with trust scores and scoped authorization tokens.48 PyPIMIT
- FlicenseNot gradedqualityCmaintenanceMCP server that evaluates agent actions against a Policy State Machine, emits a tamper-evident audit trail, and dispatches approved transitions to internal or federated handlers.-