LemmaBase MCP
LemmaBase MCP lets you connect an AI assistant to LemmaBase.com so it can work with published rules,
author new specs in chat, and open change requests on repositories you own.
The catalog has nine tools: list, search, show, evaluate, evaluate_inline, source, create_repo, publish, and guide.
MCP requires a personal access key or OAuth. Creating or writing repositories needs a personal key with write permissions. Organization access keys can read org repositories but cannot create or write.
Connecting
Add this URL in your MCP client settings. LemmaBase MCP is stateless Streamable HTTP
(no session). It accepts classic initialize
for 2025-03-26
/ 2025-11-25
(Unsloth, many editors), and modern
per-request _meta
for 2026-07-28
(optional server/discover).
https://lemmabase.com/mcp
The LemmaBase MCP endpoint requires authentication on every request. Use a personal access key (Bearer header) or OAuth where your client supports it (Claude Desktop / claude.ai Connectors, Unsloth remote MCP). Create and manage keys under Dashboard → Access Keys. Organization keys are read-only and can be scoped to specific repositories. See Using your specs for the key format.
What your assistant can do
Registry tools read published
snapshots only. Chat authoring never hits LemmaBase until publish
opens a pending change request (Accept makes it live).
-
list: repositories your key can access, each as@handle/slugwith published spec names underneath search: find public owners, repositories, and specs-
show: data catalog and rule types for a published spec (repository+spec) -
evaluate: evaluate a published spec with objectdata(repository+spec; optionalrules) -
evaluate_inline: run pasted Lemma source in a throwaway engine (never persists) -
source: formatted published Lemma for a repo or one spec -
create_repo: create an empty repository when the user explicitly asks for a new one (name/slug; personal Bearer token) -
publish: upsert one or more files (filesarray of path/code objects, or singlepath+code) into an existingrepository=@handle/slugand open a pending change request (personal Bearer token; never creates a repo; live specs unchanged until Accept) guide: Lemma language / intake guide with a short hosted playbook
Internal staff keys also see publish_article: create a live article
(title + markdown body; optional slug, excerpt, contact fields, visibility).
Default visibility=public
lists the article on /articles.
Pass visibility=semipublic
for an unlisted article at /articles/:slug/:access_code
(not indexed). Duplicate slugs are rejected; the tool does not update existing articles.
Authoring and change requests
Author in the conversation with guide
(topic full) and evaluate_inline
in multiple rounds. Those calls are request-local: nothing is stored.
When the user explicitly asks to save, call list
for an existing @handle/slug
and publish
with repository=
that path and every file in one files
array.
For a brand-new repository, call create_repo
first, then publish. publish
opens a pending change request; evaluate
still evaluates the current publication until someone Accepts.
Then call source
for user verify of the live version.
Resource templates expose published source, schema, and OpenAPI at
lemma://registry/...
URIs. Language guides and examples are the same lemma://guide
and lemma://examples
resources as the CLI.
evaluate
and evaluate_inline
take data
as a JSON object. Decimal magnitudes are strings
(write "84", not a JSON number). Integers may stay JSON numbers in Elixir.
A list slot is a JSON array of strings (value lists) or row objects (instance lists).
A single-unit map such as {"eur": "84"}
binds measure or ratio data.
Slots bound by uses
to data or a rule (for example i.x
wired to base) are optional overrides.
Pass text: true
on show
for the human-readable lemma show view.
Pass repository
on list
to print that publication's specs and uses.
If a rule changed on a particular date, pass effective
on evaluate or show.
The syntax for temporal rules is on
Lemma.run
(opens in new tab)
.
VS Code / Antigravity / Cursor
In your editor’s MCP settings, add a server entry like this:
{
"mcpServers": {
"lemmabase": {
"url": "https://lemmabase.com/mcp",
"headers": {
"Authorization": "Bearer lmb_YOUR_TOKEN"
}
}
}
}
Create a personal access key under Dashboard → Access Keys and put it in the headers block. Clients that support OAuth (Claude Connectors) can skip the headers and complete browser sign-in instead.
Claude Desktop / claude.ai Connectors
In Claude Desktop or claude.ai, add a custom connector with URL https://lemmabase.com/mcp.
Claude should detect that sign-in is required and prefer Anthropic’s hosted client metadata (CIMD).
Dynamic client registration remains available for other hosts.
After you approve access in the browser (email or Google / Microsoft / GitHub), Claude receives a personal
access key automatically (visible under Access Keys).
Localhost URLs do not work in Claude Connectors: Anthropic’s cloud must reach a public
https
endpoint. Use production LemmaBase.com, or a tunnel to your local server.
Gemini CLI
Configure mcpServers in your Gemini CLI settings with the LemmaBase.com URL
and a Bearer access key (or use an OAuth-capable client).
Public and private specs
The LemmaBase MCP server has access to all Lemma specs on the platform that your account can see. Public specs are available once you are authenticated. With a personal access key, your assistant can also reach your private repositories, create repositories, and write published specs. Organization access keys can read organization repositories they are scoped for.
Use it when you want your assistant to reference what others have published: look up a spec someone shared,
read how it is structured, run it with sample input, or compare it with rules you are writing.
Everything you evaluate from the registry comes from publications on LemmaBase.com.
Authoring stays in chat via evaluate_inline
until publish
publishes.
That makes it useful when you build on existing work. Your assistant can find a VAT or pricing spec in the registry, inspect its inputs and rules, and help you wire it into your own repository or explain what a published result means.
Related
LLMs explains the llms.txt fallback for clients that do not support MCP.
Registry search lets you browse public rules in the browser.