Graphlens Mcp

MCP开发工具

提供方 Neko1313

开发工具 stdio · 本地进程 会话登录 社区 / 第三方 ClaudeCursorCodexZed
查看接入方式

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

一句话选型结论

按资料字段整理

Graphlens Mcp 属于开发工具类 MCP 服务器,stdio · 本地进程,会话登录,可直接接入 Claude、Cursor、Codex 等,有可直接执行的安装命令。接入前先确认权限范围;涉及写入、删除或付款的操作,建议先在测试环境验证。

分类开发工具 传输方式stdio · 本地进程 鉴权会话登录 部署方式本地部署
GitHub 星标 未标注 仓库热度,无公开仓库时显示未标注
工具数 未标注 暴露给模型的工具数量
资源 / 提示词 0 / 0 资源与提示词模板数量
维护方 社区 / 第三方 核验等级 仅资料核对

工具与能力

开发工具
数量来自来源目录的标注,具体工具清单以官方文档为准
工具数量未标注暴露给模型可调用的工具个数
资源数量0可读取的资源条目
提示词数量0内置提示词模板数量

能力标签

支持客户端

适用场景

ai codingcode analysisknowledge graph

安装与配置

stdio · 本地进程 会话登录
客户端在本机拉起子进程,数据不出本机
uv tool install graphlens-mcp # or: pipx install graphlens-mcp\r

这条命令只是入口,具体启动参数请按官方文档补齐,不要直接照搬到别的服务器。

  1. 1
    准备运行环境

    stdio 服务在本地起进程,需要先装好 Cross-platform,再按安装命令拉取依赖。

  2. 2
    安装服务

    复制上面的安装命令执行;命令里带占位符的位置,换成自己的密钥或路径。

  3. 3
    写入客户端配置

    在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4
    验证是否可用

    连接成功后随便调一个只读工具,确认能返回结果,再接入正式流程。

典型使用场景

3 类
按分类与标签整理的常见用法,具体以官方文档为准
代码与仓库操作

在对话里直接查代码、提 issue、走 PR,省掉来回切工具。

本地命令与脚本

把构建、测试、格式化这类重复命令交给模型执行。

接口联调与测试

让模型调你的接口、跑一遍用例,快速定位问题。

选择建议

选之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 有现成的安装命令,不用自己找入口,照着跑就能起服务。
  • 已适配 Claude、Cursor、Codex,换客户端不用重新研究配置。

先想清楚的地方

  • stdio 方式要求本地装好运行时(如 Node.js),换机器要重新装一遍。
  • 使用前要准备好会话登录对应的凭据,并按最小权限配置。
  • 资料没标注工具数量,实际能力要装好后确认。
  • 版本更新与行为细节以官方仓库为准。

更适合

  • 需要在开发工具场景里让模型直接调用外部能力的人。
  • 已经在用 Claude、Cursor 的用户,接入路径最短。
  • 想先快速试一下、能接受在本地或自有环境跑服务的人。

不太适合

  • 完全不想在本地装环境的人。
  • 不方便管理密钥或第三方授权的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
MCP 服务器工具数传输方式部署方式安装命令最后核验
Graphlens Mcp当前 未标注 stdio · 本地进程 本地部署 有 未标注
Git 838e2ec1 12 stdio · 本地进程 本地部署 有 2026-05-17
Markitdown MCP 2c653a5f 1 stdio · 本地进程 本地部署 有 2026-05-17
JavaGuide 未标注 stdio · 本地进程 本地部署 有 2026-04-11
awesome-claude-skills 未标注 stdio · 本地进程 本地部署 有 2026-04-26
Context7 831acf40 未标注 stdio · 本地进程 本地部署 有 2026-05-17

服务器档案

开发工具
字段来自项目仓库与公开索引,中文说明由本站标注
提供方Neko1313上游标注的维护方 Neko1313
分类开发工具本站按上游分类展示
连接方式stdio · 本地进程客户端在本机拉起子进程,数据不出本机
鉴权方式会话登录远程服务建议用最小权限凭据
维护方社区 / 第三方核验等级 仅资料核对
包名 / 运行时未标注 · Cross-platform本地安装时用到的包标识与运行时
部署类型本地部署上游给出的部署形态
最近核验未标注上游最后核验时间

详细介绍

11.1 KB
来自项目仓库与上游目录的原文,未做删改

graphlens-mcp

A free, MIT-licensed MCP server that gives coding
agents (Claude Code, Cursor, and compatible clients) a semantic code graph of your
project — symbols, cross-file calls, references, imports and cross-language boundaries.

Instead of reading files top-to-bottom or grepping for names, the agent navigates the
structure
: who calls this function, what does it depend on, what breaks if I change
its signature
. It is a thin runtime layer over the
graphlens analysis engine: graphlens provides
the mechanisms (parsing, stable node identity, resolvers); graphlens-mcp owns the storage,
freshness and the agent-facing surface.

📖 Documentation:

> Status: early. The core navigation works; see Known limitations.

Why

Coding agents discover structure the slow way — grep, glob, read one file at a time —
rebuilding call paths by hand before the real work even starts. The motivation is the same
as every other code-context tool: stop the agent from grepping. The approach is what
sets graphlens apart.

