# lemmaoracle/lemma [Health: Active]

**Category:** 🔑 Cryptography  
**Repository:** https://github.com/lemmaoracle/lemma  
**GitHub Stars:** 1  
**npm Downloads (last month):** 169  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/mcp-305

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

## Tools
Capabilities this server exposes over MCP:

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

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

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

## Documentation & README

# Lemma Oracle

> Give AI proven facts.

Lemma is a cryptographically verified truth layer for agent AI. It lets AI
reason over confidential data via zero-knowledge proofs, selective
disclosure, and tamper-evident provenance — while raw content stays
encrypted.

Every attribute an AI reads through Lemma carries permanent provenance:
who issued it, which schema defined it, how it was proven, and where its
verification record is anchored.

## Learn more

- 🌐 **Website**: https://lemma.frame00.com
- 📄 **Services**: https://lemma.frame00.com/services
- ✍️ **Blog & essays**: https://lemma.frame00.com/blog
- ❓ **FAQ**: https://lemma.frame00.com/blog/faq

## MCP server

`@lemmaoracle/mcp` is the **Model Context Protocol (MCP) server** for Lemma,
published on npm and built with the official **MCP SDK**
(`@modelcontextprotocol/sdk`). Point Claude Desktop or any MCP-compatible
agent at it:

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

Tool list, env vars, and contributor build: [packages/mcp/README.md](https://github.com/lemmaoracle/lemma/blob/HEAD/packages/mcp/README.md) · [npm](https://www.npmjs.com/package/@lemmaoracle/mcp)

## Packages

Public packages in this monorepo:

- **[`packages/mcp/`](https://github.com/lemmaoracle/lemma/blob/HEAD/packages/mcp)** — `@lemmaoracle/mcp`, the **Model Context Protocol (MCP) server** for AI agents (this is the package above).
- **[`packages/sdk/`](https://github.com/lemmaoracle/lemma/blob/HEAD/packages/sdk)** — `@lemmaoracle/sdk`, TypeScript SDK for the Lemma API.
- **[`packages/spec/`](https://github.com/lemmaoracle/lemma/blob/HEAD/packages/spec)** — `@lemmaoracle/spec`, OpenAPI spec + shared TypeScript types.
- **[`packages/x402/`](https://github.com/lemmaoracle/lemma/blob/HEAD/packages/x402)** — `@lemmaoracle/x402`, x402 payment middleware drop-in.

## Contact

For partnership and implementation inquiries, please use the contact form:
https://lemma.frame00.com/services

## License

This repository uses different licenses for different packages:

| Package | License |
|---|---|
| `packages/contracts`, `packages/relay`, `packages/passthrough` | **BUSL-1.1** (changes to Apache-2.0 on 2030-05-01) |
| `packages/sdk`, `packages/spec`, `packages/mcp`, `packages/parser`, `packages/x402` | **Apache-2.0** |
| `packages/web` | Private (not distributed) |

The root `LICENSE` file applies as the default. Each package may contain its own `LICENSE` file that takes precedence.

---

© 2026 FRAME00 Inc.

🇯🇵 [日本語版はこちら / Japanese README](https://github.com/lemmaoracle/lemma/blob/HEAD/README.ja.md)

