Back to Browse

Lynx MCP Server

Developer ToolsModerate5.3MCP RegistryLocal
Free

Server data from the Official MCP Registry

LynxMCP: 100% local MCP server for the code questions grep can't answer: call graph, hybrid search

About

LynxMCP: 100% local MCP server for the code questions grep can't answer: call graph, hybrid search

Security Report

5.3
Moderate5.3Moderate Risk

LynxMCP is a local code index and call-graph server with no visible malicious patterns, hardcoded secrets, or shell-injection sinks in the provided code. Its permissions match its purpose: reading the indexed codebase, writing index storage, and fetching model files and web docs over HTTP. The main items to note are that `lynx connect` edits the user's ~/.claude/settings.json, and that the webdoc crawler fetches user-supplied URLs; the review is partial because several files were truncated. Supply chain analysis found 29 known vulnerabilities in dependencies (3 critical, 16 high severity). Package verification found 1 issue.

5 files analyzed · 33 issues found

Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.

Permissions Required

This plugin requests these system permissions. Most are normal for its category.

File System Read

Reads files on your machine. Normal for tools that analyze or process local data.

File System Write

Writes or modifies files on your machine. Check that this is expected for the tool.

HTTP Network Access

Connects to external APIs or services over the internet.

env_vars

Check that this permission is expected for this type of plugin.

database

Check that this permission is expected for this type of plugin.

How to Install

Add this to your MCP configuration file:

{
  "mcpServers": {
    "lynx-mcp": {
      "command": "uvx",
      "args": [
        "lynx-mcp==1.14.0"
      ]
    }
  }
}

Some servers take additional arguments. See the repository for details.

Documentation

View on GitHub

From the project's GitHub README.

LynxMCP

A local code index and call graph for Claude Code, Cursor, Windsurf, Antigravity and VS Code. Search by meaning and by name, trace who calls or implements what, and index library docs or PDFs alongside your code. Everything runs on your machine.

Tests License: Apache 2.0 Python 3.10+ Glama score

LynxMCP MCP server


Quickstart

No config file, no Docker, no API key, no PyTorch. Embeddings run locally on ONNX Runtime (~460 MB on disk), the index lives in your user cache so git status stays clean, and the code graph is on by default.

Claude Code

uv tool install lynx-mcp       # or: pipx install lynx-mcp
lynx connect claude

Every project you open in Claude Code gets its own index, built in the background the first time. lynx connect claude also wires a prompt hook into ~/.claude/settings.json so each request arrives with a compact map of relevant code (up to 12 locations with file, line range and signature) before the first turn. Pass --no-hook to skip it. Restart Claude Code (or run /mcp) and start asking questions.

Prefer to test it in a single project first?

claude mcp add lynx -- uvx --from lynx-mcp lynx serve .
{"hooks": {"UserPromptSubmit": [{"hooks": [{"type": "mcp_tool", "server": "lynx",
  "tool": "prompt_hook", "input": {"prompt": "${prompt}"}}]}]}}

Cursor, Claude Desktop, Windsurf, Antigravity, VS Code

uv tool install lynx-mcp
cd /path/to/your/project
lynx connect cursor            # or: claude-desktop | windsurf | antigravity | vscode

lynx connect writes only the lynx entry into your editor's MCP config, keeps a timestamped backup, and leaves every other server untouched. Restart your editor to pick it up.

Prefer a desktop installer?

Download the macOS or Windows installer to open LynxManager in your browser (lynx manager ui opens the same UI from the CLI). Simple mode guides you through three steps: pick a folder, connect your editor in one click, and run a search. Expert mode unlocks the JSON config editor, Doctor diagnostics, the graph/diff playground and the OpenAPI endpoints.

Updating

lynx update

Detects uv, pipx, pip and uvx installs and upgrades in place without touching your config or indexes. On Windows, close your AI editors first so no running Lynx process holds index files open (the update button in LynxManager closes itself, updates in a separate window, and reopens automatically).


Why Lynx alongside grep

grep is fast and right whenever you already know the exact identifier. Lynx handles the rest: finding code by what it does, navigating call and inheritance graphs before you edit, checking for duplicate implementations, and searching docs or other repositories that aren't even in your current workspace.

