Enables AI agents to perform confidential state transitions, inspect ledger states, and verify cryptographic commitments on the Midnight blockchain.
Also known as rohan-protocol/sdk, mcp, @rohan-protocol/mcp
- Stars
- 8
- Tools
- 4
- Downloads, 30 days
- —
- Latest version
- 0.8.1
- Last commit
- Nov 13, 2026
- License
- MIT
What is Rohan Protocol MCP?
Rohan Protocol enables AI agents to perform confidential state transitions, inspect ledger states, and verify cryptographic commitments on the Midnight blockchain. It exposes 4 tools, such as rohan_execute_handshake, rohan_get_ledger_state, rohan_get_transaction_history.
Summary generated from the project's README
About Rohan Protocol MCP server
Rohan Protocol MCP provides developers and AI agents with specialized tools to interact with the Midnight blockchain. It enables confidential state transitions, ledger inspection, and cryptographic auditing through four specific tools. Users can execute handshakes for settlements, retrieve current ledger states from the Midnight Preprod L1, list recent transaction histories, or verify plaintext payloads against SHA-256 digests.
This server works with clients like Claude Desktop, Cursor, Cline, and Gemini. You can set it up locally using npx or connect to a remote endpoint via a hosted JSON-RPC interface. For local identity management, the server can utilize a private key provided through the ROHAN_AGENT_PRIVATE_KEY environment variable or manage a local keystore file at ~/.rohan/agent-identity.json. Security is prioritized by hashing confidential parameters in client RAM to prevent exposure in model logs or on-chain data.
What you can do with it
- 1Execute confidential settlementsAn AI agent can perform a private state transition on the Midnight blockchain using a handshake tool.
- 2Inspect blockchain ledger statusA developer can request the current anchored state, including the block height and state root.
- 3Audit cryptographic commitmentsYou can verify that a specific payload matches its expected SHA-256 digest in local memory.
- 4Review settlement historyAn agent can list the most recent transactions and receipts recorded by the relayer.
Written from the project's README. Every use case is checked against a quote from it.
How to install Rohan Protocol MCP
Formats verified 10 Nov 2026Add to CursorAdd to GooseInstall Rohan Protocol MCP in Claude Code
$ claude mcp add mcp -- npx -y @rohan-protocol/mcpInstall Rohan Protocol MCP in Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"mcp": {
"command": "npx",
"args": [
"-y",
"@rohan-protocol/mcp"
]
}
}
}Install Rohan Protocol MCP in VS Code
.vscode/mcp.json
{
"servers": {
"mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@rohan-protocol/mcp"
]
}
}
}Install Rohan Protocol MCP in VS Code CLI
$ code --add-mcp '{"name":"mcp","type":"stdio","command":"npx","args":["-y","@rohan-protocol/mcp"]}'Install Rohan Protocol MCP in Claude Desktop
claude_desktop_config.json
{
"mcpServers": {
"mcp": {
"command": "npx",
"args": [
"-y",
"@rohan-protocol/mcp"
]
}
}
}Install Rohan Protocol MCP in Codex
$ codex mcp add mcp -- npx -y @rohan-protocol/mcpInstall Rohan Protocol MCP in Codex config.toml
~/.codex/config.toml
[mcp_servers.mcp] command = "npx" args = ["-y", "@rohan-protocol/mcp"]
Install Rohan Protocol MCP in Gemini CLI
$ gemini mcp add -s user mcp npx -- -y @rohan-protocol/mcpInstall Rohan Protocol MCP in Gemini settings.json
~/.gemini/settings.json
{
"mcpServers": {
"mcp": {
"command": "npx",
"args": [
"-y",
"@rohan-protocol/mcp"
]
}
}
}Started by HostedMCP on 16 Nov 2026
We ran this command for @rohan-protocol/mcp 0.8.1 in an isolated container with no network and no keys. It answered and listed 4 tools.
Rohan Protocol MCP tools 4
Read from the server with tools/listrohan_execute_handshakeExecutes a confidential zero-knowledge state transition on Midnight Blockchain. Confidential parameters are automatically canonicalized (RFC 8785) and hashed in client RAM—never exposed on-chain or in model logs.
rohan_get_ledger_stateReads the current anchored state of the Rohan Protocol smart contract on Midnight Preprod L1. Returns the state root, block height, and last mined transaction hash from memory cache.
rohan_get_transaction_historyLists historical settlement transactions and receipts anchored on Midnight Preprod L1.
rohan_verify_commitmentVerifies a plaintext confidential payload against its SHA-256 digest using RFC 8785 JSON Canonicalization. Supply the inner payload digest, not the outer on-chain intentHash. Zero gas cost; runs in local memory.
| rohan_execute_handshake | Executes a confidential zero-knowledge state transition on Midnight Blockchain. Confidential parameters are automatically canonicalized (RFC 8785) and hashed in client RAM—never exposed on-chain or in model logs. | |
| rohan_get_ledger_state | Reads the current anchored state of the Rohan Protocol smart contract on Midnight Preprod L1. Returns the state root, block height, and last mined transaction hash from memory cache. | |
| rohan_get_transaction_history | Lists historical settlement transactions and receipts anchored on Midnight Preprod L1. | |
| rohan_verify_commitment | Verifies a plaintext confidential payload against its SHA-256 digest using RFC 8785 JSON Canonicalization. Supply the inner payload digest, not the outer on-chain intentHash. Zero gas cost; runs in local memory. |
Configuration
ROHAN_AGENT_PRIVATE_KEYOptional 32-byte Ed25519 seed as 64 hex characters to override the auto-provisioned local identity. Keep it in a secret store; never provide it as a tool argument.
ROHAN_API_KEYROHAN_CONTRACT_ADDRESSMidnight Preprod Contract Address for Rohan Trust Gateway
ROHAN_RELAYER_URLRohan Relayer API URL
| Name | Description | |
|---|---|---|
| ROHAN_AGENT_PRIVATE_KEY | Optional 32-byte Ed25519 seed as 64 hex characters to override the auto-provisioned local identity. Keep it in a secret store; never provide it as a tool argument. | |
| ROHAN_API_KEY | — | |
| ROHAN_CONTRACT_ADDRESS | Midnight Preprod Contract Address for Rohan Trust Gateway | |
| ROHAN_RELAYER_URL | Rohan Relayer API URL |
Automated checks
Ran Nov 13, 2026Full report →Passed our automated checks. That is not a security audit: read the code and give the server the narrowest access it needs. How checks work
- Source repository linked and reachablePass
- Open source license (OSI)Pass
- Commit or release in the last yearPass
- Package name not close to a popular packagePass
- Remote endpoint uses HTTPSNot checked
- Destructive tools are labelledNot checked
- No hidden instructions to the modelPass
- No critical advisory in the package or its dependenciesPass
README
View on GitHub@rohan-protocol/mcp (v0.8.1)
Official Model Context Protocol (MCP) server providing confidential state transitions, ledger inspection, and cryptographic audit tools for Claude Desktop, Cursor, Cline, and Gemini.
🛠️ The 4 MCP Tools
1. rohan_execute_handshake (Write / Settlement)
Executes a confidential state transition on Midnight Blockchain. Confidential parameters are automatically canonicalized (RFC 8785) and hashed in client RAM—never exposed on-chain or in model logs.
- Arguments:
actionSummary(non-empty string, required),agentId(string, optional when a local signer is configured),confidentialPayload(object, optional). If supplied with a signer,agentIdmust match its DID. The legacyrohan_zk_handshaketool name remains accepted.
2. rohan_get_ledger_state (Read / State Inspection)
Reads the current anchored state of the Rohan Protocol smart contract on Midnight Preprod L1. Returns state root, block height, and last mined transaction hash from memory cache.
- Arguments: None.
3. rohan_get_transaction_history (Read / Settlement History)
Lists recent settlement transactions and receipts recorded by the relayer.
- Arguments:
limit(integer, optional — defaults to 10, maximum 50).
4. rohan_verify_commitment (Audit / Verify)
Verifies a plaintext confidential payload against its canonical SHA-256 digest in local memory.
- Arguments:
payload(object, required),expectedDigest(string, required — accepts raw hex,sha256:, or0xprefixes). Supply the inner payload digest referenced inactionSummary, not the timestamp-salted outer on-chainintentHash.
🚀 Setup & Configuration
Option A: Claude Desktop Setup
Add this to your claude_desktop_config.json:
{
"mcpServers": {
"rohan-shield": {
"command": "npx",
"args": ["-y", "@rohan-protocol/mcp@0.8.1"],
"env": {
"ROHAN_API_KEY": ""
}
}
}
}
Option B: Cursor MCP Setup
- Go to Settings → Features → MCP.
- Click Add New MCP Server:
- Name:
rohan-shield - Type:
command - Command:
npx -y @rohan-protocol/mcp@0.8.1
- Name:
Option C: Remote MCP (Smithery / Cloud Agents)
Connect directly to the hosted endpoint:
- Server Card:
https://api.rohanprotocol.network/.well-known/mcp/server-card.json - JSON-RPC Endpoint:
https://api.rohanprotocol.network/mcp
Local agent identity and signing (V-08)
The local stdio server loads identity in this order:
ROHAN_AGENT_PRIVATE_KEY, if set, as a 32-byte Ed25519 seed encoded in exactly 64 hexadecimal characters (an optional0xprefix is accepted). Invalid configured values fail startup; they never fall back to another key.- The existing
~/.rohan/agent-identity.jsonkeystore, after checking its permissions and verifying that its DID matches the public key derived from the stored seed. - If no keystore exists, the server provisions one with exclusive,
create-only semantics. It is stored as plaintext key material in the
user-only file
~/.rohan/agent-identity.json; the directory is restricted to0700and the file to0600on POSIX systems. Corrupt or mismatched existing files fail closed and are never silently replaced.
With the local signer active, agentId may be omitted and the server supplies
the signer's DID. If provided, it must exactly match. A non-empty
actionSummary is always required; the intent property is deprecated and
cannot replace it. The DID is reported at startup so operators can record it
for their agent configuration.
Protect and back up the keystore as a secret. Deleting it provisions a new key
and therefore a new DID; restoring it preserves the identity. Never put key
material in tool arguments, prompts, source control, or logs. JavaScript and
WebCrypto cannot guarantee erasure of all in-memory key copies. A did:key
proves control of a key, not a real-world identity, and the relayer must enforce
signature verification for server-side authentication.
📜 License
Apache-2.0
Rohan Protocol MCP questions
How do I add Rohan Protocol MCP to Claude Code?
Run claude mcp add mcp -- npx -y @rohan-protocol/mcp in your terminal. Add --scope user to make it available in every project.
How do I add Rohan Protocol MCP to Cursor?
Open ~/.cursor/mcp.json and add the server under mcpServers, using the Cursor config shown in the install section above.
What tools does Rohan Protocol MCP provide?
It exposes 4 tools, including rohan_execute_handshake, rohan_get_ledger_state, rohan_get_transaction_history, rohan_verify_commitment.
How does the server handle local agent identity and signing?
The server loads identity from a ROHAN_AGENT_PRIVATE_KEY environment variable or a local keystore file at ~/.rohan/agent-identity.json.