Most tools answer this by building their own model of your code — an ad-hoc graph
stitched from heuristics, where every tool maps the codebase a little differently and
nothing is authoritative. graphlens takes the opposite bet: it builds on the language's
own real analysis engines
— rust-analyzer, gopls, the TypeScript compiler, the bundled
ty type engine — the LSP-grade tooling the industry already trusts. That yields a stable,
real
picture of the project (who actually calls what, across files and languages), not a
bespoke approximation. And a stable foundation is something you can build on: attach context
to the parts of a change that matter, auto-extract semantic clusters, answer impact
questions reliably.

That foundation is the graphlens engine —
parsing, stable node identity, and the resolvers. graphlens-mcp is a smart, agent-facing
layer over it
, and — honestly — a worked example of how to use the engine: it persists
the graph (so the whole thing isn't held in memory), adds a semantic + clustering layer on
top, keeps it fresh as you edit, and exposes it to agents as navigation tools plus a bundled
skill. From that example it is growing into a self-sufficient system — one that, measured
against the market's giants, aims for stable, reproducible results: better in some places,
worse in others, but honest about which (see How it compares).

How it compares

graphlens-mcp ships with a reproducible A/B benchmark (benchmarks/)
that drives the same agent against three interchangeable code-context MCP servers —
graphlens, semble (semantic search), and codegraph (graph index) — plus a no-tools
control
that measures how much each server adds over the model's own memory. It runs across
real Go / Rust / Python / TypeScript codebases and grades answers deterministically
against oracle gold
(no LLM judge), stratified into SIMPLE lookups vs HARD impact /
cross-file questions, and reports accuracy alongside token / tool-call / dollar cost —
because a cheaper arm at equal accuracy wins.

> 📊 Results (10 repos · 3 models, strong → genuinely weak · ~2,400 graded runs —
> full breakdown, significance tests and reproduction steps at
> docs: Benchmarks):
>
> · SIMPLE accuracy · HARD accuracy · HARD tokens (median) · HARD completion
>
> · graphlens · 0.980 – 1.000 · 0.899 – 0.921 · 22.4k – 34.1k · ≥ 0.959 on every model
> · codegraph · 0.912 – 0.990 · 0.655 – 0.939 · 23.2k – 70.0k · drops to 0.765 on the weakest model
> · semble · 0.647 – 0.961 · 0.555 – 0.850 · 21.6k – 74.9k · drops to 0.688 on the weakest model
> · none (control) · 0.366 – 0.681 · 0.453 – 0.685 · 0.1k – 0.9k · —
>
> Accuracy alone hides the number that matters to a bill: tokens paid per task. graphlens's
> HARD-tier token spend stays flat (22k–34k) whether the driving model is strong or weak;
> codegraph's and semble's balloon past 70k on the weakest model — more than double
> graphlens's ceiling — for a worse answer, not a better one. graphlens is the only arm that
> stays clearly ahead of the no-tools control and keeps completion above 0.95 at every
> model tier: on the weakest model tested (gpt-oss-20b) it holds 0.900 HARD accuracy at
> roughly half the token cost of codegraph. Pairwise Wilcoxon signed-rank tests (matched by
> task) confirm the gap is statistically significant on the weaker models, not an artifact of a
> few outlier tasks — see the notebook for per-model p-values and effect sizes.

Install

Requires Python ≥ 3.13 (a constraint inherited from graphlens).```bash
uv tool install graphlens-mcp # or: pipx install graphlens-mcp


Python language analysis works out of the box (the `ty` type engine ships as a
dependency). Other languages parse immediately and unlock full cross-file semantics once
their toolchain is present (Node for TypeScript, the Go toolchain, etc.); without it that
language is reported as `degraded` rather than blocking `init`.

## Quickstart (two commands)```bash
uv tool install graphlens-mcp        # 1. install
cd your-project && graphlens-mcp init  # 2. index + configure your agent

init detects the project's languages, indexes the code into a local graph, writes the
MCP server entry into your agent's config and installs the navigation skill. You do not
run serve yourself — your agent launches it from the config. Restart the agent and ask
it something like "what breaks if I change the signature of create_order?".

Commands

Command What it does
graphlens-mcp init Detect languages → toolchain doctor → full index → configure agents → install skill
graphlens-mcp serve Start the MCP server over stdio. Launched by the agent, not by you
graphlens-mcp status Show detected languages, toolchain status, and graph size/freshness
graphlens-mcp reindex Force a full rebuild (e.g. after installing a new toolchain)
graphlens-mcp remove Deregister from agents and (with --purge-db) delete the local graph

Useful init flags: --root, --agent claude_code --agent cursor (repeatable),
--no-agent, --no-skills, --db.

The graph lives at /.graphlens/graph.db (SQLite). It is a regenerable cache —
safe to delete; reindex rebuilds it. Add .graphlens/ to your VCS ignore (the bundled
init flow assumes it is not committed).

Supported languages

Language Engine Out-of-box
Python ty (bundled) Full semantics immediately
TypeScript Node bridge degraded without Node; full semantics with Node installed
Go Go toolchain degraded without toolchain
Rust SCIP / rust-analyzer degraded without toolchain
PHP PHP parser degraded without toolchain

graphlens-mcp status reports the actual resolver status per language. When a toolchain is
missing, that language is reported as degraded (parsed structure, calls/types not fully
resolved) with an install hint — it never blocks init.

Agent tools

Three tools — everything a symbol or file needs comes back as a navigable graph node,
not a dead grep line. Each response carries a graph-quality status (ok | degraded) so the
agent never mistakes a partial answer for a complete one, plus an indexing flag (true
when a background reindex is running, so edges may be temporarily incomplete).

Tool Purpose
search Find code by NAME, CONTENT, or MEANING — the one way in. Returns graph nodes with their signature (often enough to answer without a follow-up call). Content is matched literally, not as a regex. Scope with path_glob (e.g. "tests/*", "*.ts", "!tests/*" to exclude a subtree); set exhaustive=true to list every matching file (no cap, no signatures) instead of the ranked top-N
relations A symbol's neighbourhood in one call: callers, callees, implementors/subclasses, and non-call references — each with its signature. The impact-analysis tool ("what breaks if I change X?", "what implements X?")
info Read a specific target: a symbol (node id or name) → source + signature + location; a file path → its symbol outline

search and relations accept either a symbol name or a node id directly — you don't
need to look up a node id first. Both cap their response size (a large hit set is ranked by
relevance via a small bundled embedding model, not just truncated) and surface true counts
(callers_total, references_total, …) when a list is capped, so the agent sees "15 shown
of 22" instead of guessing. If the embedding model can't be fetched (e.g. a first run with no
network), search transparently falls back to name/content matching.

