ZKshare stdio MCP: store/prove/share, semantic search, sandbox proxy to HTTPS /api/v1/context.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Privacy-oriented context API for users, AI agents, and back-office systems. A single HTTP entrypoint
(POST /api/v1/context) handles encrypted fact storage, commitment-based proof envelopes,
semantic search over encrypted data, end-to-end-encrypted (client-sealed) facts, and a
isolated sandbox execution for sensitive computations. The implementation is a Next.js
(App Router) application backed by PostgreSQL with pgvector.
This document is for developers integrating against the API and operators self-hosting the service. It is not a marketing brochure β pricing tiers, dashboards, and billing are optional layers defined separately in the application code.
The platform is designed around three trust boundaries:
| Boundary | What the operator can see | What stays private |
|---|---|---|
| Server-sealed store | Ciphertext, IV, auth tag, commitment, embedding vector. The server holds the AES-256-GCM key (ZKSHARE_ENCRYPTION_SECRET) and decrypts in memory only when the caller invokes prove, share, or search summaries. | Database operators (without the encryption secret) and direct table readers (RLS denies anon and authenticated) cannot read plaintext. |
| Client-sealed (E2EE) store | Opaque ciphertext blobs, IV, auth tag, commitment, and a caller-supplied embedding vector. The server never receives or derives plaintext, and never calls an embedding model on the fact. | The platform operator. Decryption requires the caller's own key, which never leaves the caller. |
| Proof envelopes | A versioned, HMAC-signed JSON envelope (commitment + query + yes/no answer + nonce). Verifiable by anyone holding ZKSHARE_PROOF_SECRET. | The fact plaintext used to derive the answer is never included in the envelope. |
verify_proof.share_token
bound to a recipient agent identifier.SECURITY.md is the canonical reference for the threat model, the trust
model summary, vulnerability disclosure, the operator checklist, and third-party LLM exposure
controls.
| Operation | Behavior |
|---|---|
store | Server-sealed: caller sends value. Server encrypts with AES-256-GCM, computes a salted commitment, generates an embedding (or accepts a 1536-dim embedding), and persists with client_encrypted = false. Client-sealed: caller sends ciphertext, iv, auth_tag, commitment, and the required embedding. Server stores blobs and the vector, sets client_encrypted = true, and never derives anything from the plaintext or label. |
prove | Loads a server-sealed fact, decrypts in memory, derives a yes/no answer for the supplied query (LLM with temperature: 0, or a heuristic when external LLMs are disabled), and returns an HMAC-signed proof envelope. Returns 422 / CLIENT_ENCRYPTED if the fact is client-sealed. |
share | Same as prove, plus inserts a row into share_tokens (recipient_agent_id, expiry, proof) and returns a share_token. The token is a 24-byte base64url string, valid for seven days. |
search | Embeds the query, calls match_facts (a security definer SQL function with cosine distance over pgvector), and returns ranked summaries for server-sealed rows only. Client-sealed rows are excluded at the SQL level and the application level. |
verify_proof | Validates an envelope without loading any fact. Malformed envelope returns 400 / VALIDATION_ERROR; well-formed envelope with a bad HMAC returns 200 with data.valid: false. |
sandbox | Executes a small allow-listed function inside an isolated node:vm sandbox (no host I/O, 50 ms timeout) and returns the result with attestation metadata and a short-lived HS256 JWT (proof_of_execution). Every response advertises provider: "vm-sandbox" β this is software isolation, not hardware attestation. |
Authoritative request and response shapes live in types/index.ts and
openapi.json.
The npm package zkshare-mcp (npm, source packages/zkshare-mcp/) is a stdio MCP server exposing tools (zkshare_store, zkshare_prove, β¦) that call POST https://zkshare.io/api/v1/context (or your ZKSHARE_API_URL) with ZKSHARE_API_KEY.
Official MCP Registry canonical name: io.github.sp0oby/zkshare β registry lookup Β· About the MCP Registry (discovery metadata; runnable package remains on npm).
End users: Node.js β₯ 18, then npx -y zkshare-mcp β no clone. Configure your host (example below).
Contributors: from the repo root pnpm install, then pnpm mcp to run the local package; source is packages/zkshare-mcp/.
Advanced client-sealed store bodies stay on HTTPS/OpenAPI β not via MCP tools.
| Code | HTTP | Meaning |
|---|---|---|
INVALID_API_KEY | 401 | Missing, malformed, or revoked key. |
RATE_LIMITED | 429 | Per-key sliding-window limit exceeded. Retry-After header included. |
VALIDATION_ERROR | 400 | Body fails the Zod schema or a malformed proof was passed to verify_proof. |
FACT_NOT_FOUND | 404 | No row matches (api_key_id, logical_user_id, fact_key). |
PROOF_FAILED | 400 | Decryption failed or no definite yes/no answer could be derived. |
CLIENT_ENCRYPTED | 422 | prove or share was called against a client-sealed fact. |
INTERNAL_ERROR | 500 | Caught exception. The original message is logged via lib/logger.ts; clients see a generic message. |
/api/v1/context is a Node.js route handler (not Edge) so AES-256-GCM, scrypt key
derivation, and the Supabase service-role client behave deterministically.supabase/migrations/. Tables: api_keys, facts, audit_logs, share_tokens. The facts
table stores ciphertext, IV, auth tag, commitment, a vector(1536) embedding, and a
client_encrypted flag.match_facts(api_key_id, logical_user_id, query_embedding, match_count) is a
security definer function with an IVFFlat index. It returns server-sealed rows only.
Updating the function's row type requires DROP FUNCTION ... CASCADE-style replacement (a
PostgreSQL constraint) β the migrations handle this explicitly.middleware.ts redirects unauthenticated
visitors away from /dashboard.x-api-key header. Keys are stored as SHA-256 hashes; only the prefix is shown in
the dashboard. Rotating a key requires generating a new one β plaintext is never persisted.anon and authenticated roles. The
application uses the Supabase service role server-side only.ZKSHARE_ENCRYPTION_SECRET β server-side AES-256-GCM master secret (scrypt-derived; minimum
32 characters).ZKSHARE_PROOF_SECRET β HMAC secret for commitments and proof envelopes (minimum 16
characters).ZKSHARE_ENCLAVE_JWT_SECRET β HS256 secret for sandbox attestations (minimum 32 characters).| Path | Purpose |
|---|---|
app/ | Next.js App Router routes β public site, dashboard, API endpoints (api/v1/context, api/keys, api/billing, api/webhooks/stripe, api/health, api/health/ready, api/audit/export, auth/callback). |
lib/ | Server-only modules: encryption.ts, zk.ts, embeddings.ts, search.ts, sandbox.ts, api-key.ts, rate-limit.ts, audit.ts, llm-client.ts, supabase-server.ts, supabase-browser.ts. |
components/ | UI components built on shadcn/ui primitives. |
types/index.ts | Zod request schema, operation enum, error codes, and shared row types. |
supabase/migrations/ | Ordered SQL migrations. |
circuits/ | Notes and placeholders for future Groth16 wiring. snarkjs is a runtime dependency but is not on the default trust path. |
packages/zkshare-mcp/ | Publishable zkshare-mcp npm package β MCP stdio server that proxies to /api/v1/context. |
openapi.json | OpenAPI 3.1 description of the public surface. |
SECURITY.md | Threat model, operational checklist, and the encryption / LLM matrix. |
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/zkshare)<a href="https://allmcps.com/mcp/zkshare"><img src="https://allmcps.com/api/badge/zkshare?style=directory" alt="ZKshare on AllMCPs" /></a>