Rohan Protocol MCP — Claude Code MCP server: features and setup
This MCP server for Claude Code handles confidential state changes and verifies payloads for Rohan Protocol. Agents can inspect Midnight contract state and review settlement history.
MIT ★ 8 updated 2026-11-16
claude mcp add --env ROHAN_AGENT_PRIVATE_KEY=<ROHAN_AGENT_PRIVATE_KEY> --env ROHAN_CONTRACT_ADDRESS=<ROHAN_CONTRACT_ADDRESS> --env ROHAN_RELAYER_URL=<ROHAN_RELAYER_URL> --transport stdio mcp -- npx -y @rohan-protocol/mcpWhat Rohan Protocol MCP does
The server exposes tools to submit a state change to Midnight, read contract state, list settlement transactions, and check a payload against a SHA-256 digest. A write requires a non-empty actionSummary. History returns up to 50 entries; a state read includes the state root, block height, and latest transaction hash.
For local signing, the server loads a key from ROHAN_AGENT_PRIVATE_KEY or ~/.rohan/agent-identity.json; it creates that keystore when one does not exist. The stdio setup command uses npx and requires ROHAN_CONTRACT_ADDRESS plus ROHAN_RELAYER_URL. An invalid configured key stops startup rather than falling back to another key. Removing the keystore creates a new identity and DID.
What it helps with
- submit a confidential state change to Midnight
- inspect the smart contract’s current state
- list settlement transactions and receipts
- match a payload against its SHA-256 digest
Example prompts for the agent
- Submit a confidential state change with a short action summary.
- Read the current Rohan Protocol contract state on Midnight.
- Check this payload against the supplied SHA-256 digest.
How to install Rohan Protocol MCP
Platform CLI
claude mcp add --env ROHAN_AGENT_PRIVATE_KEY=<ROHAN_AGENT_PRIVATE_KEY> --env ROHAN_CONTRACT_ADDRESS=<ROHAN_CONTRACT_ADDRESS> --env ROHAN_RELAYER_URL=<ROHAN_RELAYER_URL> --transport stdio mcp -- npx -y @rohan-protocol/mcpReplace <…> with your own values
Platform CLI
codex mcp add mcp --env ROHAN_AGENT_PRIVATE_KEY=<ROHAN_AGENT_PRIVATE_KEY> --env ROHAN_CONTRACT_ADDRESS=<ROHAN_CONTRACT_ADDRESS> --env ROHAN_RELAYER_URL=<ROHAN_RELAYER_URL> -- npx -y @rohan-protocol/mcpReplace <…> with your own values
Config file
{
"mcpServers": {
"mcp": {
"command": "npx",
"args": [
"-y",
"@rohan-protocol/mcp"
],
"env": {
"ROHAN_AGENT_PRIVATE_KEY": "<ROHAN_AGENT_PRIVATE_KEY>",
"ROHAN_CONTRACT_ADDRESS": "<ROHAN_CONTRACT_ADDRESS>",
"ROHAN_RELAYER_URL": "<ROHAN_RELAYER_URL>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@rohan-protocol/mcp"
],
"env": {
"ROHAN_AGENT_PRIVATE_KEY": "<ROHAN_AGENT_PRIVATE_KEY>",
"ROHAN_CONTRACT_ADDRESS": "<ROHAN_CONTRACT_ADDRESS>",
"ROHAN_RELAYER_URL": "<ROHAN_RELAYER_URL>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e ROHAN_AGENT_PRIVATE_KEY=<ROHAN_AGENT_PRIVATE_KEY> -e ROHAN_CONTRACT_ADDRESS=<ROHAN_CONTRACT_ADDRESS> -e ROHAN_RELAYER_URL=<ROHAN_RELAYER_URL> mcp npx -y @rohan-protocol/mcpReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Rohan Protocol MCP
How do I install Rohan Protocol MCP in Claude Code?
Register it over stdio with `claude mcp add --env ROHAN_AGENT_PRIVATE_KEY=<ROHAN_AGENT_PRIVATE_KEY> --env ROHAN_CONTRACT_ADDRESS=<ROHAN_CONTRACT_ADDRESS> --env ROHAN_RELAYER_URL=<ROHAN_RELAYER_URL> --transport stdio mcp -- npx -y @rohan-protocol/mcp`.
What does Rohan Protocol MCP do?
It gives an agent tools to submit confidential state changes to Midnight, inspect contract state and settlement history, and verify payloads against SHA-256 digests.
What does Rohan Protocol MCP need to run?
The Claude Code stdio setup uses npx and requires ROHAN_CONTRACT_ADDRESS and ROHAN_RELAYER_URL. Local signing uses ROHAN_AGENT_PRIVATE_KEY or the keystore at ~/.rohan/agent-identity.json.