MCP Integration (AI Agent Tools)
dregg exposes its capabilities as MCP (Model Context Protocol) tools over
JSON-RPC 2.0 stdio transport. AI assistants (Claude, GPT, etc.) can discover
and invoke tools to interact with the federation.
Running the MCP Server
dregg-node mcp --data-dir ~/.dregg --federation-peers "peer1:8420"
This reads JSON-RPC from stdin and writes responses to stdout. Configure your AI assistant to launch this as a tool server.
Available Tools
The MCP server exposes these tools via tools/list:
- authorize -- Authorize an action with a held token
- mint_token -- Create a new root capability token
- attenuate -- Restrict a token's permissions
- delegate -- Hand an attenuated token to another agent
- submit_turn -- Execute a state transition
- post_intent -- Broadcast a capability need
- list_tokens -- Show all held tokens
- node_status -- Federation status and sync state
- seal -- Encrypt data under a capability (X25519-ChaCha20Poly1305)
- unseal -- Decrypt sealed data
Protocol
Implements the MCP subset for tool serving:
initialize-- Capability negotiationnotifications/initialized-- Client readiness (no response)tools/list-- Enumerate available toolstools/call-- Invoke a tool
The JSON-Schema for each tool's input/output is served from the
tools/list endpoint at runtime — point your MCP client at
a running dregg-node and read the live schema rather than chasing a
copy in these docs. End-to-end transcripts and authorisation patterns
(read-only cap, scoped writer, federation observer) are covered in
docs/agent-authorization.md.