Package Exports
- @agent-receipts/mcp-server
Readme
@agent-receipts/mcp-server
Local-first MCP server for Agent Receipts. Cryptographically signed, verifiable proof for every AI agent action. No hosted server required.
Quick Start
Add to your MCP client config and every agent action gets a cryptographic receipt automatically.
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"agent-receipts": {
"command": "npx",
"args": ["@agent-receipts/mcp-server"]
}
}
}Claude Code
Add to .mcp.json in your project root:
{
"mcpServers": {
"agent-receipts": {
"command": "npx",
"args": ["@agent-receipts/mcp-server"]
}
}
}Cursor
Add to .cursor/mcp.json in your project root:
{
"mcpServers": {
"agent-receipts": {
"command": "npx",
"args": ["@agent-receipts/mcp-server"]
}
}
}Tools
The MCP server exposes 8 tools:
| Tool | Description | Key Parameters |
|---|---|---|
track_action |
Track an agent action with automatic hashing | action, input, output, status |
create_receipt |
Create a receipt with pre-computed hashes | action, input_hash, output_hash |
complete_receipt |
Complete a pending receipt with results | receipt_id, output, status |
verify_receipt |
Verify the cryptographic signature of a receipt | receipt_id |
get_receipt |
Retrieve a receipt by ID | receipt_id |
list_receipts |
List receipts with optional filtering | agent_id, status, chain_id |
get_chain |
Get all receipts in a chain ordered by timestamp | chain_id |
get_public_key |
Export the Ed25519 public key for verification | — |
Configuration
| Environment Variable | Description | Default |
|---|---|---|
AGENT_RECEIPTS_DATA_DIR |
Data directory path | ~/.agent-receipts |
AGENT_RECEIPTS_AGENT_ID |
Default agent ID | default-agent |
AGENT_RECEIPTS_ORG_ID |
Organization ID | default-org |
AGENT_RECEIPTS_ENVIRONMENT |
Environment label | production |
RECEIPT_SIGNING_PRIVATE_KEY |
Ed25519 private key (hex) | Auto-generated |
RECEIPT_SIGNING_PUBLIC_KEY |
Ed25519 public key (hex) | Derived from private |
Programmatic Usage
The engine and storage classes are exported for use by @agent-receipts/sdk and custom integrations:
import { ReceiptEngine, ReceiptStore, KeyManager, ConfigManager } from '@agent-receipts/mcp-server'
const store = new ReceiptStore('/path/to/data')
await store.init()
const keyManager = new KeyManager('/path/to/data')
await keyManager.init()
const configManager = new ConfigManager('/path/to/data')
await configManager.init()
const engine = new ReceiptEngine(store, keyManager, configManager)
const receipt = await engine.track({ action: 'my_action', input: 'data' })License
MIT