agent-lsp

Blackwell Systems·BlackwellSystems.agent-lsp

MCP server giving AI agents reliable access to language server protocol

agent-lsp is a stateful MCP server over real language servers. It keeps the language server's semantic index warm and adds a skill layer that turns multi-step code operations into single, correct workflows. 50 tools, 30 languages, persistent sessions.

winget install --id BlackwellSystems.agent-lsp --exact --source winget

Latest 0.16.0·July 14, 2026

Release Notes

Fixes a file-corruption bug in rename_symbol (#12, reported by @V0idk), makes speculative confidence honest about still-indexing servers, and upgrades gcf-go to v1.5.0. Fixed

  • rename_symbol file corruption (#12): rename_symbol (non-dry-run) used to return the raw WorkspaceEdit and rely on the caller copying it back into apply_edit — the only edit tool that did so; replace_symbol_body, insert_after_symbol, insert_before_symbol, and safe_delete_symbol all apply server-side. That round-trip corrupted files: under AGENT_LSP_OUTPUT_FORMAT=gcf the edit was GCF-encoded (a summary format that flattens each TextEdit's range into positional path columns like range>end>character and requires the verbatim newText to be copied out of tool output and back into a tool argument), so LLM callers transposed the range offsets and truncated a large newText, overwriting the file. gcf-go itself encodes and decodes these WorkspaceEdits losslessly (verified), so this was an agent-lsp wire-format and round-trip bug, not a gcf-go bug. Reported by @V0idk.

Changed

  • BREAKING: rename_symbol now applies the edit itself and returns a summary instead of returning a WorkspaceEdit for the caller to apply. The result is Renamed to "X" across N location(s) in M file(s): ... plus a post-rename diagnostics count, consistent with the other edit tools — the WorkspaceEdit never leaves the server as data to reconstruct, which eliminates the round-trip that corrupted files (#12). A separate apply_edit call after a non-dry-run rename is no longer needed (or wanted); apply_edit remains for its text-match mode. The dry_run=true preview is unchanged in intent (returns the edit for inspection) but now serializes as self-labeling JSON regardless of AGENT_LSP_OUTPUT_FORMAT, plus file/location counts. The lsp-rename skill's execute phase is updated accordingly.
  • gcf-go upgraded to v1.5.0. Brings nested-null flatten losslessness (a nested object null at an intermediate level, e.g. {meta:{owner:null}}, is no longer silently dropped on round-trip) and deterministic graph edge ordering (edges sorted by source, then target, then type). Generic-profile delta encoding and labeled streaming trailer counts are available as opt-in APIs; agent-lsp does not use them yet, so default output is byte-identical. No API changes required.

Added

  • confidence: "low" for unindexed speculative results. evaluate_session / preview_edit now report confidence: "low" when a clean result (net_delta <= 0) is read while the language server still has active $/progress work (indexing, cache priming, cargo check). Previously such results were reported as confidence: "high", so a still-priming server (notably rust-analyzer) could return a false all-clear — "no errors introduced" when the diagnostics simply had not been computed yet. Results that surface errors (net_delta > 0) are never downgraded, since diagnostics do not appear spuriously. New LSPClient.HasActiveProgress() exposes the signal.

Tests

  • Added a live end-to-end regression (TestRenameSymbol_LiveGopls) that drives a real textDocument/rename through gopls and the full handler, asserting the file is renamed on disk and the tool returns a summary with no raw edit leaked. Skips cleanly when gopls is absent; CI's unit-and-smoke job now installs gopls so it runs there. Added unit coverage for the apply path against the pathological single-big-edit shape from #12 (TestApplyWorkspaceEdit_*), the JSON edit-encoding guard (TestEncodeResultJSON_*), and the rename summary counter (TestSummarizeWorkspaceEdit_*).

Installer type: zip

x6408FAEE74C43B97EE07BF8D284A65DB6DF05C05277AAEC67C36A9DC9DCCB78518
arm64DE3E16493AF780019431F238AA9660DD45BE3707AFD1CB03CCB3C66857E2A998

Details

Homepage
https://github.com/blackwell-systems/agent-lsp
License
MIT
Publisher
Blackwell Systems
Support
https://github.com/blackwell-systems/agent-lsp/issues

Tags

aicode-intelligencedeveloper-toolslanguage-serverlspmcp

Older versions (2)

0.15.2
x6496ED286BAEBF49D89CBC37A5983731F519E6FEC0B1F4715298E3CB6BC8211B71
arm647E127F5D3E0D5723B73BA56BC090053FF848EFBB243C8AD8B5617AB4EE8FBFB7
0.2.1
x64e73ea3f71824ef615026be9bf996cbfb57300b0ef9a7250bfb568a946e12f2e8
arm64486c49c6cce4d1341d04b7788ad334c7be7478184e61967c4473971fbca59ebd