Theodolite logo

Theodolite

Runs pinned language-server sessions as bounded MCP tools for deterministic, editor-free code intelligence.

Install Theodolite

Run the project’s own setup commands, in order.

Setup steps from the project

Theodolite installs with its own steps rather than a config we can generate, so these are copied as-is. Follow them in order and run the commands in a terminal. Source: github.com

  1. 1. Install
    cargo build --release
    
  2. 2. Start the server
    ./target/release/theodolite --config bridge.toml
    

Overview

Theodolite MCP server connects MCP clients to pinned language-server processes without relying on an open editor. It exposes bounded read tools for diagnostics, navigation, symbols, hover information, code-action listings, and rename previews over stdio using NDJSON JSON-RPC. Sessions are keyed by workspace and server, use explicit readiness checks, and can be restarted explicitly after failure. Optional content-editing tools are available only through a configured client allowlist and mutation gate.

Use cases

  • Run language checks in headless worker jobs
  • Query definitions and references without opening an editor
  • Inspect symbols and hover information in sandbox agents
  • Preview refactors before allowing gated file writes

Key features

  • Pinned language-server sessions
  • Bounded navigation and diagnostics tools
  • Deterministic readiness and result ordering
  • Supervised process-tree shutdown
  • Optional allowlisted mutation tools
  • Typed errors and size limits

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

9/9 checks healthy over the last 33d

How Theodolite works

What Theodolite does

Theodolite provides an editor-free bridge between MCP clients and language servers. It owns language-server sessions for a workspace, keeps the server binaries and configuration pinned, and exposes a closed set of MCP tools for code intelligence. The supported server configurations include bacon-ls for diagnostics, rust-analyzer for Rust semantics, lua-language-server, and serve-d for D projects.

The read surface includes session status, diagnostics, hover, definition, declaration, type definition, implementation, references, document symbols, workspace symbols, code-action listings, rename previews, and session restart. Code actions are listed without returning their edit payloads, while rename previews calculate an edit set without writing files. There is no unrestricted LSP-method passthrough, formatting tool, generic file editor, or command-execution passthrough.

How it works

The bridge communicates with its MCP host over stdio using NDJSON JSON-RPC. It starts language-server children from configured absolute paths and maintains one supervised session for each workspace/server pair, with a maximum of four sessions. A failed session is not silently recreated; callers use session_restart to request a new one.

Readiness is based on the LSP initialization exchange and a server-specific condition rather than a fixed delay. For example, rust-analyzer must finish observed loading activity and answer a probe. Results are canonically ordered and byte-bounded. Oversized responses produce a typed error with the actual item count instead of being silently truncated, and failures use stable typed error codes.

Child processes run under supervisors that own the server process tree. Shutdown attempts the LSP shutdown and exit sequence before escalating through the supervisor, while server death causes the rest of that tree to be terminated. This process ownership also covers leaked descendants.

Setup and configuration

Build the release binary with Cargo, then start it with a TOML configuration file:

sh
cargo build --release
./target/release/theodolite --config bridge.toml

Use bridge.toml.example as the configuration shape. Configure real absolute binary paths and pin the exact output expected from each server's --version probe on the target machine. The bridge rejects invalid configuration rather than starting with an ambiguous setup.

Language-server entries are configuration data, not compiled-in server implementations. A serve-d entry uses plain stdio, requires no arguments, and needs a PATH containing dub and dcd-server; its readiness condition waits for the first successful workspace-file response. Its project activation can initially return the same empty result that a direct LSP client would receive during activation.

Tools and capabilities

  • Query diagnostics with push results merged with pull diagnostics when the language server supports both, including channel provenance.
  • Navigate through definitions, declarations, type definitions, implementations, and references.
  • Inspect hover text and document or workspace symbol indexes.
  • Preview renames and list code actions without applying their edits.
  • Inspect session state and restart a dead session explicitly.
  • Optionally apply code actions or renames under the mutation gate.

Mutation is off by default. The gated mode requires a non-empty allowlist of MCP client names. When enabled for an allowlisted handshake identity, code_action_apply and rename_apply become available. Applications validate workspace boundaries, file state, UTF-8, ranges, overlaps, and version hashes before writing; writes are atomic per file and touched files are re-synchronized. File creation, deletion, and renaming are refused.

Limitations and notes

The server is intentionally a bounded read-oriented surface. It cannot execute arbitrary LSP methods, format files, run workspace commands, or honor server-pushed workspace/applyEdit requests. Sessions are limited to four workspace/server pairs, and a dead session remains dead until session_restart is used.

Mutation authorization is routing metadata from the MCP handshake, not an authentication mechanism. Apply handles are single-use and tied to a session and document versions; forged, reused, cross-session, or stale handles are denied. Rename application recomputes the operation and refuses the entire write if any tracked document changed.

serve-d installations need attention to the binary's runtime dependencies. The packaged binary referenced by the project may require a different LDC shared-library pair than the host provides, so a compatible source-built binary and matching PATH may be necessary.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Theodolite

Theodolite is an MCP server that connects editor-free agents to pinned language-server sessions. Its main tools provide diagnostics, hover text, definitions, declarations, type definitions, implementations, references, symbols, code-action listings, rename previews, session status, and controlled session restarts.

Build Theodolite with Cargo and launch the release binary with a TOML configuration file. Run `cargo build --release`, then start `./target/release/theodolite --config bridge.toml`. Configure absolute language-server paths and expected version-probe output for the target machine.

Theodolite includes configuration entries for bacon-ls, rust-analyzer, lua-language-server, and serve-d. These servers are selected through configuration data. serve-d uses DCD through its normal language-server setup and needs `dub` and `dcd-server` available in PATH.

Theodolite modifies files only when mutation is configured as gated and the connecting MCP client is on the configured allowlist. In that mode, `code_action_apply` and `rename_apply` can write file contents after validation. Mutation is off by default, and file creation, deletion, and renaming are refused.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewTheodolite AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/theodolite?style=directory)](https://allmcps.com/mcp/theodolite)
HTML Embed
<a href="https://allmcps.com/mcp/theodolite"><img src="https://allmcps.com/api/badge/theodolite?style=directory" alt="Theodolite on AllMCPs" /></a>