In-memory privacy shield to prevent context leaks in MCP tools
Recorded: Oct. 20, 2026, 4:11 p.m.
| Original | Summarized |
GitHub - rohan-protocol/sdk · GitHub Skip to content Navigation MenuSign inAppearance settingsPlatformAI CODE CREATIONGitHub CopilotWrite better code with AIGitHub Copilot appDirect agents from issue to mergeMCP RegistryIntegrate external toolsDEVELOPER WORKFLOWSActionsAutomate any workflowCodespacesInstant dev environmentsIssuesPlan and track workCode ReviewManage code changesCode QualityEnforce quality at mergeAPPLICATION SECURITYGitHub Advanced SecurityFind and fix vulnerabilitiesCode securitySecure your code as you buildSecret protectionStop leaks before they startEXPLOREWhy GitHubDocumentationBlogChangelogMarketplaceView all featuresSolutionsBY COMPANY SIZEEnterprisesSmall and medium teamsStartupsNonprofitsBY USE CASEApp ModernizationDevSecOpsDevOpsCI/CDView all use casesBY INDUSTRYHealthcareFinancial servicesManufacturingGovernmentView all industriesView all solutionsResourcesEXPLORE BY TOPICAISoftware DevelopmentDevOpsSecurityView all topicsEXPLORE BY TYPECustomer storiesEvents & webinarsEbooks & reportsBusiness insightsGitHub SkillsSUPPORT & SERVICESDocumentationCustomer supportCommunity forumTrust centerPartnersView all resourcesOpen SourceCOMMUNITYGitHub SponsorsFund open source developersPROGRAMSSecurity LabMaintainer CommunityGitHub StarsArchive ProgramREPOSITORIESTopicsTrendingCollectionsEnterpriseENTERPRISE SOLUTIONSEnterprise platformAI-powered developer platformAVAILABLE ADD-ONSGitHub Advanced SecurityEnterprise-grade security featuresCopilot for BusinessEnterprise-grade AI featuresPremium SupportEnterprise-grade 24/7 supportPricingSearch/Sign inSign upAppearance settings You signed in with another tab or window. Reload to refresh your session. Dismiss alert rohan-protocolsdkRepository navigationCodeIssuesPull requestsActionsProjectsSecurity and qualityInsightsMore items sdkPublicNotificationsYou must be signed in to change notification settingsFork0 (0)Star0 (0)You must be signed in to star a repositoryAboutNo description, website, or topics provided.ResourcesReadmeMIT licenseSecurity policySecurity policyActivityCustom propertiesStars0 starsWatchers0 watchingForks0 forksReport repositorymainBranchesTagsGo to fileCodeOpen more actions menuLatest commit History42 Commits42 CommitsFolders and filesNameNameLast commit messageLast commit date.agents.agents .github/workflows.github/workflows contractscontracts examples/google-adkexamples/google-adk packagespackages .dockerignore.dockerignore .gitignore.gitignore DockerfileDockerfile LICENSELICENSE README.mdREADME.md SECURITY.mdSECURITY.md glama.jsonglama.json package-lock.jsonpackage-lock.json package.jsonpackage.json server.jsonserver.json smithery.yamlsmithery.yaml View all filesRepository files navigationREADMEMIT licenseSecurityMore items 📦 Official Open-Source MCP Server Monorepo Run from Source • MCP Tools • Client Setup • Architecture • Security ⚠️ 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 🟢 WITH ROHAN SHIELD 🛠️ Running the MCP Server from Source # 2. Install dependencies & build packages # 3. Start the MCP Server directly over stdio MCP Tool rohan_zk_handshake 🚀 Universal MCP Client Setup Navigate to Settings → Features → MCP Servers → Add New MCP Server. 📁 Monorepo Structure 🏗️ Architecture 🛡️ Security Register (Threat & Mitigation) Threat ID V-01 V-02 V-05 V-07 📄 Academic Research Rohan: A Stateless Zero-Knowledge Trust Gateway for Privacy-Preserving Agentic Workflows via Streamable HTTP 🤝 Community & Contributing 🐛 Found a bug or bypass vector? Open a GitHub Issue. Licensed under the MIT License. Maintained by the Rohan Protocol community. AboutNo description, website, or topics provided.ResourcesReadmeMIT licenseSecurity policySecurity policyActivityCustom propertiesStars0 starsWatchers0 watchingForks0 forksReport repositoryReleasesPackagesUsed byContributorsLanguages Footer © 2026 GitHub, Inc. Footer navigation Terms Privacy Security Status Community Docs Contact Manage cookies Do not share my personal information You can’t perform that action at this time. |
The repository hosted under the GitHub account rohan-protocol/sdk presents an official open-source implementation of the Model Context Protocol (MCP) server and security gateway, collectively known as the Rohan Protocol SDK. Maintained by the Rohan Protocol community, this project is positioned as a public beta offering—currently at version v0.6.0—that provides an in-memory security proxy designed to prevent leakage of plaintext LLM context, credential exfiltration, and prompt injections during the execution of MCP tools. At the core of the project lies the identification of a critical vulnerability in standard MCP implementations: while transport encryption such as TLS protects data in transit, MCP tools execute in cleartext at the host boundary, resulting in plaintext transmission of sensitive parameters like API keys and database passwords directly into both the LLM's conversation context and inference logs. This exposes significant risks of context exfiltration and prompt injection. The Rohan Protocol addresses this by enforcing client-side RAM witness isolation, deploying a V-01 semantic policy firewall that intercepts and strips out-of-bounds payloads and zero-width Unicode injection characters, and implementing V-02 deterministic memory zeroization that overwrites witness buffers immediately after use. These measures ensure that no plaintext parameter ever enters the model context window, thereby neutralizing the primary vector of exposure. The architecture is organized as a monorepo comprising several packages: the `packages/mcp` directory contains the official MCP server implementation, distributed on npm as `@rohan-protocol/mcp`; the `packages/sdk` directory houses the core in-memory commitment engine and relayer client; and `packages/webmcp` includes React and Next.js browser hooks with V-07 DOM isolation. The overall design layers an autonomous agent runtime (such as Claude Desktop, Cursor IDE, or custom agent workflows) above an MCP server that acts as a security gate, which in turn relies on the SDK engine for ephemeral RAM commitment (generating a 32-byte intent hash) and deterministic zeroization, while the Rohan Relayer Paymaster handles gasless transaction sponsoring and scale-to-zero native processing via chunked Streamable HTTP NDJSON, culminating in anchoring of state transitions on the Midnight blockchain ledger, where the `rohan_handshake.compact` smart contract resides. The MCP server registers a single exposed tool, `rohan_zk_handshake`, which operates over JSON-RPC. This tool evaluates tool execution parameters strictly within ephemeral RAM, strips prompt injection attempts, generates a cryptographic 32-byte intent commitment, and anchors state transitions gaslessly to Midnight. Its input parameters include a string `targetAgentId`, a string `intent`, and an object `privatePayload`. This tool serves as the central mechanism for enforcing the security shields during tool invocation. To integrate the server with existing client environments, the README provides configuration instructions for Claude Desktop, Cursor IDE, and Windsurf. For Claude Desktop, users are directed to add the server to their `claude_desktop_config.json` by specifying the command `npx`, the argument `-y @rohan-protocol/mcp@latest`, and the environment variable `ROHAN_RELAYER_URL`. For Cursor and Windsurf, users navigate to Settings, Features, MCP Servers, and add the server with the same command and name. The monorepo structure is explicitly defined, with the `packages`, `contracts`, and supporting files such as `README.md`, `LICENSE`, `SECURITY.md`, and configuration files, ensuring a well-organized development environment. Rohan Protocol formalizes its security posture through a documented threat register that maps specific threats to their corresponding mitigations. V-01 addresses adversarial prompt injection by deploying a pre-prover semantic firewall that intercepts out-of-bounds payloads and strips zero-width Unicode injection characters. V-02 mitigates residual heap exfiltration through deterministic memory zeroization, which overwrites witness buffers with deterministic 0x00 byte patterns. V-05 counters persistent socket exhaustion by employing scale-to-zero NDJSON processing using chunked Streamable HTTP, which allows proxies to spin down on idle. V-07 shields against DOM/WebWorker scraping by isolating execution buffers within WebWorkers, as implemented in the WebMCP package. These mechanisms collectively provide a robust defense-in-depth approach. The cryptographic foundations, threat registers, and formal mathematical proofs are presented in the accompanying research paper, 'Rohan: A Stateless Zero-Knowledge Trust Gateway for Privacy-Preserving Agentic Workflows via Streamable HTTP,' published via Zenodo and IEEE Specification v2.0 with DOI 10.5281/zenodo.22730240. The project is licensed under the MIT License, allowing for open-source adoption and community contribution, with instructions available for reporting bugs and suggesting improvements through GitHub Issues. Overall, the Rohan Protocol SDK represents a pioneering effort in privacy-first MCP tooling, balancing security with the flexibility required for autonomous agent workflows. While it remains in public beta, the repository provides a comprehensive, open-source foundation that addresses critical vulnerabilities in standard MCP implementations through a combination of memory isolation, semantic filtering, deterministic zeroization, and blockchain-anchored commitment. The project's emphasis on rigorous security and academic backing, coupled with its community-driven maintenance, positions it as a significant resource for developers and researchers seeking to build secure, context-leak-resistant agent applications. |