Official LSP plugins install with no LSP config — why and how to fix
In Claude Code 2.1.246 and 2.1.288 on macOS arm64, installing official LSP plugins (typescript-lsp, pyright-lsp, swift-lsp, etc.) leaves the cached plugin with no
.lsp.jsonand nolspServersinplugin.json. Claude Code reports "No LSP server available for file type: .ts" or "getAllLspServers returned 0 server(s)". Why is that, and what config change makes them work?Originally asked on GitHub: https://github.com/anthropics/claude-plugins-official/issues/379
5 answers
This is still open. It reproduces through Claude Code 2.1.288 (reported 2026-10-06) and was tested on 2.1.246 (2026-08-26). All 11 official
*-lspplugins are affected.Root cause: the LSP server definitions live only in
.claude-plugin/marketplace.jsonunderlspServers(for example, thegoplsentry at marketplace.json#L916-L923). When Claude Code installs a plugin it copies the plugin directory into the cache, but it does not propagate thatlspServersblock into the installed plugin. Newer installs ship.claude-plugin/plugin.json, but it only containsname/description/version/author, sogetAllLspServersreturns 0 servers.Workaround confirmed in the thread: add
lspServersdirectly to the cached plugin's.claude-plugin/plugin.json. Forswift-lsp, the tested path is~/.claude/plugins/cache/claude-plugins-official/swift-lsp/1.0.0/.claude-plugin/plugin.json, and the tested config is:json{ "name": "swift-lsp", "description": "Swift language server (SourceKit-LSP) for code intelligence", "version": "1.0.0", "author": { "name": "Anthropic", "email": "support@anthropic.com" }, "lspServers": { "sourcekit-lsp": { "command": "sourcekit-lsp", "extensionToLanguage": { ".swift": "swift" } } } }On 2.1.246, a user verified both this
plugin.jsonshape and adding a.lsp.jsonfile at the plugin root work for rust-analyzer, pyright, and typescript. Another reporter found the cachedplugin.jsonis regularly overwritten, so the edit may need to be re-applied. An older suggestion was to setENABLE_LSP_TOOL=1, but a 2.1.286 reporter said that flag was no longer needed. Tracking issue: anthropics/claude-code#15148. The fix PR #378 in claude-plugins-official is closed.Did this work for you?What @lib-cf tried on GitHub (Worked)
Edited the cached swift-lsp plugin's .claude-plugin/plugin.json to add an lspServers object with sourcekit-lsp, and the Swift LSP worked again.
Did this work for you?What @laurigates tried on GitHub (Worked)
On Claude Code 2.1.246, tested both adding lspServers to .claude-plugin/plugin.json and adding a .lsp.json file at the plugin root for rust-analyzer, pyright, and typescript; both shapes registered servers.
Did this work for you?What @JPyke3 tried on GitHub (Didn't work)
Checked several machines after installing official LSP plugins; every cached plugin directory contained only a README and no LSP config, and the problem persisted.
Did this work for you?What @rwalle tried on GitHub (Outcome unclear)
Suggested setting the ENABLE_LSP_TOOL=1 flag, referencing a claude-code issue comment. Not directly confirmed in this thread, and a later 2.1.286 report said the flag was no longer needed.
Did this work for you?
Related questions
- Slack MCP plugin fails to authenticate: "Incompatible auth server: does not support dynamic client registration"
- Claude Code "Failed to parse marketplace file ... plugins.N.source: Invalid input" with claude-plugins-official?
- Claude Code official marketplace fails with 'plugins.56.source: Invalid input'
- Claude Code 2.1.62: Failed to parse marketplace file (plugins.N.source: Invalid input)
- Plugin shows 'Published' on Claude submissions but never appears in the official marketplace