install-lsp
Install and configure LSP (Language Server Protocol) for Claude Code to enable go-to-definition, find-references, and real-time diagnostics
Best use case
install-lsp is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Install and configure LSP (Language Server Protocol) for Claude Code to enable go-to-definition, find-references, and real-time diagnostics
Teams using install-lsp should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/install-lsp/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How install-lsp Compares
| Feature / Agent | install-lsp | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Install and configure LSP (Language Server Protocol) for Claude Code to enable go-to-definition, find-references, and real-time diagnostics
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Install LSP for Claude Code
Enable Language Server Protocol integration to give Claude Code IDE-like code intelligence: go-to-definition, find-references, rename-symbol, and real-time diagnostics.
## Why LSP?
LSP provides semantic code understanding instead of text-based grep searches:
- **50ms** to find function call sites with LSP vs **45 seconds** with text search
- Exact symbol locations with line/column numbers
- Cross-file navigation and refactoring support
## Setup Options
### Option 1: Native LSP Tool (Recommended)
Claude Code has built-in LSP support that requires activation.
**Enable permanently** (add to `~/.zshrc` or `~/.bashrc`):
```bash
export ENABLE_LSP_TOOL=1
```
**Install language plugins** from the community marketplace:
```bash
# Add the LSP plugin marketplace
/plugin marketplace add boostvolt/claude-code-lsps
# Install language-specific plugins
/plugin install pyright@claude-code-lsps # Python
/plugin install vtsls@claude-code-lsps # TypeScript/JavaScript
/plugin install gopls@claude-code-lsps # Go
/plugin install rust-analyzer@claude-code-lsps # Rust
/plugin install clangd@claude-code-lsps # C/C++
/plugin install jdtls@claude-code-lsps # Java
/plugin install omnisharp@claude-code-lsps # C#
/plugin install intelephense@claude-code-lsps # PHP
/plugin install kotlin-language-server@claude-code-lsps # Kotlin
/plugin install solargraph@claude-code-lsps # Ruby
/plugin install vscode-html-css@claude-code-lsps # HTML/CSS
```
### Option 2: cclsp MCP Server
Community MCP server with interactive setup wizard.
**Automated setup**:
```bash
npx cclsp@latest setup # Project-level config
npx cclsp@latest setup --user # User-wide config
```
The wizard:
1. Scans project files to detect languages
2. Pre-selects appropriate LSP servers
3. Shows installation instructions for each server
4. Optionally auto-installs LSP binaries
5. Configures MCP integration
## LSP Server Requirements by Language
| Language | Binary | Installation |
|----------|--------|--------------|
| **Python** | pyright | `pip install pyright` or `npm i -g pyright` |
| **TypeScript/JS** | vtsls | `npm i -g @vtsls/language-server typescript` |
| **Go** | gopls | `go install golang.org/x/tools/gopls@latest` |
| **Rust** | rust-analyzer | `rustup component add rust-analyzer` |
| **C/C++** | clangd | `brew install llvm` or `xcode-select --install` |
| **Java** | jdtls | `brew install jdtls` (requires Java 21+) |
| **C#** | omnisharp | `brew install omnisharp/omnisharp-roslyn/omnisharp-mono` |
| **PHP** | intelephense | `npm i -g intelephense` |
| **Kotlin** | kotlin-language-server | `brew install kotlin-language-server` |
| **Ruby** | solargraph | `gem install solargraph` |
| **HTML/CSS** | vscode-langservers | `npm i -g vscode-langservers-extracted` |
## cclsp Configuration File
Location: `.claude/cclsp.json` (project) or `~/.config/claude/cclsp.json` (global)
```json
{
"servers": [
{
"extensions": ["py", "pyi"],
"command": ["pyright-langserver", "--stdio"],
"rootDir": ".",
"restartInterval": 30
},
{
"extensions": ["ts", "tsx", "js", "jsx"],
"command": ["typescript-language-server", "--stdio"],
"rootDir": "."
}
]
}
```
## Available LSP Tools
After setup, Claude Code gains these capabilities:
| Tool | Description |
|------|-------------|
| `find_definition` | Navigate to symbol definition |
| `find_references` | Find all usages of a symbol |
| `rename_symbol` | Rename symbol across all files |
| `get_diagnostics` | Get type errors and warnings |
| `restart_server` | Restart the language server |
## Troubleshooting
### "No LSP server available for file type"
```bash
# Verify plugin is installed
/plugin
# Reinstall if needed
/plugin uninstall pyright@claude-code-lsps
/plugin install pyright@claude-code-lsps
```
### "Executable not found in $PATH"
```bash
# Check binary exists
which pyright
which gopls
# For Go, ensure GOPATH/bin is in PATH
export PATH=$PATH:$(go env GOPATH)/bin
```
### Plugin installed but inactive
```bash
# Clear cache and reinstall
rm -rf ~/.claude/plugins/cache
/plugin install pyright@claude-code-lsps
```
### Windows Users
Use `cmd /c` wrapper for cclsp:
```json
{
"servers": [{
"extensions": ["py"],
"command": ["cmd", "/c", "pyright-langserver", "--stdio"]
}]
}
```
## Verification
After setup, test by asking Claude Code to:
- "Go to definition of `functionName`"
- "Find all references to `ClassName`"
- "Show diagnostics for this file"
A working setup provides exact file:line locations instead of grep-based text search results.
## Best Practice
Combine LSP with traditional search:
- **Use LSP** for: go-to-definition, diagnostics, rename
- **Use Grep** for: find all usages, text patterns, comments
LSP provides precision; Grep provides coverage.
## Execution Instructions
When the user runs this command:
1. **Determine approach** from arguments:
- `native` - Use built-in LSP tool with plugins
- `cclsp` - Use cclsp MCP server
- No argument - Ask user which approach they prefer
2. **For native approach**:
- Check if `ENABLE_LSP_TOOL` is already set
- Add marketplace if not present
- Install requested language plugin(s)
- Verify with `/plugin` command
3. **For cclsp approach**:
- Run `npx cclsp@latest setup` interactively
- Guide user through language server installation
- Verify MCP server is added with `/mcp`
4. **Inform user** to restart Claude Code after installation
## Sources
- [cclsp GitHub](https://github.com/ktnyt/cclsp)
- [Claude Code LSP Setup Guide](https://www.aifreeapi.com/en/posts/claude-code-lsp)Related Skills
install-playwright-mcp
Install Playwright MCP server for browser automation in Claude Code
zod
Zod schema validation patterns and type inference. Auto-loads when validating schemas, parsing data, validating forms, checking types at runtime, or using z.object/z.string/z.infer in TypeScript.
typescript-import-style
Merge-friendly import formatting (one-per-line, alphabetical). Auto-loads when writing TypeScript/JavaScript imports to minimize merge conflicts in parallel development. Enforces consistent grouping and sorting.
setup-mcp-auth
Configure authentication for an existing FastMCP server
fastmcp
FastMCP TypeScript framework patterns for MCP servers. Auto-loads when building MCP servers, creating tools/resources/prompts, implementing authentication, configuring transports, or working with FastMCP in TypeScript.
add-mcp-tool
Add a new tool to an existing FastMCP server with guided configuration
add-mcp-resource
Add a new resource or resource template to an existing FastMCP server
plan-with-team
Validate plan file ownership
privacy-compliance
GDPR, CCPA, and privacy compliance guidance for data protection. Use when handling personal data, implementing consent management, or ensuring regulatory compliance across jurisdictions.
oauth
OAuth 2.0 and OpenID Connect implementation patterns. Use when implementing authentication, authorization flows, or integrating with OAuth providers like Google, GitHub, or custom identity providers.
mcp-security
Use when securing MCP servers, preventing prompt injection, implementing authorization, validating user input, or building secure multi-agent pipelines. Provides 5-layer defense architecture patterns.
rag-cag-security
Security patterns for RAG and CAG systems with multi-tenant isolation. Use when building retrieval-augmented or cache-augmented generation systems that require tenant isolation, access control, and secure data handling.