Astrolabe AI
Astrolabe AI is a local MCP server that gives Claude Code, Cursor and Codex fast code search, symbol lookup and reference navigation, with directory-level counts for questions like "how many call sites per module".
It is a single Rust binary (astrolabe) that indexes your repo with tree-sitter and starts language servers on demand.
简体中文 · Install guide · FAQ · Benchmark harness · Changelog
Not to be confused with the npm packages astrolabe (a 2014 Protractor page-object library) and astrolabe-ai (an unrelated resume tool), or other MCP servers named "astrolabe". This project lives at github.com/wojiushirencai/Astrolabe; the binary is astrolabe.
Fact card (as of 2026-11-01)
| |
|---|
| Latest release | v0.18.1, published 2026-11-30 |
| What it exposes | 7 MCP tools (short names): resolve_contx, search_code, find_symbol, find_refs, goto_def, get_diag, get_lang (legacy long names still work as aliases) |
tools/list size | about 3.6 KB compact JSON (3,607 B measured on Linux for v0.16.0; not re-measured on macOS) |
| Binary | one executable, no runtime; release archives are 7.4–9.1 MB, the unpacked Linux x64 binary is about 50 MB |
| Platforms | macOS arm64/x64, Linux x64 (glibc/musl), Linux arm64, Windows x64 |
| Languages | 18 matrix rows incl. Python, Go, Rust, Java, TypeScript/JavaScript, C/C++, Swift, Objective-C, PHP, Vue, Dart, C#, VB.NET, Kotlin, Shell, Ruby, Lua, Protobuf |
| Needs an API key / network? | No. Indexing and search do not call an LLM. (The model that reads the results still spends tokens.) |
| Clients documented | Claude Code, Cursor, Codex, Windsurf/Cline/Roo Code/Continue, OpenCode, DeepSeek Harness, Codebuddy, Grok Build, Kimi Code, ZCode |
| License | MIT OR Apache-2.0 |
| Tests | cargo test --workspace -- --list lists 1,117 test cases (2026-10-18) |
Windows stability (v0.17.4–v0.17.5)
Recent releases focused on Windows reliability after real machine testing:
\\?\ path normalize (#117): canonicalize on Windows often yields \\?\C:\…. Astrolabe now treats that as the same path as plain C:\… for watcher membership and comparisons, and strips \\?\ in status / error text.
- Subdir
index_root reuse (#117): pointing index_root at a subdirectory of an already-Ready repo reuses the parent index with a path filter instead of starting a second cold build (no more stuck Index is building… for that case).
path_filter on Windows (#119): backslashes, .\…, and absolute C:\repo\… filters normalize to repo-relative / paths so search / symbol / context hits match.
Prefer omitting index_root, or pass the repo root. If a brand-new root is still Building, retry shortly.
Quick start (3 steps)
1. Install the binary (pick one):
# macOS / Linux (verifies the release sha256)
curl -fsSL https://raw.githubusercontent.com/wojiushirencai/Astrolabe/main/install.sh | sh
# or npm (downloads the native binary for your platform)
npm i -g @zlnap/astrolabe
# / Windows (PowerShell): npm i -g @zlnap/astrolabe
Other ways (manual download, Windows zip, build from source): docs/INSTALL_GUIDE.md.
2. Required — run setup (writes MCP config).
Installing the binary alone does not wire clients; without setup, clients cannot call Astrolabe's MCP tools. Upgrading from an older version? Re-running astrolabe setup (or astrolabe setup --remove-hooks) automatically cleans up legacy Astrolabe hooks while keeping your other third-party hooks.
# recommended (npm / npx)
npx -y @zlnap/astrolabe setup
# after a global npm install / PATH binary:
astrolabe setup
# non-interactive: configure every detected client
npx -y @zlnap/astrolabe setup --yes
Claude Code (manual MCP only, still prefer setup above):
claude mcp add --scope user astrolabe -- npx -y @zlnap/astrolabe . --context=claude-code
Cursor (.cursor/mcp.json): {"mcpServers":{"astrolabe":{"command":"astrolabe","args":[".","--context=cursor"]}}}.
Codex, Windsurf, OpenCode, DSH, Codebuddy, Grok, Kimi, ZCode and others: docs/INSTALL_GUIDE.md. Flags: --yes, --clients=…, --dry-run, --native, --list, --remove-hooks, --no-cursor-permissions.
3. Verify. astrolabe --version prints the version; in your client, ask it to call get_lang or search_code. Restart the client session after setup.
The seven tools
tools/list advertises short names. Legacy long names (resolve_context, find_references, goto_definition, get_diagnostics, get_languages) and older ast_* aliases are still accepted on tools/call.