A Model Context Protocol server that gives Claude Code, Claude Desktop, and any MCP-compatible agent runtime direct access to Sigil's identity and provenance tools — with no SDK setup required.
Transports
stdioLocal
Default. The agent runtime spawns the MCP server as a child process. Used by Claude Code and Claude Desktop local config. Agent private key stays in the host process environment — never travels over the wire.
SSE / HTTPRemote
Remote agents connect via Server-Sent Events. Enable by setting MCP_HTTP_PORT. The server listens on GET /sse + POST /message. Suitable for cloud-deployed agents that cannot run a local process.
# Start the MCP server in HTTP mode
MCP_HTTP_PORT=4000 \
ZERO_G_RPC_URL=https://evmrpc-testnet.0g.ai \
SIGIL_REGISTRY_ADDRESS=0x2C0457F82B57148e8363b4589bb3294b23AE7625 \
PROVENANCE_NOTARY_ADDRESS=0xA1103E6490ab174036392EbF5c798C9DaBAb24EE \
SIGIL_AGENT_PRIVATE_KEY=0x... \
node mcp-server/dist/index.js
# The server exposes:
# GET http://0.0.0.0:4000/sse — SSE endpoint (remote agents connect here)
# POST http://0.0.0.0:4000/message — message handler
# GET http://0.0.0.0:4000/health — health check
For a public URL during development, use a Cloudflare tunnel:
bash
cloudflared tunnel --url http://localhost:4000
NOTEIn SSE mode, sigil__notarize_output rejects any call whose arguments contain a hex string matching a private key pattern. The agent private key must be set in the server's environment — it never travels over the SSE connection.
Tool Reference
sigil__register_agent
Initiate a sponsored registration request or poll an existing one. Call with principalAddress + agentDescription + permissions to create a new request. Call with requestId to poll — the approved response includes the passportId and agentPrivateKey (once).
Parameter
Type
Description
principalAddress
string
Principal wallet address (0x+40 hex). Required for new requests.
agentDescription
string
Agent description ≤ 280 chars. Required for new requests.
permissions
object
Permission manifest. Required for new requests. Fields: whitelistedContracts, maxTxValuePerWindow, authorizedApis, allowedTokens, timeWindowSeconds.
requestId
string
If provided, polls the status of an existing request instead of creating a new one.
Read an AgentPassport from on-chain. Accepts a passportId or agent address. Returns the full PassportRecord including reputation score, task counts, and active status.
Parameter
Type
Description
query
string
PassportId (0x+64 hex) or agent address (0x+40 hex). Optional — defaults to SIGIL_AGENT_ADDRESS env var.
IMPORTANTLocal (stdio) transport only. Reads SIGIL_AGENT_PRIVATE_KEY from the server environment. Never pass private keys in tool arguments.
Notarize an AI-generated artifact on 0G Chain. Encrypts and uploads the input context to 0G Storage, builds a provenance envelope with the output and model receipt, and calls ProvenanceNotary.notarize() on-chain.
Parameter
Type
Description
passportIdrequired
string
The agent's passportId (0x+64 hex).
outputrequired
string
The full text of the artifact to notarize.
inputContextrequired
string
The input prompt or context (encrypted before upload).
Model used to generate the output. Default: qwen/qwen-2.5-7b-instruct.
Example
sigil__notarize_output({
"passportId": "0x87c4d2f5...",
"output": "The DeFi protocol has a risk score of 7/10 based on...",
"inputContext": "Analyze the risk of Aave V3 on Ethereum mainnet",
"artifactType": "RISK_ASSESSMENT"
})
// Returns:
// {
// "recordId": "0x...",
// "txHash": "0x...",
// "outputHash": "0x...",
// "explorerUrl": "https://chainscan-galileo.0g.ai/tx/0x...",
// "message": "Notarized on-chain. recordId=0x...
Tx: ..."
// }
sigil__resolve_provenance
Resolve a ProvenanceRecord from on-chain. Supports lookup by recordId, outputHash (keccak256 of the artifact), or passportId (to list all records for an agent).
Parameter
Type
Description
recordId
string
The ProvenanceRecord ID (bytes32).
outputHash
string
keccak256 of the artifact output — resolves to the recordId first.
Trust-gate another agent before delegating work to it. Returns ACCEPT, CAUTION, or REJECT based on the agent's on-chain reputation and activity record.
Trust Level
Condition
Recommended Action
ACCEPT
reputation ≥ 600 AND failureCount == 0
Proceed with delegation
CAUTION
reputation 200–599 OR failureCount > 0
Delegate with oversight or reduced scope
REJECT
reputation < 200 OR active == false
Do not delegate — agent is untrustworthy or revoked
Parameter
Type
Description
queryrequired
string
PassportId (0x+64 hex) or agent address (0x+40 hex) to verify.