@attest-dev/mcp-server
v0.1.1
Published
A stdio MCP server for Attest that exposes credential, approval, audit, and evidence tools
Maintainers
Readme
@attest-dev/mcp-server
Attest MCP Server for the Model Context Protocol.
This is a real stdio MCP server built with @modelcontextprotocol/sdk.
Agent hosts like Claude Desktop, Cursor, or Windsurf can connect to it and call Attest tools over MCP.
It currently exposes MCP tools for:
- issue scoped credentials for a task
- delegate narrower credentials to sub-agents
- request, approve, or deny human approvals
- revoke a credential chain
- inspect recent tasks, audit trails, and evidence packets
It currently defines:
- Tools: yes
- Resources: none
- Prompts: none
Install
Run it from npm:
npx -y @attest-dev/mcp-serverRequired environment variables:
ATTEST_API_KEY: Attest org API keyATTEST_BASE_URL: optional, defaults tohttps://api.attestdev.com
Example MCP config:
{
"mcpServers": {
"attest": {
"command": "npx",
"args": ["-y", "@attest-dev/mcp-server"],
"env": {
"ATTEST_API_KEY": "attest_live_xxx",
"ATTEST_BASE_URL": "https://api.attestdev.com"
}
}
}
}Repo location
If you are reviewing this repository for MCP support, the server lives here:
- package: package.json
- entrypoint: src/index.ts
- metadata: server.json
The tool implementations live in:
Implementation
The server is built with the MCP SDK and registers real MCP tools before connecting to a stdio transport:
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import { AttestClient } from "@attest-dev/sdk";
const client = new AttestClient({ baseUrl, apiKey });
const server = new McpServer({ name: "attest", version: "0.1.0" });
registerCredentialTools(server, client, baseUrl);
registerTaskTools(server, client);
registerReportingTools(server, client);
registerApprovalTools(server, client);
await server.connect(new StdioServerTransport());That implementation is in src/index.ts.
What this is for
Use this server when your agents do more than answer questions.
Once an agent can send email, touch CRM, update tickets, call internal APIs, or hand work to other agents, you usually need more than an API key and a log line. You need to know:
- who authorized the task
- what each agent was allowed to do
- whether a child agent was narrowed properly
- what happened when something was blocked
- how to revoke the whole chain if something goes wrong
Attest gives you that control and evidence layer. This MCP server makes those operations available inside MCP-native workflows.
Practical use case
Imagine a support operations assistant handling a refund request.
The top-level orchestrator receives a request like:
Refund the customer, update the billing system, and send a confirmation email.
Without Attest, the orchestrator often runs with broad access and child agents inherit too much of it. If the orchestrator is compromised, every downstream agent can keep acting with no clean chain of authority.
With Attest, the workflow looks like this:
- The orchestrator calls
issue_credentialfor the root task with scopes likebilling:writeandemail:send. - It delegates a narrower credential to a billing sub-agent using
delegate_credentialwith onlybilling:write. - It delegates a separate credential to a notification agent with only
email:send. - If the billing step is high-risk, it can call
request_approvaland wait for a human togrant_approvalbefore the refund goes through. - Each agent reports what it did using
report_actionorreport_status. - Later, an operator can use
list_tasks,get_audit_trail, andget_evidenceto reconstruct exactly what happened. - If the parent task needs to be shut down,
revoke_credentialcascades the revoke through the whole task tree.
That is the practical shape of Attest:
- scoped authority at every step
- narrower delegation across handoffs
- explicit approval for risky actions
- recoverable audit history
- evidence you can verify later
MCP tools
Credentials:
issue_credentialdelegate_credentialrevoke_credentialverify_credentialcheck_revocation
Tasks and evidence:
list_tasksget_audit_trailget_evidence
Audit reporting:
report_actionreport_status
Approvals:
request_approvalget_approvalgrant_approvaldeny_approval
Example flow
Issue a root credential:
{
"agent_id": "support-orchestrator",
"user_id": "usr_123",
"scope": ["billing:write", "email:send"],
"instruction": "Refund the customer, update billing, and send confirmation."
}Delegate to a billing sub-agent:
{
"parent_token": "<root jwt>",
"child_agent": "billing-agent",
"child_scope": ["billing:write"]
}List recent active tasks for a user:
{
"user_id": "usr_123",
"status": "active",
"limit": 10
}Fetch evidence for a finished task:
{
"task_id": "tid_abc123"
}Development
From this package directory:
npm install
npm run typecheck
npm run buildRun locally:
ATTEST_API_KEY=attest_live_xxx npm exec -- attest-mcp-server