
Locus
io.github.paladini由 GitHub 账号 paladini 发布v0.1.5更新于 Oct 24, 2026
Lightweight MCP server for LSP code intelligence — symbol lookup, refs, types, diagnostics.
概览
Locus 为 AI 编程助手提供基于 LSP 的代码智能:符号查找、引用、类型信息与诊断。
- 可以做什么
- Locus 让 AI 编程助手获得与 IDE 相同的语言服务器智能。它提供六个小工具:locate(按名称查找符号或列出文件中的符号)、refs(某位置的全部引用或实现)、hover(类型信息与文档)、diagnostics(文件或工作区的错误与警告)、status(语言服务器就绪状态与缺失的二进制文件)、rename(重命名的预演预览)。它只读取代码结构与诊断信息,实际修改仍由助手自身的编辑工具完成。
- 适用场景
- 适合助手已经能很好地编辑文件、而你想在其上增加语义导航的场景:找到被重新导出或重载掩盖的真实定义、在重构前列出所有调用方、不靠猜测确认类型、在编辑后立即发现编译器或 linter 错误。它刻意保持精简,不是符号编辑、记忆存储或完整重构工具集。
- 运行要求
- 需要 Node.js 22+,并通过 npx(@paladini/locus-mcp)本地安装。所用语言的语言服务器必须在 PATH 中,例如 TypeScript/JavaScript 需要 typescript-language-server 和 typescript。需在项目目录中执行一次性的 init 与 check 命令,MCP 配置中的 cwd 需设为项目的绝对路径。仅支持桌面端。
安装
在 SourceWeft 中
- 打开 控制台中的 Locus,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
Locus
[npm version] [License: MIT] [Node.js] [CI] [Website]
Locus gives your AI coding agent a map of your codebase. Whether you write code yourself or work through Cursor, Codex, or Claude Code, Locus connects your agent to the same go-to-definition and find-references intelligence your IDE uses — through MCP (Model Context Protocol), a standard plug-in layer for AI tools. Configure it once; your agent uses six small tools to find symbols, trace callers, read types, and catch errors before you run tests.
Why you might want this
- Find the real definition — Your agent can locate
UserService.authenticateeven when it is re-exported, overloaded, or buried in a large file — not just wherever the name appears as text. - See who calls what — Before a refactor, list every reference to a function or class so nothing breaks silently.
- Read types and docs — Ask what a variable or parameter actually is, without guessing from variable names.
- Catch errors early — Surface compiler and linter problems right after an edit, instead of waiting for a full test run.
Who this is for
Locus is for AI-first builders: developers, indie hackers, and PMs who work through an agent and want it to understand code structure, not just search strings.
It fits when your agent already edits files well (Cursor's Edit tool, Claude Code, Codex) and you want to add semantic navigation on top — without turning your setup into a second IDE inside MCP.
It is not for people who want symbolic editing, agent memory, or a full refactoring toolkit inside MCP. For that, look at Serena — a broader option that does more inside the protocol. Locus stays intentionally small: six tools, npx install, complements your host.
Get started in 5 minutes
- Install a language server (if you do not have one yet) — for TypeScript/JavaScript:
npm install -g typescript-language-server typescript. See Installing language servers for Python, Go, and Rust. - Run one-time setup in your project folder:
- Add Locus to your agent's MCP config — MCP is how AI hosts call helper tools like Locus; copy a block from Copy-paste configs below and set
cwdto your project's absolute path. - Reload MCP — restart Cursor, reload Codex, or reopen Claude Code so the new server appears.
- Try a prompt — ask your agent: "Use Locus to find where
UserServiceis defined and list all references." If it calls thelocateandrefstools, you are set.
Requirements: Node.js 22+. Language servers on your PATH for the languages you use.
Copy-paste configs
Your agent host spawns Locus automatically — you never run serve by hand during normal use.
Cursor
Create or edit .cursor/mcp.json in your project (or global Cursor MCP settings):
Codex
Add to ~/.codex/config.toml (global) or .codex/config.toml (project):
For a project-scoped config, you can use cwd = "." instead.
Claude Code
Add to Claude Code MCP settings:
More detail (local dev, troubleshooting): docs/usage.md
Example prompts to try
Paste these into your agent after Locus is configured:
- "Find where
UserServiceis defined. Use Locuslocate, not grep." - "Before we rename
parseConfig, use Locus to list every file that calls it." - "What type does
response.datahave insrc/api/handler.ts? Use Locushover." - "After your edits, run Locus diagnostics on the files you changed and fix any errors."
- "Check Locus
status— are the language servers ready?"
What Locus does NOT do
- Edit your code — Your agent's Edit/Write tools still apply changes. Locus only reads structure and diagnostics.
- Replace grep — Grep is still best for log lines, config keys, comments, and plain text search.
- Remember things between sessions — No agent memory store; each session starts fresh.
- Run refactors for you —
renamepreviews impact; your agent applies the actual edits. - Expose every LSP feature — Six focused tools only, not a full IDE protocol passthrough.
- Compete with large toolkits — If you need symbolic body replacement, memory, and 40+ languages in one MCP stack, consider Serena instead.
Tools at a glance
Learn more
License
来源:README.md,提交 d515807
工具
0版本历史
1- v0.1.5最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分