[BUG] LSP plugins not recognized - "No LSP server available" despite correct configuration
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
LSP plugins configured following the official documentation are not recognized by Claude Code. The LSP tool returns "No LSP server available for file type: .py" and "No LSP server available for file type: .ts" despite:
- Plugins being correctly structured with
.lsp.jsonat the plugin root - Plugins registered in
installed_plugins.json - Plugins enabled in
settings.json - Language server binaries installed and in PATH
- Multiple Claude Code restarts after configuration
This appears to be a fundamental issue where Claude Code's plugin system does not load or recognize LSP configurations from plugins.
What Should Happen?
When LSP plugins are correctly configured and enabled:
- Claude Code should start the language servers on startup
- The LSP tool should recognize file types and provide code intelligence
- Operations like
documentSymbol,hover,goToDefinitionshould work
Error Messages/Logs
**LSP Tool Output:**
No LSP server available for file type: .py
No LSP server available for file type: .ts
**No LSP-specific logs found in `~/.claude/debug/`** - there is no feedback about LSP server startup success/failure.
Steps to Reproduce
1. System Info
- Claude Code version: 2.0.74
- macOS Darwin 25.1.0
- typescript-language-server: 5.1.3 (
/opt/homebrew/bin/typescript-language-server) - pyright: 1.1.407 (
/opt/homebrew/bin/pyright-langserver)
2. Create Plugin Directory Structure
~/.claude/plugins/cache/claude-plugins-official/
├── pyright-lsp/1.0.0/
│ ├── .claude-plugin/
│ │ └── plugin.json
│ ├── .lsp.json
│ └── README.md
└── typescript-lsp/1.0.0/
├── .claude-plugin/
│ └── plugin.json
├── .lsp.json
└── README.md
3. Plugin Configuration Files
pyright-lsp/1.0.0/.claude-plugin/plugin.json:
{
"name": "pyright-lsp",
"version": "1.0.0",
"description": "Python language server (Pyright) for Claude Code",
"lspServers": {
"python": {
"command": "pyright-langserver",
"args": ["--stdio"],
"extensionToLanguage": {
".py": "python",
".pyi": "python"
}
}
}
}
pyright-lsp/1.0.0/.lsp.json:
{
"pyright": {
"command": "pyright-langserver",
"args": ["--stdio"],
"extensionToLanguage": {
".py": "python",
".pyi": "python"
}
}
}
typescript-lsp/1.0.0/.claude-plugin/plugin.json:
{
"name": "typescript-lsp",
"version": "1.0.0",
"description": "TypeScript/JavaScript language server for Claude Code",
"lspServers": {
"typescript": {
"command": "typescript-language-server",
"args": ["--stdio"],
"extensionToLanguage": {
".ts": "typescript",
".tsx": "typescriptreact",
".js": "javascript",
".jsx": "javascriptreact",
".mts": "typescript",
".cts": "typescript",
".mjs": "javascript",
".cjs": "javascript"
}
}
}
}
typescript-lsp/1.0.0/.lsp.json:
{
"typescript": {
"command": "typescript-language-server",
"args": ["--stdio"],
"extensionToLanguage": {
".ts": "typescript",
".tsx": "typescriptreact",
".js": "javascript",
".jsx": "javascriptreact",
".mts": "typescript",
".cts": "typescript",
".mjs": "javascript",
".cjs": "javascript"
}
}
}
4. Register Plugins
~/.claude/plugins/installed_plugins.json:
{
"version": 2,
"plugins": {
"pyright-lsp@claude-plugins-official": [
{
"scope": "user",
"installPath": "/Users/user/.claude/plugins/cache/claude-plugins-official/pyright-lsp/1.0.0",
"version": "1.0.0",
"installedAt": "2025-12-19T23:00:16.582Z",
"lastUpdated": "2025-12-19T23:00:16.582Z",
"isLocal": true
}
],
"typescript-lsp@claude-plugins-official": [
{
"scope": "user",
"installPath": "/Users/user/.claude/plugins/cache/claude-plugins-official/typescript-lsp/1.0.0",
"version": "1.0.0",
"installedAt": "2025-12-19T23:00:41.785Z",
"lastUpdated": "2025-12-19T23:00:41.785Z",
"isLocal": true
}
]
}
}
5. Enable Plugins
~/.claude/settings.json (relevant section):
{
"enabledPlugins": {
"pyright-lsp@claude-plugins-official": true,
"typescript-lsp@claude-plugins-official": true
}
}
6. Restart Claude Code and Test
# Restart Claude Code
claude
# Test LSP on a Python file
# LSP tool with operation: documentSymbol, filePath: /path/to/test.py
# Result: "No LSP server available for file type: .py"
# Test LSP on a TypeScript file
# LSP tool with operation: documentSymbol, filePath: /path/to/test.ts
# Result: "No LSP server available for file type: .ts"
Claude Model
None
Is this a regression?
I don't know
Last Working Version
2.0.74
Claude Code Version
2.0.74
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
Community Workaround
The community has developed a workaround via the Piebald-AI/claude-code-lsps repository, which requires patching Claude Code using npx tweakcc --apply. The repository description states:
"LSP support in Claude Code is pretty raw still. There are bugs in the different LSP operations, no documentation, and no UI indication that your LSP servers are started/running/have errors or even exist."
This suggests the native LSP plugin loading mechanism has unresolved issues.
Missing Feedback
There is no indication in Claude Code about:
- Whether LSP plugins were detected
- Whether LSP servers started successfully
- Any errors during LSP server initialization
Running with --enable-lsp-logging produces no LSP-specific output.
Expected vs Actual Behavior
| Expectation | Reality |
|-------------|---------|
| Plugin system reads .lsp.json | No evidence of recognition |
| LSP servers start on startup | No servers started |
| LSP tool finds available servers | Returns "No LSP server available" |
| Debug logging shows LSP status | No LSP-related debug output |
Requested Fix
- Make the plugin system actually load and start LSP servers from
.lsp.jsonconfigurations - Add logging/feedback when LSP servers start or fail to start
- Document the correct plugin structure for LSP servers
- Consider adding
/lspstatus command to show configured servers
73 Comments
Found 1 possible duplicate issue:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Follow-up: Found a potentially related issue that might explain this behavior.
#13952 reports a race condition where the LSP Manager initializes and completes with 0 servers before plugins have finished loading. Debug logs in that issue show:
The LSP Manager finishes 52ms before plugins load, so it never sees the LSP configurations.
That issue identifies this as a regression:
This would explain why my configuration appears correct but LSP servers are never recognized. I haven't tested the 2.0.67 downgrade workaround yet, but if confirmed, this issue may be a duplicate of #13952.
Same issue here with Swift LSP (
swift-lsp@claude-plugins-official).sourcekit-lspbinary exists and is executableStill returns:
No LSP server available for file type: .swiftThe race condition identified in #13952 (LSP Manager initializes before plugins load) appears to be the root cause.
Same issue with the gopls LSP installed.
example output in cc (when asking to demonstrate LSP functionalities...)
same issue for rust:
sure would be nice to have this working!
My case looks almost like a duplicate of this. I tried the Rust plugin. But in my case not only did it not seem to recognize LSPs, it didn't even make the LSP tool available. I was able to hack it via ENABLE_LSP_TOOL env var (undocumented) which got me as far as the tool, then hit this issue.
rust-analyzeris on the path etc, in fact Claude successfully invoked it itself via the bash tool without issue as part of debugging the setup.I am weakly assuming that in some case very similar to this Claude Code doesn't expose the LSP tool if there are no LSP servers, and that since there are no LSP servers, I don't even get the tool. But maybe that's not the case. I'll open another issue if this one doesn't resolve my problem.
Confirming this issue on v2.0.75 (Opus 4.5).
Affected LSP plugins (all installed from official marketplace):
Behavior: All plugins show as "Installed" and "Enabled" in
/plugin, but any LSP operation returns:Environment:
ENABLE_LSP_TOOL=1is set in settings.jsonWorkaround attempted: Created a custom terraform-lsp plugin/marketplace (vnz/terraform-lsp-claude-code) - same result. Plugin installs correctly but LSP never activates.
Would appreciate a fix or workaround. Happy to provide debug logs if needed.
Same issue here.
same issue with clangd-lsp
Same issue with gopls-lsp
Same issue for swift-lsp
Follow-up: LSP Plugin Race Condition Confirmed via Version Comparison
Related Issues: #14803, #13952
---
TL;DR
I've confirmed the race condition hypothesis from #13952. Version 2.0.67 works correctly; 2.0.76 is broken. The LSP Manager now completes initialization before plugins load, causing it to register 0 servers.
---
Investigation Methodology
Testing Multiple Versions Without Reinstalling
I discovered that
npxallows running any Claude Code version without affecting the global installation:This approach:
~/.npm/_npx/Version Matrix Tested
| Method | Version | LSP Status |
|--------|---------|------------|
| Global npm | 2.0.76 | Broken (0 servers) |
| npx | 2.0.67 | Working (3 servers) |
---
Debug Log Comparison
Capturing Debug Logs
Claude Code writes debug logs to
~/.claude/debug/<session-id>.txt. After running both versions, I compared the LSP/plugin initialization sequences.Version 2.0.67 — WORKING
Key observation:
getAllLspServers()blocks and waits for plugins to load, then returns 3 servers.Version 2.0.76 — BROKEN
Key observation: LSP Manager completes with 0 servers at
03:19:54.709Z, then plugins start loading at03:19:54.710Z— 1ms too late.---
Root Cause Analysis
The Race Condition
| Event | v2.0.67 | v2.0.76 |
|-------|---------|---------|
| LSP Manager init starts | T+0ms | T+0ms |
|
getAllLspServers()called | T+0ms | — || Plugins load | T+5ms | T+6ms |
| LSP servers registered | T+186ms | Never |
| LSP Manager completes | T+186ms (3 servers) | T+5ms (0 servers) |
What Changed
Between 2.0.67 and 2.0.69+, the LSP Manager initialization was refactored to be async and non-blocking. This appears to be a performance optimization that inadvertently broke the dependency chain:
Before (2.0.67):
After (2.0.76):
Why This Wasn't Caught
---
Verification Steps
Anyone can reproduce this:
---
Recommended Fixes
Option 1: Restore Blocking Behavior (Quick Fix)
Revert
initializeLspServerManager()to block untilgetAllLspServers()completes, which in turn waits for plugins to load.Option 2: Lazy Server Registration (Better)
Keep async init but register servers lazily when first requested:
Option 3: Event-Driven Registration (Best)
Plugins emit an event when LSP servers are available; LSP Manager subscribes:
---
Workarounds for Users
Workaround 1: Pin to 2.0.67
Downside: Miss out on new features and fixes.
Workaround 2: Use npx Aliases
Add to
~/.zshrcor~/.bashrc:Use
claude-lspwhen you need LSP functionality.Workaround 3: Community Patch
The Piebald-AI/claude-code-lsps repo patches the initialization order:
---
Summary
| Finding | Detail |
|---------|--------|
| Confirmed regression | 2.0.67 → 2.0.69+ |
| Root cause | Async LSP Manager init completes before plugins load |
| Evidence | Debug logs show 0 servers registered, plugins load 1ms later |
| Affected versions | 2.0.69, 2.0.71, 2.0.72, 2.0.73, 2.0.74, 2.0.75, 2.0.76 |
| Last working version | 2.0.67 |
| Workaround |
npx @anthropic-ai/claude-code@2.0.67|This confirms #13952 and should likely be marked as a duplicate. The fix should prioritize restoring the initialization order dependency.
---
Test Environment:
Savme issue with Java
LSP(operation: "findReferences", file: "src/main/java/app/voluntarix/event/domain/EventRepository.java", position: 37:20)
⎿ No LSP server available for file type: .java
Really?
As mentioned multiple times, downgrading to 2.0.67 works fine.
Same issue on 2.0.76 with typescript lsp server
This is working on 2.0.73 as well
<img width="1263" height="1062" alt="Image" src="https://github.com/user-attachments/assets/7de3111e-96cb-4d1a-93fb-9a25842de867" />
Fix incoming
@ravshansbox, no, it is some confused mix. It was just the
Searchtool, because theLSPtool was disabled for the Claude Code. The LSP must looks, for exampleLSP(operation: "documentSymbol", file: "hello.js"). You can compare:got the same issue , version 2.0.76
@bcherny , when will the fix be released?
@bcherny not working on 2.0.76 (windows) - haven't tried wsl
Same on Ubuntu 22.04 and vs code cli and extention
The last release of the cli was released 3 days ago, how this feature is supposed to be available you think?
Also do note that the example comment above by abicorios showing it working is using that undocumented env var (well undocumented as far as I know).
Claude Code v2.0.76 still can't work lsp searching
i'm also still experiencing this issue; it doesn't appear to be fixed
1) "Me too" does not contribute to a solution
2) Think a bit about subscribed users before posting, do not be an a$$h0le
apologies; you're right. i didn't mean to disrupt
i did spend some more time with claude to see if i could get it patched for 2.0.76 (same as the person earlier in the thread got it working for 2.0.74), and i think i got a working script. running this script fixes lsps for me. i hope it works for others, or helps in any debugging, but apologies if it's just more noise 😓
Thanks, I can finally run the LSP now.
@Zamua — Thanks for that patch. Commenting so that others know they should try it too.
(Actually, CC applied it for me using a perl script it created, but it discovered how to fix using your script.)
Why is this closed? It is still not working out of box. Script is not fixing this bug for native installation.
@msokolnickiitt are you referring to the script i made to patch cc? if so, can you comment on the gist with your script output and claude version and path and other details you think may be important, and i can help you debug further over there?
Still broken in 2.0.76 - Elixir LSP case with debug log evidence
Environment:
ENABLE_LSP_TOOL=1set in environmentPlugin:
elixir-lsp@claude-code-elixirv1.0.0 (from georgeguimaraes/claude-code-elixir)elixir-lsv0.30.0 installed at/usr/local/bin/elixir-lsand working (verified via direct execution)Plugin config (correctly structured):
Debug log (
~/.claude/debug/latest) shows plugin loads but NO LSP registration:What's missing: No subsequent log entries for:
Result:
---
Note on
typescript-lsp@claude-plugins-official: This plugin only contains a README.md with installation instructions - it has nolspServersconfiguration in plugin.json, so it's not a functional LSP plugin.The race condition identified in the earlier detailed analysis by @coygeek is confirmed - plugins load but LSP servers are never registered because LSP Manager completes before plugins finish loading.
Waiting for the fix mentioned by @bcherny - is there an ETA or a tracking PR?
Update on Zamua's patch for v2.0.76:
I tested the patch from @Zamua's gist (https://gist.github.com/Zamua/fd91ca5e05eac8a2efeeb15d8ac44f30) on v2.0.76 and it doesn't work.
Why the patch fails:
async function G(){return}async function Z()async function G(){}functions in the minified code_P,jk,i52, etc.)Debug log after "patched" restart still shows:
Conclusion:
The minified function names change between versions, making patches unreliable. The race condition fix needs to come from an official release. Any ETA on the fix mentioned by @bcherny on Dec 24?
Chill out, its the holidays. Jesus Christ.
@mkreyman do you mind trying out the latest version of the gist? it's updated to parse the AST (no longer committing the sin of parsing a context-free grammar with regex lol), so hopefully now more resilient to minute differences in the minified js. if you have issues with it, please comment on the gist, and i can iterate with you there
Hi, I have native version:
Diagnostics
└ Currently running: native (2.0.76)
so this file: cli.js not exist
I see there are several other issues related to this problem, like the one mentioned in your fix (https://github.com/anthropics/claude-code/issues/13952
), so maybe it will be fixed eventually. It’s not critical, but it sounds promising. 🙂
@msokolnickiitt please comment on the gist and i can help further 🙏
@Zamua big thanks for the script! Wasted so much time trying to get LSP working. I wish I found this earlier.
Something a few might run into when trying to run the patch. I previously installed claude-code with bun so the gist wasnt working for me to start with. Just something to keep in mind while we wait for an official fix.
same issue and the downgrade didnt work well to me
win11
I am facing same issue with Windows 11.
| Claude Code version | ✅ 2.0.76 (>= 2.0.74 required) |
| Plugins installed | ✅ omnisharp + vtsls |
| Plugins enabled | ✅ In settings.json |
| OmniSharp binary | ✅ C:\ProgramData\chocolatey\bin\OmniSharp.exe |
| vtsls binary | ✅ C:\Users\ashfa\AppData\Roaming\npm\vtsls (v0.3.0) |
| Binaries in PATH | ✅ Both found via which |
| Restarted Claude Code | ✅ Multiple times |
| LSP Tool Working | ❌ "No LSP server available" |
I'm still facing this same issue, is there a fix since this Bug is closed?
Same issue here, marked.
I'm worry about , there were some Workarounds ways maybe waste more time.
Same for me
No LSP server available for file type: .pypyright installed and pyright-lsp plugin installed in claude.
@ravshansbox why are you making as thumbs down? what do you know that none of us know here about this issue?
@AshfaqGul because "me too" comments do not contribute to the solution in any way, why do not you just thumbs up the ticket? Furthermore, you are just disturbing everyone who has subscribed to the issue
who knows what's in your head with thumbs down. It confused everyone like if this issue does not apply here. This is good people can give more context to the issue. nothing wrong with that.
I'll second @AshfaqGul comment. The issue is closed and if there's is another solution or ticket that we can follow let us know please 🙏 Otherwise, it helps to see others have the same issue and that there's interest in having it resolved. Currently, it's unclear what is happening and a thumbs up doesn't tell me who else is having an issue or when they identified it.
The latest version of Claude Code, 2.0.76, was released on December 22nd. This issue was closed a few days later, so the fix hasn't been released yet. It seems that Anthropic closes issues when they are fixed in the codebase rather than when released, which is typical of Github projects, though they are usually open source so you can build yourself. Hopefully they will consider open sourcing Claude Code in 2026.
Aside, "me too" comments along with meta comments discouraging people from making "me too" comments have similar value, both meta commentary or emotional venting don't add a lot of value and generate similar amounts of noise. It's best to unsubscribe if it's becoming bothersome and wait for the next release.
Sorry for the double post but I just learned that there is a prerelease of 2.1.0 on npm published a few hours ago. I just tried it and it seemed to work for me using a custom plugin/LSP I built. If you are eager to try it, you can use
npx @anthropic-ai/claude-code@2.1.0to check and see if it works for you now.https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md now on changelog as well
This issue was fixed for me as soon as I accepted the in-app suggestion to install the LSP server for my language. My theory is that they came back from holiday and fixed this one on the first day back, including the new prompt inside the app to get users to use it. (Easy to confirm by a bit of digging, but since it works for me, no need).
Works like a charm with the new v2.1.0!
Latest changelog (v2.1.0) shows these LSP related fixes:
Was LSP removed in 2.1.1?
Works for me on v2.1.0 and v2.1.1 with Go code. I have trouble with C++ LSP (clangd-lsp) without an additional patch (#16729) but that's different than this issue.
Works now.
Here's a gist I created about how to setup, verify, etc.
Thanks for the guide! However, it didn't work for me on v2.1.1.
Followed all the steps for pyright and typescript-language-server.
/pluginshows ◉,which <binary-name>verified, and claude code restarted, but LSP is not being used (search tool instead)All binaries are installed via npm -g install.
All plugins are installed at the user scope (~/.claude/settings.json)
Try to enable debug loggings and is stuck at
error: unknown option '--enable-lsp-logging'🥲I just tried v2.1.1 and it doesn't work.
Same for golang and any other LSP plugin I install - CC does not recognize any.
@nazmulidris, @xobotyi, you can read the readme files from the plugin folders https://github.com/anthropics/claude-plugins-official/tree/main/plugins, just need some additional installs, and rerun the Claude Code. It is working for me, PHP and Typescript. You can also run
/doctorcommand into the Claude Code, and copy and past the output to the Claude Code, to help with install.@abicorios everything is there, doctor does not complaint on anything, though, CC aint even aware of LSP capabilities.
UPD1: And just for tests - installed serena plugin, everything works through serena's LSP capabilities now =\ (i understand that serena is 3rd party plugin and not an mcp at all but it recognis gopls and everything works through it)
Fixed on last update
I added
ENABLE_LSP_TOOL=1and launched claude. And the built in LSP tool seems to be working.Here's the prompt transcript w/ claude:
I also had to install these LSP servers separately:
rust-analyzerusing cargorustup component add rust-analyzertypescript lsp serverusing npmnpm install -g typescript-language-server typescript@nazmulidris not working for me; this issue should be re-opened
<img width="708" height="336" alt="Image" src="https://github.com/user-attachments/assets/b74c5ce8-a9a8-4cf2-9c65-9a6deafc6987" />
@evgenyfadeev can you update the marketplace?
Me being stooopid... kinda.
I was expecting the feature to be broadly available, since CC offered to install respective plugins and LSPs. And now, as @nazmulidris pointed - it is under the flag...
After setting env variable everything turned out to be working..
Indeed "updating the marketplace" helped! Hope this is documented, I had no idea that I need to do this. Thanks!
Given that built in LSP tool works, is there a need to have the serena plugin as well? This is assuming that the built in LSP tool has adequate coverage of the languages used.
Problem
It seems like the
startupTimeoutin the marketplace is the root cause for the LSP that could not be loaded. For LSPs that do not have thestartupTimeout, such as pyright, it works, but for jdtls, which asstartupTimeout, does not work.Fix
Set up a SessionStart hook to remove the
startupTimeoutfrom the marketplace since the marketplace config gets refreshed periodically from the remote repo.~/.claude/hooks/fix-lsp-plugins.sh
fix-lsp-plugins.sh
in the ~/.claude/settings.json
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.