Agence exposes a Model Context Protocol (MCP) server over stdio transport. Any MCP-compatible client — Claude Desktop, VS Code Copilot, Cursor, Windsurf, or custom hosts — can use Agence’s governance, memory, and orchestration tools directly.
git clone https://github.com/l-agence/agence.git .agence
cd .agence && bun install
Add to your MCP configuration (e.g. claude_desktop_config.json, .vscode/mcp.json, ~/.cursor/mcp.json):
{
"mcpServers": {
"agence": {
"command": "bun",
"args": ["run", "/path/to/.agence/lib/mcp.ts"],
"env": {
"AGENCE_ROOT": "/path/to/.agence"
}
}
}
}
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}' | bun run lib/mcp.ts
You should see a valid JSON-RPC response with serverInfo.name: "agence".
| Tool | Description |
|---|---|
guard_check |
Check a command against AIPOLICY.yaml — returns tier, approved/denied, reason |
guard_classify |
Classify a command’s tier (T0-T4) without logging to ledger |
skill_run |
Execute an agence skill (^fix, ^review, ^hack, ^design, etc.) |
skill_list |
List all available skills with descriptions |
memory_retain |
Store knowledge in COGNOS 5-tier memory |
memory_recall |
Query memories by tags (ranked by importance × recency) |
memory_stats |
Memory statistics across all COGNOS tiers |
peers_run |
Multi-LLM consensus (3 independent models, weighted aggregation) |
ledger_status |
Audit ledger health — entry count, chain validity |
ledger_verify |
Verify Merkle chain integrity of audit ledger |
| Resource | URI | Description |
|---|---|---|
| Policy | agence://policy |
Current AIPOLICY.yaml (command gating rules) |
| Registry | agence://registry |
Agent registry (all 18 registered agents) |
| Agents | agence://agents |
Agent persona listing with detail URIs |
The primary use case: every command your AI agent wants to run passes through guard_check first.
Client → guard_check("rm -rf /tmp/data")
Server → { tier: "T3", action: "deny", reason: "Blocked: destructive rm" }
Client → guard_check("git status")
Server → { tier: "T0", action: "allow", reason: "Allowed by whitelist.git_cli" }
Unknown commands default to T2 (human approval required). Fail-closed.
Route any question to 3 independent LLMs for weighted consensus:
Client → peers_run({ skill: "review", query: "Is this auth implementation secure?" })
Server → { finding: "...", confidence: 87, agreement: "majority", peers: [...] }
Available skills: solve, review, analyze, plan
Flavors: code (Claude + GPT-4o + Gemini), light (Haiku + GPT-4o-mini + Flash), heavy (Opus + GPT-4 + Pro)
guard_check runs subprocess with spawnSync array form (no shell injection)ANTHROPIC_API_KEY, etc.) are runtime env vars, never persisted in the packageWarning: Do NOT expose this server over HTTP/SSE transport without adding an authentication layer. The stdio transport is inherently secure (only the spawning process can communicate), but a network transport would allow unauthenticated callers to invoke
peers_run(consuming your LLM API credits) orskill_run(executing skills on your machine).
| Dependency | Version |
|---|---|
| Bun | ≥ 1.3 |
| @modelcontextprotocol/sdk | ^1.29.0 |
| zod | ^4.3.6 |
2024-11-05{ name: "agence", version: "1.0.0" }