Lemmaoracle

io.github.lemmaoracle由 GitHub 账号 lemmaoracle 发布v0.0.17更新于 Oct 25, 2026

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

已验证Streamable HTTP可网页运行知识与记忆安全与监控

概览

AI 生成的概览

Lemma 的 MCP 服务器让 AI 助手查询来自机密文档的加密验证属性,并查看 schema、零知识电路和生成器。

可以做什么
按出生年份等条件查询 Lemma 文档中经过验证的属性,返回文档哈希、签发方、主体和证明状态,且不暴露明文。按 ID 查看 schema,了解某类文档如何被解释和规范化。按 ID 查看零知识证明电路,包括约束和验证器信息。按 ID 查看文档生成器,了解某类源文档如何生成。按验证 ID 查询证明的验证状态。
适用场景
当助手需要核验或筛选由零知识证明支撑的关于个人或文档的声明,或需要查看这些证明背后的 schema、电路和生成器时使用。它面向来源证明和选择性披露流程,而非通用文档存储。
运行要求
需要 Lemma API 密钥:本地 npm 包通过环境变量 LEMMA_API_KEY 提供,远程端点通过 Authorization bearer 请求头提供。可使用远程端点,或通过 npx 在 Node.js 上运行本地包。LEMMA_API_BASE 可选,默认指向生产端点。需要能访问 Lemma API 的网络。
安装前请注意
API 密钥是 bearer 凭证,请妥善保管 LEMMA_API_KEY 和 Authorization 请求头。README 中公开了一个仅限演示数据的共享演示密钥,不应在生产环境使用。当前版本只提供只读工具;文档注册和证明提交被列为后续计划,未来版本可能写入数据。查询和证明查询会发送到 Lemma 的 API。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Lemmaoracle,将其添加到工作区。
  2. 连接 Authorization token 凭据。它们会被私密存储,绝不会在公开页面上展示。
  3. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/io.github.lemmaoracle%2Fmcp/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。

{
  "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

来源:packages/mcp/README.md,提交 39439cf

工具

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`.

输入参数limitoffsetschemaschainIdsattributes

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.

输入参数id必填

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.

输入参数circuitId必填

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.

输入参数generatorId必填

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.

输入参数verificationId必填

版本历史

1
  1. v0.0.17最新Sep 16, 2026

评分

已满足适用检查项的 90%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

    请在仓库或注册中心条目中声明许可证。