Skip to main content
Glama
attest-mcp-server
by chudah1

Attest

License: Apache 2.0

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

gmail:send

Send via Gmail only

gmail:*

All Gmail actions

*:read

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.html

If 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/attest

API reference

Method

Path

Description

POST

/v1/orgs

Create an organization and get an API key

POST

/v1/credentials

Issue a root credential

POST

/v1/credentials/delegate

Delegate to a child agent

GET

/v1/actions

List action requests

POST

/v1/actions/request

Create an action request and run policy

GET

/v1/actions/{id}

Fetch an action request

POST

/v1/actions/{id}/approve

Approve a pending action

POST

/v1/actions/{id}/deny

Deny a pending action

POST

/v1/actions/{id}/execute

Record execution and mint a receipt

GET

/v1/actions/{id}/receipt

Fetch the signed execution receipt

DELETE

/v1/credentials/{jti}

Revoke credential and all descendants

GET

/v1/revoked/{jti}

Check revocation status (public, no auth)

GET

/v1/tasks/{tid}/audit

Retrieve the audit chain for a task

POST

/v1/audit/report

Report an agent action to the audit log

POST

/v1/audit/status

Report agent lifecycle event (started/completed/failed)

POST

/v1/approvals

Request human-in-the-loop approval

POST

/v1/approvals/{id}/grant

Grant a pending HITL approval

GET

/orgs/{orgId}/jwks.json

Public key set for offline verification

GET

/health

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 tools
check_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

    A4.5/5.0

    Scored across 14 tools

    Disambiguation5/5

    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.

    Naming Consistency5/5

    All tools use a consistent verb_noun convention (issue_credential, list_tasks, grant_approval), with straightforward nouns and predictable prefixes.

    Tool Count5/5

    14 tools is a well-scoped surface for the attestation domain: credential lifecycle, audit/evidence, reporting, and approval workflows are all represented without redundancy.

    Completeness5/5

    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

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      The 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 npm
      2,068
      -
    • A
      license
      Not graded
      quality
      F
      maintenance
      This 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/).
      1
      MIT
    • F
      license
      Not graded
      quality
      C
      maintenance
      MCP 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.
      -