Lemmaoracle

io.github.lemmaoraclePublished by GitHub account lemmaoraclev0.0.17Updated Oct 25, 2026

Verifiable provenance for AI agents — ZK proofs over confidential documents, no plaintext exposure.

VerifiedStreamable HTTPWeb executableKnowledge & MemorySecurity & Monitoring

Overview

AI-generated overview

Lemma's MCP server lets an AI assistant query cryptographically verified attributes from confidential documents and look up schemas, ZK circuits and generators.

What you can do
Query verified attributes from Lemma documents by conditions such as birth year, returning document hashes, issuers, subjects and proof status without plaintext exposure. Look up a schema by ID to see how a document type is interpreted and normalized. Look up a zero-knowledge proof circuit by ID, including its constraints and verifier details. Look up a document generator by ID to see how a class of source documents is produced. Check the verification status of a proof by its verification ID.
When to use it
Use it when an assistant needs to check or filter claims about people or documents that are backed by zero-knowledge proofs, or to inspect the schemas, circuits and generators behind those proofs. It is aimed at provenance and selective-disclosure workflows rather than general document storage.
Requirements
A Lemma API key, supplied as the LEMMA_API_KEY environment variable for the local npm package or as an Authorization bearer header for the remote endpoint. The remote endpoint is available, or the local package runs via npx with Node.js. LEMMA_API_BASE is optional and defaults to the production endpoint. Network access to the Lemma API.
Before you install
The API key is a bearer credential; keep LEMMA_API_KEY and the Authorization header private. The README publishes a shared demo key scoped to demo data, which should not be used for production. The current version exposes only read tools; document registration and proof submission are listed as planned, so future versions may write data. Queries and proof lookups are sent to Lemma's API.

Installation

In SourceWeft

  1. Open Lemmaoracle in the dashboard and add it to a workspace.
  2. Connect Authorization token credentials. They are stored privately and never shown on public pages.
  3. Enable the server for the chats that should use its tools.

Web executable via Streamable HTTP. Remote servers run from the web runtime once configured in a workspace.

Use with an agent

Paste this prompt into Claude Code, Codex, Cursor or another agent — or into SourceWeft chat. The agent reads this server's install guide, shows you its publisher, endpoint and sign-in, and adds it to your client once you agree. Keys never go into a command.

Read https://sourceweft.com/mcp/io.github.lemmaoracle%2Fmcp/install.md and connect the MCP server it describes to my client. Before changing any config, show me its publisher, endpoint and sign-in method and wait for my OK. Never put an API key in a command or in a file I would commit; ask me where it should come from.

Read the install guide the agent follows

Other MCP clients

Add this to your client's mcpServers config.

{
  "mcpServers": {
    "lemmaoracle": {
      "type": "http",
      "url": "https://mcp.lemma.workers.dev/mcp",
      "headers": {
        "Authorization": "Bearer <YOUR_TOKEN>"
      }
    }
  }
}

README

@lemmaoracle/mcp

[LightNow capabilities] [npm version]

@lemmaoracle/mcp is the Model Context Protocol (MCP) server that gives AI agents access to Lemma's verifiable provenance layer — query cryptographically verified attributes (zero-knowledge proofs, selective disclosure, tamper-evident provenance) from confidential documents without ever exposing the plaintext.

Models change. Proofs remain.

What is this?

This is an MCP server. MCP (Model Context Protocol) is the open protocol for connecting AI agents to external tools and data sources, originally released by Anthropic and now maintained as a community standard. This package implements an MCP server using the official MCP SDK (@modelcontextprotocol/sdk) and exposes a set of read-only tools for querying Lemma's verifiable attribute API.

The current MVP exposes 5 read tools. Resources and prompts are not exposed in v0.0.x; write tools (register_document, submit_proof) are planned for Phase 2.

Quick start

Two ways to connect — pick whichever matches your agent setup.

Option 1 — Smithery (hosted gateway, zero install)

bash
npx -y smithery mcp add lemmaoracle/lemma

Smithery proxies to the Lemma MCP endpoint at https://lemma--lemmaoracle.run.tools and prompts for your Lemma API key. Best for trying the server quickly or for agents that already speak Smithery. Server page: smithery.ai/servers/lemmaoracle/lemma.

Option 2 — Claude Desktop with npx (stdio)

Add this to your Claude Desktop MCP config:

json
{  "mcpServers": {    "lemma": {      "command": "npx",      "args": ["-y", "@lemmaoracle/mcp"],      "env": {        "LEMMA_API_KEY": "YOUR_API_KEY"      }    }  }}

Get an API key at https://lemma.frame00.com/services. LEMMA_API_BASE can be omitted (defaults to production endpoint).

Try it in Glama Inspector

When trying this server in Glama's in-browser inspector (or any MCP inspector), you can use the demo key below. It is read-only and scoped to demo data (the same key is used by example-x402):

LEMMA_API_KEY=b6363aa6265322ed0d786a11d5b6d3264947052ca72deba4cbe1685d099af892LEMMA_API_BASE=https://workers.lemma.workers.dev

For production access, request a key at https://lemma.frame00.com/services.

Tools (MCP tool list)

This server exposes the following MCP tools (no resources or prompts in the current MVP):

