Skip to main content
Lemma has two opposite Model Context Protocol (MCP) directions. Don’t mix them:
  • Lemma MCP server: your coding agent calls Lemma to list traces and issues, inspect evidence, and take authorized actions
  • External MCP servers: Lemma calls tools on a server you connect, so Inspect and analysis can use those tools
This page is not the same connection as Inspect. Inspect runs in-product. The Lemma MCP server is for editors and coding agents. The endpoint is https://api.uselemma.ai/mcp/ (trailing-slash variants work the same), authenticated with Authorization: Bearer your_organization_api_key. Pass a project ID on project-scoped tools. Lemma only records MCP activation for a project after a successful project-scoped tool call, so saving the URL in Cursor isn’t activation by itself.

Prerequisites

  • A Lemma organization with at least one project that has, or will have, traces
  • An organization API key from API Keys or the project get-started flow. Copy it immediately; Lemma won’t show it again. Keep it server-side in your coding tool’s MCP config, never in a public repo
  • An MCP client that supports Streamable HTTP, such as Cursor, Claude Desktop, or Claude Code

Connect your coding agent

1

Get an organization API key

Create an organization API key in the Lemma dashboard.
Copy your key immediately after creating it. You won’t be able to see it again.
2

Add it to your editor

In Settings > MCP Servers, add:
Replace your_organization_api_key with the organization API key you copied.
3

Call a project-scoped tool

Ask your agent:
Include the project ID if your client hasn’t already selected one. Activation is recorded only after that project-scoped call succeeds.

What tools exist

REST and MCP share one operation list; see the API Reference for the full set. Results get truncated once they’re oversized, so prefer pagination over asking for every span at once. Use it to pull the last traces with errors, inspect a specific issue, export an issue as markdown, and create or link a Linear ticket when you’re authorized to. MCP clients require confirmation before running any write tool.

Connect an external MCP server

Connect an external MCP server when Lemma needs that server’s tools, not when a coding agent needs Lemma.
1

Open External MCP Connections

Open Settings → External MCP Connections.
2

Enter the server URL and authenticate

Enter the server URL, then authenticate with OAuth or custom headers.
3

Wait until the connection is active

Wait until the connection is active. pending, expired, needs_reauth, and revoked are not healthy.
4

Optionally add validation instructions

Add project validation instructions so Lemma knows how to use the tools.
Remove a connection when Lemma should stop calling those tools. External MCP is not a substitute for the Lemma MCP server above, and it does not deliver webhook events.

Issues

The issues your coding agent can list and act on.

Inspect

In-product investigation. Inspect doesn’t use this MCP connection.

Connect your workflow

When to use MCP versus Slack, Linear, or webhooks.

API Reference

The shared REST and MCP operation list.