The MCP server.
Open-source MCP server for Ligate attestation. Plug into Claude Desktop, Cursor, LangGraph, OpenAI Agents SDK, or any MCP-compatible agent in ~10 lines of setup.
@ligate/iris-mcp is an open-source (MIT) Model Context Protocol server. It exposes four tools that any MCP-compatible agent framework can call to post and verify cryptographic attestations on Ligate Chain.
Install
Node (TypeScript / JavaScript) is the v0.5 reference runtime.
npm install -g @ligate/iris-mcp # or npx -y @ligate/iris-mcp
The server runs on stdio (MCP's default transport). Nothing to configure at install time; the transport speaks to whichever agent framework spawned it.
Two modes
Pick one based on whether you want to run the relayer yourself or use the managed one.
- → Self-hosted (bring your own attestor) - you supply a Ligate attestor signing key; the server signs and submits attestations directly to the chain. You pay $LGT fees.
- → Managed relayer (recommended) - you supply an Iris relayer API key; the server forwards calls to the hosted relayer, which signs, submits, and bills your org in USD or USDC. See the relayer docs.
Agent framework configs
Claude Desktop
Add Iris to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or the equivalent on Windows / Linux.
{
"mcpServers": {
"ligate": {
"command": "npx",
"args": ["-y", "@ligate/iris-mcp"],
"env": {
"LIGATE_RELAYER_KEY": "lgir_live_..."
}
}
}
}Cursor
Cursor auto-discovers MCP servers listed in ~/.cursor/mcp.json.
{
"mcpServers": {
"ligate": {
"command": "npx",
"args": ["-y", "@ligate/iris-mcp"],
"env": {
"LIGATE_RELAYER_KEY": "lgir_live_..."
}
}
}
}LangGraph
from langchain_mcp_adapters.client import MultiServerMCPClient
client = MultiServerMCPClient({
"ligate": {
"command": "npx",
"args": ["-y", "@ligate/iris-mcp"],
"env": {"LIGATE_RELAYER_KEY": "lgir_live_..."},
"transport": "stdio",
}
})
tools = await client.get_tools()OpenAI Agents SDK
import { Agent, MCPServerStdio } from '@openai/agents'
const ligate = new MCPServerStdio({
command: 'npx',
args: ['-y', '@ligate/iris-mcp'],
env: { LIGATE_RELAYER_KEY: 'lgir_live_...' },
})
const agent = new Agent({
name: 'auditable-agent',
model: 'gpt-5-thinking',
mcpServers: [ligate],
})Tool reference
The server exposes four tools. All are stateless.
record
Post an attestation of an agent action. Returns the on-chain attestation ID (a 64-byte compound, Bech32-encoded as lat1...).
ligate.record({
schema: "ligate.code-change/v1",
payload: {
intent: "refactor auth module",
diff_hash: "lph1lkdru8…sa6e0d2",
model: "claude-opus-4-7"
}
})
// -> { attestation_id: "lat1c3a87e…fd9a7c", block: 1_481_207 }verify
Check an incoming attestation. Returns the full attestation record if valid, an error otherwise.
ligate.verify({ attestation_id: "lat1c3a87e…fd9a7c" })
// -> {
// schema: "ligate.code-change/v1",
// payload_hash: "lph1lkdru8…sa6e0d2",
// submitter: "lig1qxk7…",
// timestamp: 1745193600,
// signatures_valid: true,
// threshold_met: true
// }query
Paginated lookup of historical attestations by schema, agent, or time range.
ligate.query({
schema: "ligate.code-change/v1",
submitter: "lig1qxk7…",
since: 1745000000,
limit: 50
})
// -> { attestations: [...], next_cursor: "..." }schemas
List available schemas on the chain (canonical Ligate ones plus any third-party registrations).
ligate.schemas()
// -> [
// { id: "...", name: "themisra.proof-of-prompt", version: 1 },
// { id: "...", name: "ligate.code-change", version: 1 },
// { id: "...", name: "ligate.agent-action", version: 1 },
// { id: "...", name: "kleidon.subscription-event", version: 1 },
// ...
// ]Custom schemas
If none of the canonical schemas fit your agent's actions, register your own. Registration is permissionless; you pay a one-time fee in $LGT (default 100) and then attestations posted under your schema cost the standard per-event fee (default 0.001 $LGT). Full details in the attestation protocol spec.
Environment reference
# Managed relayer (recommended) LIGATE_RELAYER_KEY=lgir_live_... LIGATE_RELAYER_URL=https://relayer.ligate.io # override for staging # Self-hosted LIGATE_CHAIN=devnet # devnet | mainnet LIGATE_RPC_URL=https://rpc.devnet.ligate.io LIGATE_SIGNING_KEY=... # ed25519 private key (hex) # Optional LIGATE_LOG_LEVEL=info # debug | info | warn | error
Debugging
Common issues and fixes.
- → "Unknown schema" - the schema ID you passed isn't registered on the chain you connected to. Check
LIGATE_CHAINor callligate.schemas(). - → "Threshold not met" - your self-hosted attestor key isn't in the schema's attestor set, or not enough signers. Self-hosters must coordinate with the schema owner.
- → "Relayer 402 Payment Required" - your org exceeded its tier's monthly quota. Upgrade at ligate.io/iris/relayer.
Source and issues
MIT-licensed. Repo: github.com/ligate-io/iris-mcp. Issues and PRs welcome. Questions → hello@ligate.io.