ToolPhaseDescription
lemma_query_verified_attributesMVPQuery cryptographically verified attributes from Lemma. Use this as the primary entry point for finding documents whose attributes match given conditions.
lemma_get_schemaMVPRetrieve a Lemma schema (attribute structure) by ID.
lemma_get_circuitMVPRetrieve a ZK proof circuit (constraints + verifier) by ID.
lemma_get_generatorMVPRetrieve a document generator (input/output spec) by ID.
lemma_get_proof_statusMVPGet the verification status of a proof by its verificationId.
lemma_register_documentPhase 2Register a new document on Lemma.
lemma_submit_proofPhase 2Submit a ZK proof for verification.

Architecture

  • MCP Server: this package — connects AI agents to the Lemma API via the Model Context Protocol.
  • Lemma API: REST surface deployed on Cloudflare Workers, defined by OpenAPI v2.
  • MCP SDK: this server is built on the official @modelcontextprotocol/sdk (≥ 1.29).
  • License: Apache-2.0.

Privacy & data handling

Lemma is designed so that we never receive plaintext documents. The MCP server only transmits commitments, hashes, and ZK proofs to the Lemma API. See https://lemma.frame00.com/privacy for the full privacy policy.

Local development (contributors)

For contributors hacking on the MCP server itself, run it from a local build of this monorepo. End users should use the npx config above.

bash
git clone https://github.com/lemmaoracle/lemma.gitcd lemmapnpm installpnpm -F @lemmaoracle/mcp build

The bin entry produces packages/mcp/dist/index.js. Point Claude Desktop at the absolute path:

json
{  "mcpServers": {    "lemma": {      "command": "node",      "args": ["/absolute/path/to/lemma/packages/mcp/dist/index.js"],      "env": {        "LEMMA_API_KEY": "YOUR_API_KEY"      }    }  }}

Rebuild after changes with pnpm -F @lemmaoracle/mcp build and restart Claude Desktop to reconnect. To point at a non-production API, add "LEMMA_API_BASE": "https://..." to env.

Resources


🇯🇵 日本語版はこちら / Japanese README

Source: packages/mcp/README.md at commit 39439cf

Tools

5

lemma_query_verified_attributes

Lemma — query verified attributes

Query cryptographically verified attributes from Lemma. Use this as the primary tool for finding documents whose attributes match given conditions (e.g., "subject's birthYear lt 2008"). Returns { results: Array<{ docHash, schema, issuerId, subjectId, attributes, isVerified, proof?: { status, circuitId, chainId }, disclosure? }>, hasMore }. The MCP layer enriches each item with an `isVerified` flag derived from `proof.status` (true when status is 'verified' or 'onchain-verified'). Use lemma_get_proof_status to monitor a specific proof; use lemma_get_schema to interpret the keys returned in `attributes`.

ParameterslimitoffsetschemaschainIdsattributes

lemma_get_schema

Lemma — get schema

Retrieve a Lemma schema by its ID via GET /v1/schemas/{id}. A schema declares how documents of a given type are interpreted and normalized. Returns SchemaMeta { id, description? } with additionalProperties open — implementations commonly include a `normalize` artifact (WASM that maps raw documents to canonical form) and its content hash. Use this when you need to interpret attribute keys returned by lemma_query_verified_attributes.

Parametersidrequired

lemma_get_circuit

Lemma — get circuit

Retrieve a zero-knowledge proof circuit by its circuitId via GET /v1/circuits/{circuitId}. A circuit defines the constraints that proofs must satisfy and binds to a single schema. Returns CircuitMeta { circuitId, schema, description?, inputs?, verifier?: { type: 'onchain'|'offchain', address?, chainId? }, artifact?: { location: { type: 'ipfs'|'https', wasm, zkey } } }. Use this before lemma_submit_proof to confirm the circuit's schema, public inputs, and verifier configuration. Circuits are immutable; new variants get new circuitIds.

ParameterscircuitIdrequired

lemma_get_generator

Lemma — get generator

Retrieve a Lemma document generator by generatorId via GET /v1/doc-generators/{generatorId}. A generator describes how a class of source documents is produced (e.g., what fields a 'KYC-v2' issuer must populate). Returns GeneratorMeta { generatorId, schema, description?, language?, source?: { type: 'url', uri }, inputsSpec?, outputsSpec? }. Each generator is bound to one schema. Use this when onboarding a new issuer or auditing how an existing schema is being populated.

ParametersgeneratorIdrequired

lemma_get_proof_status

Lemma — get proof status

Get the verification status of a proof. NOTE: the v2 API does not yet expose a dedicated GET /v1/proofs/{id} endpoint, so this tool internally calls POST /v1/verified-attributes/query filtered by docHash (treating the verificationId returned from lemma_submit_proof as a docHash filter). Returns { status, circuitId, chainId, docHash } extracted from the matched item, or undefined if the verificationId is unknown. Status enum: received | verified | onchain-verified | rejected. Use the SDK's isVerified() helper (or check status === 'verified' || status === 'onchain-verified') to determine cryptographic validity.

ParametersverificationIdrequired

Version history

1
  1. v0.0.17LatestSep 16, 2026

Score

90% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 daysRequired25 pts
  • Auth declaredRequired10 pts
  • Tools listedRequired15 pts
  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts

    Declare a license in the repository or the registry entry.