
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 分