io.github.chudah1/attest-mcp

Registre officiel Autres

Credential enforcement middleware for MCP servers — verifies scoped tokens on every tool call

Installation

Ajoutez ceci à la configuration MCP de votre client (Claude Desktop : claude_desktop_config.json ; Cursor : .cursor/mcp.json ; VS Code et les autres utilisent la même forme « mcpServers »).

NPM package @attest-dev/mcp
Claude Code
claude mcp add attest-mcp -e 'ATTEST_BASE_URL=<ATTEST_BASE_URL>' -- npx -y @attest-dev/mcp@0.1.0
Configuration JSON (Claude Desktop, Cursor, VS Code)
{
    "mcpServers": {
        "attest-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "@attest-dev/mcp@0.1.0"
            ],
            "env": {
                "ATTEST_BASE_URL": "<ATTEST_BASE_URL>"
            }
        }
    }
}

Variables d'environnement

  • ATTEST_BASE_URL Base URL of the Attest server

Documentation

Tirée du README du projet sur GitHub, actualisée chaque semaine. Les liens ouvrent GitHub.

Sommaire
  1. Attest
  2. Quickstart (TypeScript)
  3. Scope syntax
  4. Getting started
  5. API reference
  6. Specification
  7. License

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);

Scope syntax

Scopes follow the pattern resource:action. Either field may be * as a wildcard.

ExpressionMeaning
gmail:sendSend via Gmail only
gmail:*All Gmail actions
*:readRead 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

MethodPathDescription
POST/v1/orgsCreate an organization and get an API key
POST/v1/credentialsIssue a root credential
POST/v1/credentials/delegateDelegate to a child agent
GET/v1/actionsList action requests
POST/v1/actions/requestCreate an action request and run policy
GET/v1/actions/{id}Fetch an action request
POST/v1/actions/{id}/approveApprove a pending action
POST/v1/actions/{id}/denyDeny a pending action
POST/v1/actions/{id}/executeRecord execution and mint a receipt
GET/v1/actions/{id}/receiptFetch 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}/auditRetrieve the audit chain for a task
POST/v1/audit/reportReport an agent action to the audit log
POST/v1/audit/statusReport agent lifecycle event (started/completed/failed)
POST/v1/approvalsRequest human-in-the-loop approval
POST/v1/approvals/{id}/grantGrant a pending HITL approval
GET/orgs/{orgId}/jwks.jsonPublic key set for offline verification
GET/healthHealth check

Specification

The credential format is defined in spec/WCS-01.md (Attest Credential Standard, revision 01).


License

Apache 2.0 — see LICENSE.

Questions fréquentes

Qu'est-ce que io.github.chudah1/attest-mcp ?

Credential enforcement middleware for MCP servers — verifies scoped tokens on every tool call

Comment installer io.github.chudah1/attest-mcp ?

Il s'exécute sur votre machine. Dans Claude Code : claude mcp add attest-mcp -e 'ATTEST_BASE_URL=<ATTEST_BASE_URL>' -- npx -y @attest-dev/mcp@0.1.0. Pour les autres clients, collez la configuration JSON de cette page dans leurs réglages MCP.

Faut-il une clé API pour io.github.chudah1/attest-mcp ?

Son entrée au registre n'indique aucune clé ni secret obligatoire. Certaines fonctions peuvent tout de même demander un compte auprès du service auquel il se connecte.

io.github.chudah1/attest-mcp est-il open source ?

Oui. Son code est sur GitHub sous licence Apache-2.0.

Qui maintient io.github.chudah1/attest-mcp ?

Il est publié par chudah1. AI.tn le référence sans le maintenir ni le recommander.

Issu du registre MCP officiel. Être listé n'est pas une recommandation : vérifiez le code et les permissions d'un serveur avant de lui donner accès à vos données.