{"slug": "make-claude-code-faster-and-cheaper-with-ory-lumen", "title": "Make Claude Code Faster and Cheaper with Ory Lumen", "summary": "Ory released Ory Lumen, an open-source local semantic code search engine that runs as an MCP server alongside Claude Code and cut Claude Code runtime by up to 53% and API costs by up to 39% in SWE-bench-style benchmarks. Across 8 benchmark runs on 8 languages, Ory reported average cost reductions of 26% and time reductions of 28% for bug-fix tasks, with quality maintained and zero regressions. Lumen indexes a codebase with local embedding models via Ollama or LM Studio, stores the index at ~/.local/share/lumen/<hash>/index.db, and exposes a semantic_search tool so Claude finds functions, types, and modules by meaning instead of reading files directly.", "body_md": "# Make Claude Code faster and cheaper with Ory Lumen\n\nIndex your codebase with local embeddings and cut Claude Code runtime by up to 53% and API costs by up to 39% - verified by SWE-style benchmarks.\n\n[Ory Lumen](https://github.com/ory/lumen) makes Claude Code faster and cheaper\nby adding local semantic search through SQLite-vec.\n\nAs Ory's codebase has grown, I have noticed Claude Code getting slower and more expensive to use. The reason is straightforward: Claude defaults to grep, glob, and find, and those tools depend on exact matches. More code + LLM guesses create more surface area, which leads to more tool calls, higher token costs, higher context use, and slower task completion.\n\nWhen you ask Claude to find a function or understand a module, it guesses file and function names and then tries to match them exactly. That works in a small codebase. In a larger one, it becomes expensive in both time and API costs. The problem gets worse as the codebase grows, which is the point where you need it to improve.\n\nWant to try it now? Go to the README at\n[https://github.com/ory/lumen](https://github.com/ory/lumen) and, if it is useful, leave a star.\n\nI wrote about this in more detail recently: agents struggle to build and keep a\ndurable mental model of a codebase. They repeatedly rediscover code by guessing\nand reading files instead of keeping reference of where what lives. That is a constraint of\nhow LLMs work today, not a bug waiting for a patch. Ory Lumen\n([https://github.com/ory/lumen](https://github.com/ory/lumen)) is a practical response to that constraint. It\nimproves discoverability in codebases large and small!\n\n**[Ory Lumen](https://github.com/ory/lumen)** is a local semantic code search\nengine that runs as an MCP server alongside Claude Code. It indexes your\ncodebase with local embedding models and exposes a `semantic_search` tool that\nClaude can call instead of reading files directly. Claude can then find relevant\nfunctions, types, and modules by meaning, without opening large numbers of files\nto inspect them.\n\nHow it works:\n\n`semantic_search` and gets back\nthe relevant chunks without touching the files.\nEverything runs on your machine. There are no API keys, cloud services, or\nexternal dependencies. The embedding backend is\n[Ollama](https://ollama.com/) or [LM Studio](https://lmstudio.ai/). The index is\nstored at `~/.local/share/lumen/<hash>/index.db`, keyed by project path and\nmodel name. Nothing is added to your repo.\n\nOn the first run, Lumen builds a Merkle tree over file hashes. On later sessions, it re-chunks and re-embeds only changed files. In large codebases, re-indexing after the first run takes seconds.\n\nLumen is evaluated with a SWE-bench-style harness: real GitHub bugs, real\ncodebases, Claude fixing them with and without Lumen. Patches are rated by a\nblind judge against the known-correct fix. Full methodology, raw data, and\nreproduction instructions are in\n[docs/BENCHMARKS.md](https://github.com/ory/lumen/blob/main/docs/BENCHMARKS.md).\n\n| Language | Cost Reduction | Time Reduction | Output Token Reduction | Quality | \n|---|---|---|---|---|\n| Rust | **39%** | **34%** | 31% | Same (Poor) | \n| JavaScript | **33%** | **53%** | **66%** | Same (Perfect) | \n| TypeScript | **27%** | **33%** | **64%** | Same (Good) | \n| PHP | **27%** | **34%** | **59%** | Same (Good) | \n| Ruby | **24%** | 11% | 9% | Same (Good) | \n| Python | **20%** | **29%** | 36% | Same (Perfect) | \n| Go | **12%** | 9% | 10% | Same (Good) | \n| C++ | 8% | 3% | +42% (feature task) | Same (Good) | \n\n**Cost was reduced in every language tested. Quality was maintained in every\ntask — zero regressions.** Across 8 benchmark runs on 8 languages, Lumen\nreduced costs by 26% on average and time by 28% for bug-fix tasks. Output token\nreduction is the most consistent signal: when Claude has semantic search, it\nspends less effort exploring and more effort acting.\n\nJavaScript stands out: the same Perfect-quality patches in about half the time, with two-thirds fewer output tokens. Rust shows the largest cost reduction at 39%, even on a task that was too hard for either approach, which means Lumen reduced the cost of failure.\n\nThe benchmark suite covers 8 languages: Go, JavaScript, PHP, Python, Ruby, Rust, TypeScript, and C++. All tasks are hard-difficulty tasks from real open-source projects. The results are fully reproducible — and we run them repeatedly to confirm consistency.\n\nWe launched an\n[Ory Claude plugin marketplace](https://github.com/ory/claude-plugins) alongside\nLumen today. Lumen is the first plugin in it. Inside Claude Code, run:\n\n```\n/plugin marketplace add ory/claude-plugins\n/plugin install lumen@ory\n```\n\nLumen downloads its binary automatically from the latest GitHub release, indexes\nyour project on the next session start, and registers the `semantic_search`\ntool. Claude picks it up without additional configuration.\n\n**Prerequisites:**\n\n``` bash\n$ ollama pull ordis/jina-embeddings-v2-base-code\n```\n\nThe plugin also includes two skills: `/lumen:doctor` for a health check and\n`/lumen:reindex` to force a full re-index after a large refactor.\n\nOne constraint I was not willing to drop was keeping code on your own machine. Sending source code to an external embedding API should be a deliberate engineering decision, not the default. Lumen runs entirely on local hardware with open-source models. The embeddings do not leave your network.\n\nThat also makes it usable in air-gapped environments, which matters for companies running Ory's self-hosted products.\n\nOry Lumen is a new project and still has rough edges. It will improve over time.\nWe want it to perform better on more benchmarks, and we welcome contributions\nfrom anyone who wants to help make Claude Code faster and cheaper with\nlocal-first tooling. If you find something, contribute on our\n[GitHub](https://github.com/ory/lumen).\n\nIf you are thinking about login, user management, permissions, oauth2, oidc, or sso, do not vibe code it. Use Ory's open source technology instead. It runs anywhere, integrates with any stack, and is built for security and reliability. Check out:\n\nIdentity is infrastructure, not application code", "url": "https://wpnews.pro/news/make-claude-code-faster-and-cheaper-with-ory-lumen", "canonical_source": "https://www.ory.com/blog/ory-lumen-semantic-search-claude-code", "published_at": "2026-09-11 11:49:51+00:00", "updated_at": "2026-09-11 12:10:45.744124+00:00", "lang": "en", "topics": ["ai-tools", "developer-tools", "ai-agents", "ai-products", "mlops"], "entities": ["Ory", "Ory Lumen", "Claude Code", "Anthropic", "SQLite-vec", "Ollama", "LM Studio", "GitHub"], "alternates": {"html": "https://wpnews.pro/news/make-claude-code-faster-and-cheaper-with-ory-lumen", "markdown": "https://wpnews.pro/news/make-claude-code-faster-and-cheaper-with-ory-lumen.md", "text": "https://wpnews.pro/news/make-claude-code-faster-and-cheaper-with-ory-lumen.txt", "jsonld": "https://wpnews.pro/news/make-claude-code-faster-and-cheaper-with-ory-lumen.jsonld"}}