Keyword grepLynx
MatchesExact strings or regexesMeaning (ONNX embeddings) + code-aware BM25, fused
Different wordingReturns nothingMatches by concept even when names differ
OutputIndividual lines; you still open the fileWhole AST chunks (function or class) with symbol name and line range
RankingFile order on diskRanked by relevance; tests, data and docs ranked below production code
Structure & impactNone: a name match doesn't show callers or subtypesCode graph resolved from imports and declarations: callers, callees, subclasses, blast radius and tests
Historygit log and git blame, read by handHow often each file changes, who wrote it, which files change in the same commits, its fix commits
Across sessionsStarts from zero every timePersistent local index; re-indexes saved files in ~2s
Beyond the current repoOnly files in the open folderMultiple local repos, version-pinned web docs and PDFs in one server
Trade-offZero setupOne-time index build

Questions grep can't answer directly

QuestionWith grepWith Lynx
"What breaks if I change ApplyDamage?"Textual mentions of the stringimpact: transitive callers with hop distance + affected tests
"Who implements IWeapon or inherits from Field?"Regex guesses + manual file reads to filter commentsgraph_query: resolved inheritance and call edges with file:line
"Do we already have a helper like this?"Guess possible function namesfind_similar: ranks existing implementations by semantic similarity
"How does this API work in the library version we ship?"Model memory (often outdated)Indexed web docs & PDFs, cited with exact URL or page number
"What usually changes with this file, and who knows it?"git log, read commit by commithistory: files changed in the same commits, owners, bus factor and fix commits
"Did my change leave something out?"git diff and memorychange_risk: code outside the change that uses what it touched, files that usually change with it and were left out, the tests that reach it
"Where are the risky files?"A guesshealth: complex code that changes often, checked against the repository's own fix commits, and the hotspots no test reaches
"Is this still used? Do the docs still match?"One name at a timedead_code and doc_drift: what nothing reaches and nothing names, and doc links or paths that point nowhere

Built-in grep is still the right choice on small repos or when you already know the exact symbol name. Lynx shines on larger codebases, unfamiliar architectures, multi-repo workspaces, and library docs or PDFs the model hasn't seen.


Multiple repos, library docs & PDFs in one server

Index your main project alongside a shared internal library, framework documentation, or a folder of PDF specs, all searchable from the same editor session:

lynx manager init
lynx source add myproject --type codebase --path /path/to/your/repo
lynx source add mylib     --type codebase --path /path/to/shared/lib
lynx source add reactdocs --type webdoc   --url  https://react.dev/reference/
lynx source add manuals   --type pdf      --path /path/to/pdfs
lynx build
lynx connect cursor --config ./config.json

One config.json holds all sources. You can scope any editor window to a subset with --source myproject --source reactdocs, and multiple editor windows share the same index safely.

Running many Claude Code sessions or agents on one machine? Over stdio each one starts its own server with its own copy of the indexes in memory. Start one server over HTTP instead and point every session at it:

lynx serve --http 8791 --config ./config.json
lynx connect claude --url http://127.0.0.1:8791/mcp

It listens on the loopback interface only, and a rebuild one session asks for does not hold up the searches of the others.

Indexing can also step aside for something that wants the machine alone. Set LYNX_PAUSE_FILE to a path: while that file exists, embedding, graph builds and the startup load of the keyword index wait, and searches keep answering. A benchmark or a game measuring its frames gets the machine back within seconds.


Visual tour


Benchmarks (reproducible)

Single-shot retrieval quality on three public codebases in three languages, using behavioural questions with known ground-truth files, compared against an IDF-weighted multi-keyword grep baseline. Per-task tables: Django · Json.NET · Guava.

