Help us improve
Share bugs, ideas, or general feedback.
From claude-ecosystem
Sets up LSP servers by auto-detecting project languages (Python, TypeScript/JS, Go, Rust, C#), researching recommendations via MCP, and configuring .lsp.json. Interactive, auto, check, research modes.
npx claudepluginhub melodic-software/claude-code-plugins --plugin claude-ecosystemHow this skill is triggered — by the user, by Claude, or both
Slash command
/claude-ecosystem:setup-lspThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Interactive LSP server setup for Claude Code projects.
Recommends LSP servers by language, configures .lsp.json files, provides installation guides, and troubleshoots issues in Claude Code.
Installs and configures LSP servers for Claude Code to enable go-to-definition, find-references, rename-symbol, and real-time diagnostics in Python, TypeScript/JS, Go, Rust, Java, C#, PHP, Kotlin, Ruby, and more.
Guides integration of LSP servers into Claude Code plugins via plugin.json or .lsp.json for code intelligence like go-to-definition, references, hovers, and completions.
Share bugs, ideas, or general feedback.
Interactive LSP server setup for Claude Code projects.
lsp-management skill for server recommendations and configuration patterns..lsp.json in project root.| Argument | Mode | Description |
|---|---|---|
| (none) | Interactive | Scan project, ask user what to configure |
--auto | Automatic | Auto-detect and configure without prompts |
--check | Check | Report installed LSPs and available updates |
--research <lang> | Research | Query MCP for latest recommendations for a language |
<language> | Single | Configure LSP for specific language only |
When no arguments provided:
Scan for file extensions to detect languages in use:
# Find all unique file extensions
find . -type f -name "*.*" | sed 's/.*\.//' | sort -u
Or use Glob to find specific language files:
**/*.py - Python**/*.ts, **/*.tsx, **/*.js, **/*.jsx - TypeScript/JavaScript**/*.go - Go**/*.rs - Rust**/*.cs - C#**/*.c, **/*.cpp, **/*.h - C/C++Use AskUserQuestion to let user choose:
"I detected the following languages in your project: Python, TypeScript, C#. What would you like to do?"
Options:
1. "Configure all detected languages (Recommended)" - Set up LSPs for all
2. "Select specific languages to configure" - Choose which ones
3. "Research latest recommendations first" - Query MCP before configuring
4. "Check existing configuration" - Review current .lsp.json
For each language to configure:
lsp-management skill<command> --version).lsp.json entryCreate or update .lsp.json with generated entries.
If .lsp.json exists, use AskUserQuestion:
"A .lsp.json already exists. How should I handle this?"
Options:
1. "Merge with existing configuration (Recommended)" - Add new entries, keep existing
2. "Replace existing configuration" - Overwrite completely
3. "Show me what would change" - Diff preview
After configuration:
.lsp.json content/audit-lsp to validateWhen --auto flag is provided:
.lsp.jsonNo AskUserQuestion prompts in this mode.
When --check flag is provided:
.lsp.json| Server | Installed | Version | Status |
| --- | --- | --- | --- |
| pyright | ✓ | 1.1.350 | Up to date |
| typescript-language-server | ✓ | 4.3.0 | Update available (4.4.0) |
| csharp-ls | ✗ | - | Not installed |
When --research <language> is provided:
Query MCP servers for latest recommendations:
mcp__perplexity__search: "best <language> language server 2026 LSP"
mcp__context7__query-docs: "<language> LSP server"
Compare with skill's recommendations
Present findings to user
Ask if they want to proceed with configuration
When a language name is provided (e.g., /setup-lsp python):
.lsp.json entry for that language onlyTo check if a server is installed:
# Try running with version flag
<command> --version 2>/dev/null && echo "installed" || echo "not installed"
Common commands:
| Server | Check Command |
|---|---|
| pyright | pyright-langserver --version |
| typescript-language-server | typescript-language-server --version |
| gopls | gopls version |
| rust-analyzer | rust-analyzer --version |
| csharp-ls | csharp-ls --version |
| clangd | clangd --version |
User: /setup-lsp
Claude: Scanning project for languages...
Found: Python (.py), TypeScript (.ts, .tsx), JSON (.json)
I detected Python, TypeScript, and JSON files. What would you like to do?
[User selects "Configure all detected languages"]
Checking server installations...
✓ pyright-langserver is installed (1.1.350)
✓ typescript-language-server is installed (4.3.0)
✓ vscode-json-language-server is installed (1.3.4)
Generated .lsp.json:
{
"pyright": { ... },
"typescript": { ... },
"json": { ... }
}
Configuration complete! Run /audit-lsp to validate.
User: /setup-lsp --auto
Claude: Auto-detecting languages and configuring LSP...
Detected: Python, TypeScript
Configured: pyright, typescript-language-server
Created: .lsp.json
Done. Restart Claude Code to activate LSP servers.
User: /setup-lsp --research rust
Claude: Researching Rust LSP servers...
[Queries MCP servers]
Current recommendation: rust-analyzer
- Official Rust project
- Comprehensive features
- Active development
Alternative: None (rust-analyzer is de facto standard)
Would you like me to configure rust-analyzer for your project?
"I couldn't detect any programming languages in this project.
Would you like to manually specify a language to configure?"
"pyright-langserver is not installed. Install it with:
npm install -g pyright
Would you like me to proceed with the configuration anyway?
(The LSP won't work until the server is installed)"
"The existing .lsp.json has syntax errors.
Would you like me to:
1. Fix the syntax and proceed
2. Back up and create a new configuration
3. Show me the errors"
CRITICAL: .lsp.json tells Claude Code how to START the LSP server, but project config files tell the LSP server how to ANALYZE code.
After detecting languages, check for required project-level configs:
| Language | Required Project Config | Check Method |
|---|---|---|
| Python | pyrightconfig.json OR [tool.pyright] in pyproject.toml | Glob for file, parse TOML section |
| TypeScript/JavaScript | tsconfig.json | Glob for file |
| C# | *.sln or *.csproj | Glob for solution/project files |
| Go | go.mod | Glob for file |
| Rust | Cargo.toml | Glob for file |
After language detection and before generating .lsp.json:
pyrightconfig.json found"When project config is missing:
Query MCP for latest best practices:
mcp__perplexity__search: "pyrightconfig.json best practices 2026 typeCheckingMode"
mcp__perplexity__search: "tsconfig.json 2026 NodeNext strict ES2024"
mcp__context7__query-docs: Query /microsoft/pyright or /websites/typescriptlang
Generate config based on project structure + MCP research
Present to user with explanation of key settings
Prompt for confirmation before writing file
Write file to project root
Query MCP servers before generating to get current best practices. Here are baseline templates:
{
"include": ["src", "plugins"],
"exclude": ["**/node_modules", "**/__pycache__", "**/.venv"],
"venvPath": ".",
"venv": ".venv",
"typeCheckingMode": "standard",
"pythonVersion": "3.13",
"pythonPlatform": "All"
}
Key settings to query MCP:
typeCheckingMode: "off" | "basic" | "standard" | "strict" | "all"pythonVersion: Check current stable version (3.13/3.14){
"$schema": "https://json.schemastore.org/tsconfig",
"compilerOptions": {
"target": "ES2022",
"lib": ["ES2024"],
"module": "NodeNext",
"moduleResolution": "NodeNext",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"noEmit": true
},
"include": ["src/**/*.ts"],
"exclude": ["node_modules"]
}
Key settings to query MCP:
module/moduleResolution: Modern options like "NodeNext"target/lib: Current ES versionsC# LSP servers (csharp-ls) require a .sln or .csproj file for root detection. If none exists:
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1
Global
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
Requirements to query MCP:
If diagnostics work but hover/goToDefinition/documentSymbol don't:
.lsp.json in the project root/audit-lsp after setup to validate the configurationlsp-management skill provides all server recommendationsENABLE_LSP_TOOL=1 environment variable for LSP tool access