attest-mcp-server
An MCP server that exposes tools for issuing scoped agent credentials, delegating narrower child credentials, handling approvals, revoking task trees, and retrieving audit trails and evidence packets.
README
Attest
Attest is a cryptographic credentialing standard for AI agent pipelines. When an orchestrator spawns sub-agents to complete a task, Attest issues each agent a short-lived, scope-limited JWT that is cryptographically bound to the original human instruction via a SHA-256 intent hash. Every delegation narrows scope, cannot outlive the parent, and is recorded in an append-only, hash-chained audit log — so the full chain of authority from a human principal down to any tool call is provable, revocable in a single operation, and independently verifiable by any party with access to the public key.
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, isScopeSubset } from '@attest-dev/sdk';
const client = new AttestClient({ baseUrl: 'http://localhost:8080', apiKey: 'dev' });
// 1. Issue a root credential for your orchestrator
const { token: rootToken, claims: root } = await client.issue({
agent_id: 'orchestrator-v1',
user_id: 'usr_alice',
scope: ['research:read', 'gmail:send'],
instruction: 'Research our top 3 competitors and email a summary to the board',
});
// 2. Delegate a narrowed credential to a sub-agent
const { token: childToken, claims: child } = await client.delegate({
parent_token: rootToken,
child_agent: 'email-agent-v1',
child_scope: ['gmail:send'], // subset of parent — enforced server-side
});
// 3. Verify offline (no network call after fetching JWKS once)
const jwks = await client.fetchJWKS('org_abc123');
const result = await client.verify(childToken, jwks);
console.log(result.valid, result.warnings);
// 4. Revoke the entire task tree in one call
await client.revoke(root.jti);
// 5. Retrieve the tamper-evident audit chain
const chain = await client.audit(root.att_tid);
chain.events.forEach(e => console.log(e.event_type, e.jti, e.created_at));
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 enforces that the child scope is a strict subset of the parent scope.
The utility isScopeSubset(parentScope, childScope) replicates this check client-side.
Getting started
Prerequisites: Docker and Docker Compose.
# Clone and start everything
git clone https://github.com/attest-dev/attest
cd attest
docker compose up
# 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
Without Docker (dev mode — ephemeral key, no database):
cd server
go run ./cmd/attest # starts on :8080, warns about missing DB
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 |
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.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。