Rohan Shield
Official<div align="center">
# š”ļø Rohan Protocol
### Official Model Context Protocol (MCP) Server & Security Gateway
**The in-memory security proxy preventing LLM context leaks, credential exfiltration, and prompt injections during tool execution.**
[](https://www.npmjs.com/package/@rohan-protocol/mcp)
[](https://glama.ai/mcp/servers)
[](https://smithery.ai/server/rohanprotocol/shield)
[](https://opensource.org/licenses/MIT)
[](https://zenodo.org/records/22730240)
[](https://midnight.network/)
<br />
> š¦ **Official Open-Source MCP Server Monorepo**
> The core Model Context Protocol (MCP) server implementation is located directly in this repository at [`packages/mcp/`](./packages/mcp) and distributed on npm as **`@rohan-protocol/mcp`**.
[Run from Source](#-running-the-mcp-server-from-source) ⢠[MCP Tools](#-exposed-mcp-tools) ⢠[Client Setup](#-universal-mcp-client-setup) ⢠[Architecture](#-architecture) ⢠[Security](#-security-register-threat--mitigation)
</div>
> ā ļø Public Beta (v0.6.0): Rohan currently enforces client-side RAM witness isolation, V-01 semantic policy firewalls, and V-02 deterministic memory zeroization (zeroize) to shield MCP tool calls while native client-side WASM ZK-SNARK proving circuits are under active research (Milestone 1).
## ā” The Problem: Plaintext Context Leaks in MCP
The Model Context Protocol (MCP) connects autonomous agents to tools. However, transport encryption (TLS) only protects data in flight ā at the host boundary, standard MCP tools execute in cleartext:
```text
š“ WITHOUT ROHAN (Standard MCP)
Agent calls tool ā { "api_key": "sk_live_...", "db_password": "secret" } in plaintext
ā Leaked directly into LLM conversation context & inference logs
ā Permanent risk of context exfiltration & prompt injection
š¢ WITH ROHAN SHIELD
Agent calls tool ā Arguments evaluated strictly in isolated client RAM
ā V-02 Zeroize wipes witness memory immediately from volatile memory
ā Zero plaintext parameters ever enter the model context window
```
## š ļø Running the MCP Server from Source
This repository contains the complete open-source MCP server implementation. You can clone and run the server locally over standard stdio:
```bash
# 1. Clone the repository
git clone https://github.com/rohan-protocol/sdk.git
cd sdk
# 2. Install dependencies & build packages
npm install
npm run build
# 3. Start the MCP Server directly over stdio
node packages/mcp/dist/server.js
```
Or run directly via `npx` without cloning:
```bash
npx -y @rohan-protocol/mcp@latest
```
## š§ Exposed MCP Tools
The `@rohan-protocol/mcp` server registers standard Model Context Protocol tool endpoints over JSON-RPC:
| MCP Tool | Description | Input Parameters |
| :--- | :--- | :--- |
| `rohan_zk_handshake` | Evaluates tool execution parameters in ephemeral RAM, strips prompt injections, generates a cryptographic 32-byte intent commitment, and anchors state transitions gaslessly to Midnight. | `targetAgentId` (string), `intent` (string), `privatePayload` (object) |
## š Universal MCP Client Setup
### 1. Claude Desktop
Add `rohan-shield` to your `claude_desktop_config.json`:
```json
{
"mcpServers": {
"rohan-shield": {
"command": "npx",
"args": ["-y", "@rohan-protocol/mcp@latest"],
"env": {
"ROHAN_RELAYER_URL": "https://api.rohanprotocol.network/api/v1/handshake"
}
}
}
}
```
### 2. Cursor IDE & Windsurf
1. Navigate to **Settings ā Features ā MCP Servers ā Add New MCP Server**.
2. Set the name to **`rohan-shield`**.
3. Set the type to **`command`**.
4. Use the command: `npx -y @rohan-protocol/mcp@latest`
## š Monorepo Structure
```text
rohan-protocol/sdk
āāā packages/
ā āāā mcp/ # š¤ The Official Model Context Protocol (MCP) Server (Stdio)
ā āāā sdk/ # āļø Core in-memory commitment engine & relayer client
ā āāā webmcp/ # š React / Next.js browser hooks with V-07 DOM isolation
āāā contracts/ # š Midnight Compact smart contracts (rohan_handshake.compact)
āāā README.md
```
## šļø Architecture
```text
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā AUTONOMOUS AGENT RUNTIME ā
ā Claude Desktop / Cursor IDE / Custom Agent Workflows ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā¬āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā Tool Execution (JSON-RPC)
ā¼
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā [@rohan-protocol/mcp] SERVER (packages/mcp) ā
ā ⢠Stdio MCP Protocol Server: Compliant with Anthropic MCP Specification ā
ā ⢠V-01 Semantic Firewall: Filters hidden Unicode & prompt injections ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā¬āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā In-Memory Witness
ā¼
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā [@rohan-protocol/sdk] ENGINE (packages/sdk) ā
ā ⢠Ephemeral RAM Commitment (32-Byte Intent Hash) ā
ā ⢠V-02 Deterministic Zeroize: Overwrites buffers immediately in memory ā
ā ⢠ZERO disk writes. ZERO swap-file exposure. ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā¬āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā Streamable HTTP (NDJSON)
ā received ā approved ā proving ā anchored
ā¼
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā ROHAN RELAYER PAYMASTER ā
ā ⢠Gasless Transaction Sponsoring ($tDUST covered automatically) ā
ā ⢠Scale-to-Zero Native (No persistent SSE connection bottlenecks) ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā¬āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā Immutable Replay Protection
ā¼
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā MIDNIGHT BLOCKCHAIN LEDGER ā
ā Contract: rohan_handshake.compact (Preprod: 585ac0c4448257507d8ffa2a...) ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
```
## š”ļø Security Register (Threat & Mitigation)
| Threat ID | Threat Vector | Mitigation Mechanism |
| :--- | :--- | :--- |
| V-01 | Adversarial Prompt Injection | Pre-Prover Semantic Firewall: intercepts out-of-bounds payloads and strips zero-width Unicode injection characters ([\u200B-\u200D\uFEFF]). |
| V-02 | Residual Heap Exfiltration | Deterministic Memory Zeroize: multi-pass volatile memory wiping overwriting witness buffers with deterministic `0x00` byte patterns. |
| V-05 | Persistent Socket Exhaustion | Scale-to-Zero NDJSON: uses chunked Streamable HTTP instead of long-lived SSE connections, allowing proxies to spin down on idle. |
| V-07 | DOM / WebWorker Scraping | WebMCP Thread Isolation: isolates execution buffers inside WebWorkers, shielded from malicious third-party browser extensions. |
## š Academic Research
The cryptographic foundations, threat registers, and formal mathematical proofs are documented in our research paper:
> Rohan: A Stateless Zero-Knowledge Trust Gateway for Privacy-Preserving Agentic Workflows via Streamable HTTP
> Model Context Protocol Working Group & Rohan Protocol Lab
> Published via Zenodo / IEEE Spec v2.0 ⢠DOI: 10.5281/zenodo.22730240
## š¤ Community & Contributing
We build in the open.
- š Found a bug or bypass vector? Open a GitHub Issue.
- āļø Support: consider starring the repository to help other developers discover privacy-first MCP tools.
<div align="center">
<sub>Licensed under the <a href="./LICENSE">MIT License</a>. Maintained by the Rohan Protocol community.</sub>
</div>
TDQS
Scored across 1 tool
With only one tool in the set, there is no possibility of overlap or misselection. The tool's purpose (a zero-knowledge state transition handshake) is unambiguous and clearly bounded.
The single name `rohan_zk_handshake` is clean snake_case with a server prefix, so there is no inconsistency. However, a lone name cannot demonstrate a predictable verb_noun pattern across the set, so it falls just short of a 5.
A single tool is too thin for a blockchain/cryptographic-protocol server, which normally implies proving, verifying, querying state, and inspecting transactions. The operation itself is non-trivial, which keeps this above the worst score.
The surface exposes only the handshake/prove operation, with no verification, state-read, or agreement-lifecycle counterparts. An agent has no way to check a proof result, retrieve state, or handle the other half of the interaction, creating dead ends.