Freshness model

A single mechanism keeps the graph current: a filesystem watcher (serve starts it by
default; disable with --no-watch). When a file changes on disk the server re-indexes the
connected set — the changed file plus the files that import it and the files it imports —
with one full analyze, so cross-file edges are rebuilt correctly rather than left partial.
Deleting a file prunes its symbols and refreshes its importers. There is no polling and no
structure-only "skeleton" phase: every (re)index produces the full graph the resolver can
give. As a backstop, a tool that touches a file the watcher hasn't processed yet triggers the
same connected re-index on access.

Files created, deleted or edited while the server was down are invisible to an event-based
watcher, so serve runs a one-shot reconcile at startup: it scans the project, indexes
new files, prunes vanished ones, and refreshes any that changed — then hands off to the
watcher.

Known limitations

  • Connected-set re-link, deep ripples: the watcher re-links the connected set of a
    change (the changed file plus its direct importers and imports), not the entire project. A
    rename that ripples through many indirection layers may need a full reindex for an exact
    graph. Creating a file that an unchanged file already imports is handled — a second
    importer pass re-links that importer once the new file is indexed.
  • Cross-language edges on incremental edits: synthesized COMMUNICATES_WITH edges are
    re-synthesized for every boundary a re-indexed file touches, so a new or moved
    exposer/consumer is linked without a full reindex. A change that leaves a boundary
    entirely (a file that stops exposing an endpoint others still consume) may still need a
    full reindex for an exact cross-language view; the boundary-based query resolves
    connections regardless.

Uninstall

graphlens-mcp remove deregisters the server from your agents; add --purge-db to also
delete the local .graphlens/ cache.

Development```bash

uv sync --all-groups # install lint + test tooling
task check # ruff + format-check + ty + bandit + pytest (the CI gate)
task docs:serve # preview the docs site locally (needs Node + pnpm)
```

See the Architecture and
Semantic search pages on the
documentation site for the design and invariants.

License

MIT — see LICENSE.

常见问题

8 问
答案由本站依据条目字段整理,不引用上游原文
Graphlens Mcp 怎么安装?

在客户端按下面的安装命令接入:uv tool install graphlens-mcp # or: pipx install graphlens-mcp\r。装完在客户端配置里引用同一个包或端点。

Graphlens Mcp 怎么在 Claude、Cursor、Codex 里配置?

它的传输方式是stdio · 本地进程,在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,配置才会生效。

Graphlens Mcp 收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

Graphlens Mcp 需要 API Key 吗?

资料标注需要会话登录认证,使用前准备好对应凭据,并按最小权限配置。

Graphlens Mcp 支持哪些客户端?

资料标注支持 Claude、Cursor、Codex、Zed;其他客户端只要能配置 MCP Server,也能用同样的命令或地址接入。

Graphlens Mcp 能提供哪些能力?

资料显示能力标签包括 ai coding、code analysis、knowledge graph。具体工具清单以官方文档为准。

Graphlens Mcp 需要什么运行环境?

运行时为 Cross-platform;属于本地进程,需要在本机装好运行环境。

Graphlens Mcp 是本地还是远程?

它是本地进程(stdio),由客户端在本机拉起。传输方式为stdio · 本地进程。

热门专题

按标签挑服务器
全部专题 →

服务器信息以作者仓库与官方文档为准;分类、传输方式与鉴权方式的中文说明为中文整理,最近核验 未标注。