MCP.so
登录

Graphlens Mcp

@Neko1313

关于 Graphlens Mcp

Model Context Protocol (MCP) server for Graphlens. Exposes polyglot code graphs to LLM agents.

基本信息

传输方式

stdio

发布者

Neko1313

提交者

Nikita Rybalchenko

配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

{
  "mcpServers": {
    "graphlens": {
      "command": "graphlens-mcp",
      "args": [
        "serve",
        "--db",
        "/home/neko/project/graphlens/.graphlens/graph.db",
        "--root",
        "/home/neko/project/graphlens"
      ]
    }
  }
}

工具

未检测到工具

工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。

概览

What is Graphlens Mcp?

Graphlens Mcp is a free, MIT‑licensed MCP server that gives coding agents a semantic code graph of a project — symbols, cross‑file calls, references, imports and cross‑language boundaries. It builds on the language’s own LSP‑grade analysis engines (rust‑analyzer, gopls, the TypeScript compiler, the bundled ty engine for Python) to produce a stable, real picture of the codebase.

How to use Graphlens Mcp?

Install with uv tool install graphlens-mcp (requires Python ≥ 3.13), then run graphlens-mcp init inside your project to detect languages, index the code, and configure your agent. Restart the agent (Claude Code, Cursor, etc.) and ask structural questions like “what breaks if I change the signature of create_order?”. The server is launched automatically by the agent; you can also use status, reindex, and remove commands.

Key features of Graphlens Mcp

  • Stable, real semantic graph from LSP‑grade language engines.
  • Three tools: search (find by name/content/meaning), relations (neighbourhood of a symbol), info (read source or file outline).
  • Freshness maintained via a filesystem watcher that re‑indexes the connected set on change.
  • Fallback to name/content matching when the embedding model cannot be fetched.
  • Caching in a local SQLite database (<project>/.graphlens/graph.db).
  • Reproducible A/B benchmark demonstrating high accuracy and lower token cost vs. alternatives.

Use cases of Graphlens Mcp

  • Impact analysis: “What breaks if I change the signature of this function?”
  • Rapid code navigation without grepping or reading files top‑to‑bottom.
  • Understanding dependencies across file and language boundaries in a multi‑language project.
  • Onboarding to unfamiliar codebases by querying symbol relationships.

FAQ from Graphlens Mcp

What runtime does Graphlens Mcp require?

Python ≥ 3.13 (a constraint inherited from the graphlens engine). Additional toolchains (Node for TypeScript, Go toolchain, etc.) are needed for full cross‑file semantics in those languages.

How does Graphlens Mcp keep the graph fresh?

A filesystem watcher (started by serve) re‑indexes the connected set — the changed file plus its direct importers and imports — on every edit. At startup, a one‑shot reconcile scans the project to handle changes made while the server was down.

What languages does Graphlens Mcp support?

Python (full semantics out‑of‑box), TypeScript, Go, Rust, and PHP. For languages other than Python, symbols are parsed but typed/call resolution is degraded until the respective toolchain is installed; this never blocks init.

What are the known limitations of Graphlens Mcp?

Deep ripple effects from a rename may require a full reindex; incremental edits on cross‑language boundaries may become exact only after a reindex. The watcher re‑links only the connected set, not the entire project.

How does Graphlens Mcp compare to other code‑context tools?

Its A/B benchmark (against semble, codegraph, and a no‑tools control) shows it achieves higher or comparable accuracy on hard impact questions while keeping token costs low and flat across strong and weak models, staying clearly ahead of the no‑tools control.

评论

更多 MCP 服务器