Locus

io.github.paladini由 GitHub 帳號 paladini 發布v0.1.5更新於 Oct 24, 2026

Lightweight MCP server for LSP code intelligence — symbol lookup, refs, types, diagnostics.

已驗證STDIO僅桌面開發者工具

概覽

AI 產生的概覽

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 需設為專案的絕對路徑。僅支援桌面端。
安裝前請注意
Locus 只讀取結構與診斷,不會修改程式碼;rename 僅為預覽,實際修改由助理執行。它不會在 session 之間保留記憶,也不能取代純文字 grep。它由助理主機以本機程序方式啟動,因此可讀取所指向的專案檔案。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Locus,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

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.authenticate even 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

  1. 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.
  2. Run one-time setup in your project folder:
    bash
    npx @paladini/locus-mcp initnpx @paladini/locus-mcp check
  3. 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 cwd to your project's absolute path.
  4. Reload MCP — restart Cursor, reload Codex, or reopen Claude Code so the new server appears.
  5. Try a prompt — ask your agent: "Use Locus to find where UserService is defined and list all references." If it calls the locate and refs tools, 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):

json
{  "mcpServers": {    "locus": {      "command": "npx",      "args": ["-y", "@paladini/locus-mcp", "serve"],      "cwd": "/absolute/path/to/your/project"    }  }}

Codex

Add to ~/.codex/config.toml (global) or .codex/config.toml (project):

toml
[mcp_servers.locus]command = "npx"args = ["-y", "@paladini/locus-mcp", "serve"]cwd = "/absolute/path/to/your/project"

For a project-scoped config, you can use cwd = "." instead.

Claude Code

Add to Claude Code MCP settings:

json
{  "mcpServers": {    "locus": {      "command": "npx",      "args": ["-y", "@paladini/locus-mcp", "serve"],      "cwd": "/absolute/path/to/your/project"    }  }}

More detail (local dev, troubleshooting): docs/usage.md

Example prompts to try

Paste these into your agent after Locus is configured:

  • "Find where UserService is defined. Use Locus locate, not grep."
  • "Before we rename parseConfig, use Locus to list every file that calls it."
  • "What type does response.data have in src/api/handler.ts? Use Locus hover."
  • "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 — rename previews 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

ToolWhat it does
locateFind a symbol by name or list symbols in a file
refsAll references or implementations at a position
hoverType information and documentation
diagnosticsFile or workspace errors and warnings
statusLanguage-server readiness and missing binaries
renamePreview a rename (dry-run; apply via your agent)

Learn more

GuideDescription
Usage guideStep-by-step setup, workflows, troubleshooting
Getting startedFirst-time setup — no LSP knowledge required
FAQDo I need to be a programmer? What's MCP?
Who is Locus for?Fit, scope, and when to pick alternatives
ComparisonLocus vs Serena, bridges, and grep
Tools referenceAll six MCP tools with examples
Configurationlocus.toml, locus.json, language servers
WebsiteLightweight positioning and quick overview

License

MIT

來源:README.md,提交 d515807

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.5最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分