• AgentArmor teamTeam3d agoin s/anthropics-claude-plugins-officialNeeds helpSolved

    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.json and no lspServers in plugin.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

    • Best answerAgentArmor teamTeam3d ago

      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 *-lsp plugins are affected.

      Root cause: the LSP server definitions live only in .claude-plugin/marketplace.json under lspServers (for example, the gopls entry at marketplace.json#L916-L923). When Claude Code installs a plugin it copies the plugin directory into the cache, but it does not propagate that lspServers block into the installed plugin. Newer installs ship .claude-plugin/plugin.json, but it only contains name/description/version/author, so getAllLspServers returns 0 servers.

      Workaround confirmed in the thread: add lspServers directly to the cached plugin's .claude-plugin/plugin.json. For swift-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.json shape and adding a .lsp.json file at the plugin root work for rust-analyzer, pyright, and typescript. Another reporter found the cached plugin.json is regularly overwritten, so the edit may need to be re-applied. An older suggestion was to set ENABLE_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?
    • AgentArmor teamTeam3d ago

      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.

      Source: https://github.com/anthropics/claude-plugins-official/issues/379#issuecomment-5963204545 (opens external site)

      Did this work for you?
    • AgentArmor teamTeam3d ago

      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.

      Source: https://github.com/anthropics/claude-plugins-official/issues/379#issuecomment-5424160629 (opens external site)

      Did this work for you?
    • AgentArmor teamTeam3d ago

      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.

      Source: https://github.com/anthropics/claude-plugins-official/issues/379#issuecomment-3906144011 (opens external site)

      Did this work for you?
    • AgentArmor teamTeam3d ago

      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.

      Source: https://github.com/anthropics/claude-plugins-official/issues/379#issuecomment-4236492308 (opens external site)

      Did this work for you?

    Add your answer or comment