grep / Lynx (v1.12.0)Django 5.2 (Python)Json.NET (C#)Guava (Java)
Corpus883 files, 158k lines, 20 questions240 files, 69k lines, 15 questions606 files, 181k lines, 15 questions
hit@1 (top result right)45% / 70%33% / 67%73% / 67%
hit@5 (in top 5)95% / 90%67% / 73%93% / 87%
MRR0.64 / 0.790.47 / 0.700.81 / 0.76

Key takeaways:

  • Behavioural queries (Django, Json.NET): Lynx puts the right file first far more often (70% vs 45% on Django, 67% vs 33% on Json.NET) because it matches intent, not just literal tokens.
  • Exact-name queries (Guava): when class names like BloomFilter or RateLimiter already match the question's wording, keyword grep edges ahead, and the two work best side by side.
  • Compact context: search(outline=true) returns signatures and first doc lines instead of full bodies (2.4× smaller, measured), and three tool profiles keep schema overhead bounded (core: 6.0k chars, standard: 11.9k, full: 19.7k).
# Python (Django 5.2)
git clone --depth 1 --branch 5.2 https://github.com/django/django.git benchmarks/_target/django
python benchmarks/run_benchmark.py && python benchmarks/structural_demo.py

# C# (Json.NET)
git clone --depth 1 https://github.com/JamesNK/Newtonsoft.Json.git benchmarks/_target/jsonnet
python benchmarks/run_benchmark.py --tasks benchmarks/tasks_jsonnet.json \
  --target-dir benchmarks/_target/jsonnet --storage-dir benchmarks/_storage_csharp \
  --results-json benchmarks/results_csharp.json --results-md benchmarks/RESULTS_csharp.md

# Java (Guava)
git clone --depth 1 https://github.com/google/guava.git benchmarks/_target/guava
python benchmarks/run_benchmark.py --tasks benchmarks/tasks_guava.json \
  --target-dir benchmarks/_target/guava --storage-dir benchmarks/_storage_java \
  --results-json benchmarks/results_java.json --results-md benchmarks/RESULTS_java.md

How it works

flowchart LR
    A["Your code + docs + PDFs"] --> B["Tree-sitter<br/>AST chunker"]
    B --> C["bge-small<br/>ONNX embeddings"]
    B --> D["code-tokenized<br/>BM25"]
    B --> G["Code knowledge graph"]
    A --> H["Git history<br/>local store"]
    C --> R{{"RRF fusion"}}
    D --> R
    Q(["Your query"]) --> R
    R --> RR["Optional<br/>reranker"]
    RR --> RES["Ranked code<br/>file : line : symbol"]
    G --> GT["Graph tools<br/>callers · subclasses · impact"]
    H --> HT["Git tools<br/>history · change risk · health"]
    G --> HT

    classDef store fill:#fff3e6,stroke:#e8742c,color:#24292f;
    classDef out fill:#e8742c,stroke:#e8742c,color:#fff;
    class C,D,G,H store;
    class RES,GT,HT out;
  • AST chunking (20 languages): Tree-sitter splits code along function and class boundaries, never arbitrary character windows. Supported grammars include Python, TypeScript/TSX, JavaScript, C#, C, C++, Rust, Go, Java, GDScript, Kotlin, Swift, Ruby, PHP, Lua, Scala, SQL, Bash and Objective-C.
  • Hybrid retrieval: Every search fuses dense ONNX embeddings (BAAI/bge-small-en-v1.5) with a code-tokenized BM25 index (covering bodies, symbol names and file paths) via reciprocal rank fusion, ranking production code above tests, data and docs. An optional local cross-encoder reranker is built in.
  • Code graph: Built from imports, declarations and call sites across files. It powers impact, describe_symbol, find_usages, graph_query, export_graph, dead_code and the Architecture page.
  • 100% local & offline: The embedding model downloads once (with a GitHub Release fallback for firewalled or air-gapped networks). No cloud index, no telemetry, no code leaves your machine.
  • Fast startup: The MCP handshake completes in 1 to 2 seconds while indexes open in the background; a file watcher re-indexes saved files in ~2 seconds, and while it catches up each answer ends with one line that says so.

In a git repository Lynx also reads the history into a small store next to the index, once in full and then only the new commits: how often each file changes, who changed it, which files change together and which commits were fixes. history, change_risk and health answer from it, together with the graph, and the Architecture page takes its colours from it.


The tools your AI gets

The tool surface is fixed regardless of how many sources you configure, split into three profiles:

ProfileToolsSchema size
core (7)search, describe_symbol, module_summary, find_usages, impact, plus the two hook tools (prompt_hook, read_guard)~1,500 tokens
standard (14, default)core + find_definition, find_similar, graph_query, repo_overview, search_diff, history, change_risk~2,950 tokens
full (24)standard + deep_search, find_tests_for, export_graph, health, dead_code, doc_drift, feedback, list_sources, get_rag_status, update_source_index~4,900 tokens

Select a profile with --profile core|standard|full, LYNX_TOOL_PROFILE, or tools.profile / tools.include in config.json. Every tool is also a CLI subcommand (lynx search ..., lynx find-definition ApplyDamage, lynx impact ApplyDamage, lynx graph query --op callers --symbol ApplyDamage) with --json for scripts.

ToolProfileWhat it answers
search(query, identifiers?, source?, outline?)coreHybrid search across one or all sources. Pass known symbol names in identifiers, or outline=true for signatures only (2.4× smaller).
describe_symbol(symbol, file?)coreDefinition, callers, callees and tests in one call; for a class, also bases, subtypes and member signatures. Optional file disambiguates same-name definitions.
module_summary(file)coreEvery symbol in a file with its signature and doc line, plus its imports and dependents.
find_usages(symbol)coreCallers from the graph, subtypes and textual references with line numbers.
impact(symbol)coreTransitive blast radius through the call graph with hop distance, plus tests to re-run.
prompt_hook(prompt)coreCalled by Claude Code's UserPromptSubmit hook (not the model) to prepend a compact map of relevant code.
read_guard(file_path?, offset?, limit?, command?)coreOptional PreToolUse hook on Read / Bash (not for the model): refuses a read of more than 200 lines of an indexed file once, with the file's outline; the same read asked again goes through.
find_definition(symbol)standardWhere a symbol is defined: full body for the top match, signatures for the rest.
find_similar(snippet)standardChecks whether a draft duplicates existing code and ranks similar implementations.
graph_query(operation, symbol?, depth?)standardcallers, callees, subclasses, superclasses (the whole hierarchy in one call with depth 1-10), imports, neighbors, shortest_path, overview, surprising_connections, audit (a C# package's SOLID findings, each with the files its refactor touches), status.
repo_overview()standardLanguages, frameworks, entry points and build/test/run commands.
search_diff(query, base?)standardSearch scoped to files changed against a base branch, useful for code review.
history(target?, days?)standardFrom git, before an edit: how often a file or folder changes, who wrote it, the files that usually change in the same commits, and its fix commits.
change_risk(base?)standardAfter an edit: the symbols the uncommitted changes (or a branch) touch, the code outside the change that uses them, files that usually change with them and are missing, the tests that reach them, and the change's size against recent commits.
health(target?, days?)fullHotspots, code both complex and changing (commits x the square root of 1 + its branches), with how the ranking held up against the repository's own fix commits and which hotspots no test reaches.
doc_drift(target?, include_possible?)fullDocs that name what the code no longer has: links to missing files, paths that match no file and, on request, code names no code file writes.
dead_code(target?, include_low?)fullFunctions, methods and types nothing reaches: no call, type use or base in the graph, and the name written nowhere else in the source, docs and config included; by tier.
deep_search(queries, source?)fullTries multiple query phrasings in sequence when a single search is weak.
find_tests_for(symbol)fullTests covering a symbol directly or through the call graph.
export_graph(target, mode?)fullExports a self-contained offline HTML view of a symbol's blast radius or a file hub.
feedback(trying_to_do, tried, stuck)fullLogs local notes when an agent couldn't find something, to help tune sources.
list_sources / get_rag_status / update_source_indexfullInspect configured sources and trigger a manual refresh.

Retrieval tools advertise the MCP readOnlyHint annotation so clients can auto-approve them. search sets anthropic/alwaysLoad so Claude Code keeps it immediately available while loading the remaining tools on demand.


Integrations

Search and the code graph are also exposed over a local HTTP API (/api/v1) with OpenAPI 3.1 metadata and NDJSON streaming, bound to 127.0.0.1:

  • Coral 1.x: point it at /api/v1/openapi.json to add Lynx as a typed provider next to GitHub or Sentry (Coral 0.x SQL tables continue to work).
  • DuckDB: query Lynx directly via read_ndjson_auto('http://127.0.0.1:8765/api/v1/search?...') to join code relevance with git churn, logs or tickets.
  • Steampipe: lynx_source, lynx_search and lynx_graph SQL tables (prebuilt binaries).
  • GitHub Action: posts downstream callers and related code on pull requests.
  • Agent rules & MCP recipes: drop-in CLAUDE.md / AGENTS.md pointer and workflows combining Lynx with GitHub, Sentry and Jira. lynx brief --write CLAUDE.md adds a short map of the codebase to that file between two markers (build and test commands, the main parts from the foundations up, cycles and, with git, hotspots); a later run rewrites only what is between them.

Documentation

LynxManagerThe web UI step by step, with pictures of the current version
Full guideConfiguration, codebase / webdoc / PDF sources, retrieval internals, tool profiles, hooks, air-gapped setup
Outline modeSignatures instead of bodies: 2.4× smaller output, measured data & chart
CoralCode search and code graph as typed tools in Coral 1.x
DuckDB / SteampipeCode search and code graph as SQL tables
Agent rules snippetShort pointer for AGENTS.md / CLAUDE.md
MCP recipesCombining Lynx with GitHub, Sentry and Jira MCP servers
GitHub ActionAutomated PR impact analysis on every pull request
config.example.jsonAnnotated v2 configuration reference

Status & License

Developed independently; issues and PRs are welcome (see ROADMAP.md). Licensed under Apache 2.0.


Reviews

No reviews yet

Be the first to review this server!