From karellen-lsp-mcp
Investigate code using LSP tools. Register a project, then use definitions, references, call hierarchies, type hierarchies, hover, and diagnostics to understand code structure, trace bugs, and assess change impact.
npx claudepluginhub karellen/claude-plugins --plugin karellen-lsp-mcpThis skill uses the workspace's default tool permissions.
Use this skill when you need to understand code structure, trace bugs through call
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Migrates code, prompts, and API calls from Claude Sonnet 4.0/4.5 or Opus 4.1 to Opus 4.5, updating model strings on Anthropic, AWS, GCP, Azure platforms.
Automates semantic versioning and release workflow for Claude Code plugins: bumps versions in package.json, marketplace.json, plugin.json; verifies builds; creates git tags, GitHub releases, changelogs.
Use this skill when you need to understand code structure, trace bugs through call chains, find all usages of a symbol, or check compiler diagnostics across a codebase.
karellen-lsp-mcp must be installed and on PATHclangd — install via pip install --user karellen-lsp-mcp[clangd] or system package managerjdtls — install via pip install --user karellen-lsp-mcp[jdtls]pyright — install via pip install --user karellen-lsp-mcp[pyright]rust-analyzer — install via rustup component add rust-analyzerpip install --user karellen-lsp-mcp[all]Optionally scan first to see what languages are present:
lsp_scan_languages(project_path="/path/to/project")
Then register:
lsp_register_project(project_path="/path/to/project")
Auto-detection identifies the language, build system, and LSP server configuration.
See /karellen-lsp-mcp:lsp-register for detailed registration options.
Start with hover to get the type signature without reading the file:
lsp_hover(project_id="<id>", file_path="/path/to/file.cpp", line=42, character=10)
Then jump to the definition, declaration, or type definition:
lsp_read_definition(project_id="<id>", file_path="/path/to/file.cpp", line=42, character=10)
lsp_read_declaration(project_id="<id>", file_path="/path/to/file.cpp", line=42, character=10)
lsp_read_type_definition(project_id="<id>", file_path="/path/to/file.cpp", line=42, character=10)
Find all references or implementations:
lsp_find_references(project_id="<id>", file_path="/path/to/file.cpp", line=42, character=10)
lsp_find_implementations(project_id="<id>", file_path="/path/to/file.java", line=10, character=14)
Search for symbols by name across the project:
lsp_workspace_symbols(project_id="<id>", query="MyClassName")
Trace call chains — use the recursive tree tools to get the full hierarchy in one shot:
lsp_call_tree_incoming(project_id="<id>", file_path="/path/to/file.cpp", line=42, character=10)
lsp_call_tree_outgoing(project_id="<id>", file_path="/path/to/file.cpp", line=42, character=10)
Or use the single-level versions if you only need immediate callers/callees:
lsp_call_hierarchy_incoming(project_id="<id>", file_path="/path/to/file.cpp", line=42, character=10)
lsp_call_hierarchy_outgoing(project_id="<id>", file_path="/path/to/file.cpp", line=42, character=10)
Get the full recursive type tree in one shot:
lsp_type_tree_supertypes(project_id="<id>", file_path="/path/to/file.java", line=10, character=14)
lsp_type_tree_subtypes(project_id="<id>", file_path="/path/to/file.java", line=10, character=14)
Or single-level:
lsp_type_hierarchy_supertypes(project_id="<id>", file_path="/path/to/file.java", line=10, character=14)
lsp_type_hierarchy_subtypes(project_id="<id>", file_path="/path/to/file.java", line=10, character=14)
List all symbols in a file to understand its structure:
lsp_document_symbols(project_id="<id>", file_path="/path/to/file.cpp")
Get compiler errors and warnings for a specific file:
lsp_diagnostics(project_id="<id>", file_path="/path/to/file.cpp")
lsp_deregister_project(registration_id="<registration_id>")
lsp_hover to get the signature and docslsp_read_definition to see the implementationlsp_call_tree_incoming to get the full caller treelsp_call_tree_outgoing to get the full callee treelsp_find_references to find all usages of the symbol being changedlsp_call_tree_incoming to get the full caller treelsp_hover to understand how it uses the symbollsp_diagnostics on affected files after making changeslsp_document_symbols to find relevant functionslsp_read_definition to follow suspicious callslsp_call_tree_incoming to trace the data flow backwardslsp_hover on variables to check typeslsp_type_tree_supertypes to get the full supertype treelsp_type_tree_subtypes to get the full subtype treelsp_document_symbols on key classes to compare their structurelsp_find_references on interface methods to see polymorphic usagecmake, make, meson, cargo build, gradle,
mvn, pip install, etc.) on the user's project. The LSP adapter handles build
configuration automatically. Register the project and let the adapter handle it.lsp_detect_project first to find the correct
root for each language (where Cargo.toml, pyproject.toml, CMakeLists.txt, etc.
lives). Registering at a parent directory that lacks the language's build system marker
will fail or produce no results.lsp_hover is fast and often provides enough context
(type signature, docs) without needing to read the full file.lsp_find_references is semantically aware; it
finds actual references, not string matches.lsp_indexing_status shows progress.timeout. Optional timeout parameter (seconds) overrides the
default readiness timeout. Use higher values for large codebases (e.g. timeout=300).lsp_regenerate_index to rebuild. If the index is stale or corrupt, this
cleans managed data and force-restarts the LSP server.registration_id to release resources.