@aegisaudit/mcp-server
v0.5.0
Published
MCP server for the AEGIS Protocol — exposes on-chain ZK skill attestation queries as MCP tools
Downloads
962
Maintainers
Readme
@aegisaudit/mcp-server
MCP server for the AEGIS Protocol — exposes on-chain ZK skill attestation queries as tools for AI agents.
Works with Claude Desktop, Claude Code, Cursor, and any MCP-compatible client.
Install
npm install -g @aegisaudit/mcp-serverOr run directly:
npx @aegisaudit/mcp-serverConfiguration
Claude Desktop
Add to your Claude Desktop config file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"aegis-protocol": {
"command": "npx",
"args": ["-y", "@aegisaudit/mcp-server"]
}
}
}Claude Code
claude mcp add aegis-protocol -- npx -y @aegisaudit/mcp-serverCursor
Add to .cursor/mcp.json in your project:
{
"mcpServers": {
"aegis-protocol": {
"command": "npx",
"args": ["-y", "@aegisaudit/mcp-server"]
}
}
}Interactive Setup
Run the built-in installer to auto-configure your MCP client:
npx @aegisaudit/mcp-server setupAvailable Tools
Discovery
| Tool | Description |
|---|---|
| aegis-info | Get protocol information, contract addresses, and setup guidance |
| wallet-status | Check wallet connection and auditor registration status |
Read Operations
| Tool | Description |
|---|---|
| list-all-skills | List all skills registered on the AEGIS Registry |
| list-all-auditors | List all registered auditors |
| get-attestations | Get attestations for a specific skill by hash |
| verify-attestation | Verify a ZK proof on-chain for a given attestation |
| get-auditor-reputation | Query an auditor's reputation and stake |
| get-metadata-uri | Get the metadata URI for a registered skill |
| list-disputes | List open disputes (optionally filtered by skill) |
| list-resolved-disputes | List resolved disputes |
Write Operations
These require AEGIS_PRIVATE_KEY to be set.
| Tool | Description |
|---|---|
| register-auditor | Register as an auditor by staking ETH |
| add-stake | Add more stake to your auditor registration |
| open-dispute | Open a dispute against a skill attestation |
Environment Variables
| Variable | Default | Description |
|---|---|---|
| AEGIS_CHAIN_ID | 84532 | Chain ID (84532 = Base Sepolia) |
| AEGIS_RPC_URL | Public RPC | Custom RPC endpoint |
| AEGIS_PRIVATE_KEY | — | Private key for write operations |
Example with a custom RPC and wallet:
{
"mcpServers": {
"aegis-protocol": {
"command": "npx",
"args": ["-y", "@aegisaudit/mcp-server"],
"env": {
"AEGIS_CHAIN_ID": "84532",
"AEGIS_RPC_URL": "https://base-sepolia.g.alchemy.com/v2/YOUR_KEY",
"AEGIS_PRIVATE_KEY": "0x..."
}
}
}
}Wallet Setup
Write operations (registering as an auditor, staking, opening disputes) require a wallet with Base Sepolia ETH.
- Export a private key from your wallet
- Set
AEGIS_PRIVATE_KEYin your MCP config - Get testnet ETH from the Base Sepolia Faucet
The server will guide you through setup if no wallet is configured — just ask your AI agent to check your wallet-status.
Trust-Gating Agent Tool Calls
If your agent uses tools that correspond to AEGIS-registered skills, use @aegisaudit/consumer-middleware to automatically verify trust before execution:
npm install @aegisaudit/consumer-middlewareimport { TrustGate } from '@aegisaudit/consumer-middleware';
import { aegisMcpMiddleware } from '@aegisaudit/consumer-middleware/mcp';
// Configure trust policy
const gate = new TrustGate({
policy: {
minAuditLevel: 2, // Require L2+ audited skills
blockOnDispute: true, // Block skills with open disputes
mode: 'enforce', // Hard block on failure
},
skills: [
{ toolName: 'query-database', skillHash: '0x...' },
{ toolName: 'send-email', skillHash: '0x...' },
],
});
// Wrap your MCP tool handler
server.setRequestHandler(CallToolRequestSchema,
aegisMcpMiddleware(gate, originalHandler)
);The middleware queries the AEGIS subgraph (with on-chain fallback) and blocks tools that don't meet your policy. See the consumer middleware docs for LangChain, CrewAI, and custom agent loop examples.
Links
License
MIT
