# Rohan Protocol MCP

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.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 8 repo stars
- Author: rohan-protocol
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/rohan-protocol/sdk/tree/HEAD/packages/mcp
- Updated: 2026-11-16
- Security check: automated, 2026-11-17 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/mcp/rohan-protocol-mcp

## What it 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.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `ROHAN_AGENT_PRIVATE_KEY`, `ROHAN_CONTRACT_ADDRESS`, `ROHAN_RELAYER_URL` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
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
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
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/mcp
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "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

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "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

### Gemini CLI

**Platform CLI**
```bash
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/mcp
```
Replace <…> with your own values

## When to use it
- 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
- 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.

## Similar
- [security-manager](https://affpapa.org/en/nevibecode/agents/security-manager.md) — subagent · ★ 850 repo stars
- [plan-attest](https://affpapa.org/en/nevibecode/commands/plan-attest.md) — command · ★ 28179 repo stars
- [AgentLens](https://affpapa.org/en/nevibecode/mcp/agentlens.md) — MCP server · ★ 27 repo stars
- [signomy](https://affpapa.org/en/nevibecode/mcp/signomy.md) — MCP server · 2104 installs
- [transfa](https://affpapa.org/en/nevibecode/mcp/transfa.md) — MCP server · ★ 21 repo stars
- [Ontario Protocol x402 readiness and Bazaar discovery](https://affpapa.org/en/nevibecode/mcp/ontario-protocol-x402-readiness-and-bazaar-discovery.md) — MCP server · 982 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
