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 分

    請在儲存庫或註冊中心條目中宣告授權條款。