Code Lexica logo
MCP Server · OptimizeComing Soon

The persistent context layer for the agent you already use.

Code Lexica's MCP server — part of the upcoming Optimize plan — plugs into Claude Code, Cursor, or Copilot so your agent stops paying to re-discover your codebase on every run — up to 40% fewer tokens and higher pass rates on SWE-Bench Pro, with no workflow changes.

Works with the agent you already use
Claude Code
Cursor
GitHub Copilot
Codex
Gemini CLI
The problem

Your agent starts blind on every run.

A headless agent invocation has no memory of yesterday's run, no map of your repo, no awareness of which patterns are load-bearing. It greps, re-reads, explores, and pays for every token along the way.

Stanford research found ~70% of agent tokens are waste — re-reading files, exploring dead ends, snowballing context. A single SWE-Bench Pro task on Opus 4.7 can burn $10–$15 in tokens for one PR.

The cheapest token is the one your agent never spends.

~70%of agent tokens are waste — re-grep'ing, re-reading, exploring dead ends (Stanford)
$10–$15API tokens burned per complex SWE-Bench Pro task on Opus 4.7
0memory carried between headless agent runs without a persistent context layer
How it works

Three steps. No agent switch.

Index your codebase once. Plug into your existing agent. Get just-in-time context — only what the task needs, in a shape the agent can use.

1

Index once

Connect your repos. Code Lexica builds and maintains a deep, persistent model of your architecture, dependencies, and conventions — across services, languages, and millions of lines.

2

Plug into your agent

Drop one MCP config block into Claude Code, Cursor, Copilot, or any MCP-compatible client. No agent swap. No workflow change. No new editor.

3

Just-in-time context

Your agent asks Code Lexica for exactly the context it needs — not the whole repo. Architecture summaries, change-impact maps, and standards land in the prompt only when relevant.

Capabilities

What the MCP server provides

Six categories of structured, scoped responses your agent can request per task — not a firehose of repo content.

Context retrieval

Architecture summaries, module responsibilities, dependency constraints, and "how we do X" patterns — on demand, scoped to the task.

Graph-aware change planning

Impacted modules, relevant tests, schema dependencies, and integration points returned as structured graph data the agent can reason over.

Standards & guardrails

Org patterns, preferred libraries, error-handling style, observability requirements — surfaced before the agent generates code, not after PR review.

Implementation guidance

Scaffolds that match your existing layering and conventions. Stop the agent from inventing a new pattern when you already have one.

Evidence-backed answers

Every response references exact files and functions. Your agent's output is traceable to source — no hallucinated APIs, no invented modules.

Policy-ready prompting

AI-ready context packs with constraints, examples, and relevant files — designed to drop into downstream agents without re-prompting.

Setup

One config block. Fifteen minutes.

Connect your Git provider. Code Lexica builds the persistent context model in the background. Drop the MCP config into your agent and the next invocation has full codebase context — no SDK, no editor extension, no migration.

  • Works with any MCP-compatible client
  • Bring your own model — Opus, Sonnet, GPT, Gemini
  • Per-repo or org-wide scoping
  • Self-hosted and BYO-cloud options available
settings.json
// ~/.claude/settings.json
{
  "mcpServers": {
    "code-lexica": {
      "url": "https://mcp.codelexica.com/v1",
      "headers": {
        "Authorization": "Bearer ${CODE_LEXICA_API_KEY}"
      }
    }
  }
}
Compatibility

Pick your agent. Pick your model.

Code Lexica speaks the Model Context Protocol — any MCP-compatible client can connect.

AgentModelsStatus
Claude Code
Opus 4.8, Sonnet 4.6, Haiku 4.5Planned
Cursor
All supported modelsPlanned
GitHub Copilot
GPT-5, Claude Opus 4.8Planned
Codex
GPT-5, OpenAI o-seriesPlanned
Gemini CLI
Gemini 2.5, Gemini 3Planned
Custom (Agent SDK)
AnyPlanned
FAQ

Common questions

What engineering teams ask before they connect Code Lexica to their agent.

Stop paying your agent to rediscover your codebase.

Optimize plugs Code Lexica into the agent you already use. See the benchmark, or join the waitlist for early access.