{
  "markdown": "# MCP Server for LSP Code Intelligence (karellen-lsp-mcp)\n\n[![Gitter](https://img.shields.io/gitter/room/karellen/lobby?logo=gitter)](https://gitter.im/karellen/Lobby)\n[![Build Status](https://img.shields.io/github/actions/workflow/status/karellen/karellen-lsp-mcp/build.yml?branch=master)](https://github.com/karellen/karellen-lsp-mcp/actions/workflows/build.yml)\n[![Coverage Status](https://img.shields.io/coveralls/github/karellen/karellen-lsp-mcp/master?logo=coveralls)](https://coveralls.io/r/karellen/karellen-lsp-mcp?branch=master)\n\n[![karellen-lsp-mcp Version](https://img.shields.io/pypi/v/karellen-lsp-mcp?logo=pypi)](https://pypi.org/project/karellen-lsp-mcp/)\n[![karellen-lsp-mcp Python Versions](https://img.shields.io/pypi/pyversions/karellen-lsp-mcp?logo=pypi)](https://pypi.org/project/karellen-lsp-mcp/)\n[![karellen-lsp-mcp Downloads Per Day](https://img.shields.io/pypi/dd/karellen-lsp-mcp?logo=pypi)](https://pypi.org/project/karellen-lsp-mcp/)\n[![karellen-lsp-mcp Downloads Per Week](https://img.shields.io/pypi/dw/karellen-lsp-mcp?logo=pypi)](https://pypi.org/project/karellen-lsp-mcp/)\n[![karellen-lsp-mcp Downloads Per Month](https://img.shields.io/pypi/dm/karellen-lsp-mcp?logo=pypi)](https://pypi.org/project/karellen-lsp-mcp/)\n\n## Overview\n\n`karellen-lsp-mcp` gives LLM clients structured code intelligence via\n[LSP](https://microsoft.github.io/language-server-protocol/) (Language Server Protocol)\nservers. Instead of reading through entire codebases, the LLM can query definitions,\nreferences, call hierarchies, type hierarchies, hover documentation, symbols, and\ndiagnostics — the same information a human developer gets from their IDE.\n\nTwo interfaces, one daemon:\n\n- **MCP interface** (`karellen-lsp-mcp`): Explicit tool calls with structured responses.\n  Requires MCP tool approval or allow-rules.\n- **LSP proxy interface** (`karellen-lsp`): Native LSP server that Claude Code uses\n  transparently — no permission prompts, no manual project registration. Auto-detects\n  languages and routes to backend LSP servers.\n\n### Architecture\n\nMultiple Claude sessions share a single daemon process and a single LSP server per project,\navoiding duplicate server instances and redundant indexing:\n\n```\nClaude Code LSP           Claude MCP Session 1      Claude MCP Session 2\n     │ (stdio)                  │ (stdio)                  │ (stdio)\n     ▼                          ▼                          ▼\n┌─────────────┐          ┌─────────────┐          ┌─────────────┐\n│  LSP proxy  │          │  MCP stdio  │          │  MCP stdio  │\n│  frontend   │          │  frontend   │          │  frontend   │\n└──────┬──────┘          └──────┬──────┘          └──────┬──────┘\n       │ (Unix socket)          │                        │\n       ▼                        ▼                        ▼\n┌──────────────────────────────────────────────────────────────┐\n│     karellen-lsp-mcp daemon                                  │\n│                                                              │\n│  Project Registry (refcounted)                               │\n│    project-A  refcount=3  ──► clangd                         │\n│    project-B  refcount=1  ──► jdtls                          │\n└──────────────────────────────────────────────────────────────┘\n```\n\n- **Daemon**: Persistent process, owns all LSP server subprocesses and the project\n  registry. Listens on Unix domain socket. User-scoped. Auto-starts when the first\n  frontend connects, auto-exits after idle timeout with no connections.\n- **MCP frontend**: Thin stdio process per Claude session. Connects to daemon, proxies\n  MCP tool calls. Returns structured data (dataclasses) for fast LLM processing.\n- **LSP proxy frontend**: Standard LSP server over stdio. Auto-detects languages on\n  `initialize`, registers projects, routes LSP requests to the correct backend.\n  Reuses the same adapters, normalizers, and readiness tracking as MCP.\n\n### Supported Languages\n\n| Language | Default LSP Server | Autodetection | Details |\n|----------|-------------------|---------------|---------|\n| C / C++ | [clangd](https://clangd.llvm.org/) | CMake, Meson, autotools, Make, Bazel | [docs/c-cpp.md](docs/c-cpp.md) |\n| Java / Kotlin | [jdtls](https://github.com/karellen/karellen-jdtls-kotlin) | Gradle, Maven, Ant | [docs/java-kotlin.md](docs/java-kotlin.md) |\n| Python | [pyright](https://github.com/microsoft/pyright) | PyBuilder, pyproject.toml, setup.py, Pipfile, requirements.txt | [docs/python.md](docs/python.md) |\n| Rust | [rust-analyzer](https://rust-analyzer.github.io/) | Cargo.toml, workspace detection | [docs/rust.md](docs/rust.md) |\n| Any | Custom via `lsp_command` parameter | &mdash; | Provide the command in `lsp_register_project` |\n\nProjects are autodetected when `language` is omitted from `lsp_register_project`, or\ninspected explicitly via `lsp_detect_project`. Detection scans build system markers,\nIDE metadata (JetBrains `.idea/`, Eclipse, VS Code), and source file conventions.\n\n## Requirements\n\n- **Python** >= 3.10\n- **An LSP server** for your language, installed and on PATH\n- **Linux** or **macOS** (uses Unix domain sockets; Windows 10 build 17063+ also works)\n\n## Installation\n\n```bash\npip install --user karellen-lsp-mcp\n```\n\nInstall with LSP server dependencies:\n\n```bash\npip install --user karellen-lsp-mcp[clangd]         # C/C++ support\npip install --user karellen-lsp-mcp[jdtls]          # Java/Kotlin support\npip install --user karellen-lsp-mcp[pyright]        # Python support\npip install --user karellen-lsp-mcp[all]            # All LSP servers\n# Rust: rustup component add rust-analyzer\n```\n\nOr with pipx for an isolated environment:\n\n```bash\npipx install 'karellen-lsp-mcp[all]'\n```\n\n## Claude Code Integration\n\n### Plugin Installation (Recommended)\n\nThe plugin provides both interfaces in one package:\n\n- **Native LSP server** (`karellen-lsp`): Transparent code intelligence — Claude Code uses\n  it automatically for supported file types. No permission prompts, no manual registration.\n  Auto-detects languages from CWD and routes to backend LSP servers.\n- **MCP tools** (`karellen-lsp-mcp`): Explicit tool calls with structured responses, plus\n  hooks (prerequisite checks, compiler error detection),\n  skills (`/karellen-lsp-mcp:lsp-register`, `/karellen-lsp-mcp:lsp-investigate`), and\n  an autonomous `lsp-investigator` agent.\n\nBoth share the same daemon — MCP-registered projects are visible to native LSP queries\nand vice versa.\n\n**From Karellen marketplace:**\n\n```bash\nclaude plugin marketplace add karellen/claude-plugins\nclaude plugin install karellen-lsp-mcp@karellen-plugins\n```\n\n**From local checkout:**\n\n```bash\nclaude --plugin-dir /path/to/karellen-lsp-mcp\n```\n\n### Manual MCP Configuration (Alternative)\n\nIf you prefer not to use the plugin system, configure the MCP server directly:\n\n```bash\nclaude mcp add --transport stdio karellen-lsp-mcp -- karellen-lsp-mcp\n```\n\nOr manually add to `~/.claude.json` (user scope) or `.mcp.json` in your project root\n(project scope, shared via version control):\n\n```json\n{\n  \"mcpServers\": {\n    \"karellen-lsp-mcp\": {\n      \"type\": \"stdio\",\n      \"command\": \"karellen-lsp-mcp\"\n    }\n  }\n}\n```\n\nIf installed with pipx:\n\n```bash\nclaude mcp add --transport stdio karellen-lsp-mcp -- pipx run karellen-lsp-mcp\n```\n\nor manually:\n\n```json\n{\n  \"mcpServers\": {\n    \"karellen-lsp-mcp\": {\n      \"type\": \"stdio\",\n      \"command\": \"pipx\",\n      \"args\": [\"run\", \"karellen-lsp-mcp\"]\n    }\n  }\n}\n```\n\nNote: manual MCP configuration provides tools only, without hooks, skills, or agents.\n\n### Auto-approve MCP tools\n\nThe native LSP interface requires no approval — Claude Code uses it transparently.\n\nFor MCP tools, Claude Code prompts for confirmation by default. To auto-approve, add\na permission rule to your user settings\n(`~/.claude/settings.json`):\n\n```json\n{\n  \"permissions\": {\n    \"allow\": [\n      \"mcp__karellen-lsp-mcp__*\",\n      \"mcp__plugin_karellen-lsp-mcp_karellen-lsp-mcp__*\"\n    ]\n  }\n}\n```\n\nOr for a project-scoped setting, add the same rule to `.claude/settings.json` in your\nproject root (this file can be committed to version control so all team members get it).\n\n### Teach Claude the LSP workflow\n\nClaude will automatically discover all `lsp_*` tools, but to teach it **when and how** to\nuse them effectively, add the following to your project's `CLAUDE.md`:\n\n````markdown\n## LSP Code Intelligence\n\n### When to Use LSP Tools\n\nUse the `lsp_*` MCP tools for navigating and understanding codebases — especially when\nyou need to trace call chains, find all references to a symbol, understand type\nhierarchies, or check compiler diagnostics without reading entire files.\n\n### Setup\n\nRegister your project once at the start of a session. Do NOT ask the user for\nconfiguration details. Do NOT narrate intermediate steps. Do the entire setup\n(search, generate if needed, register) in one action sequence without pausing for\nconfirmation.\n\n**C/C++ projects** use clangd as the default LSP server. clangd needs a\n`compile_commands.json` for accurate results. Most projects don't have one pre-built.\nDo all of this in one go:\n\n1. Search for an existing `compile_commands.json` — use `Glob` to check the project\n   tree. Also check if there's an existing build directory (look for `build/`,\n   `cmake-build-*/`, `out/`, or a `compile_commands.json` symlink in the project root).\n2. If not found, detect the build system and generate it:\n   - `CMakeLists.txt` → check if there's already a build directory with cmake cache\n     (in-tree or out-of-tree). If an existing build dir has `CMakeCache.txt`, re-run\n     cmake there with `-DCMAKE_EXPORT_COMPILE_COMMANDS=ON`. Otherwise run\n     `cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -B build`.\n   - `meson.build` → `meson setup build` (generates it automatically)\n   - `Makefile`/`configure`/autotools → use Bear if available (`bear -- make`), or\n     run `make -n` to get compiler commands and write `compile_commands.json` yourself\n   - No build system → register without `build_info` (clangd still works for basics)\n3. Register immediately — don't ask for confirmation:\n\n```\nlsp_register_project(\n    project_path=\"/path/to/project\",\n    language=\"cpp\",  # or \"c\"\n    build_info={\"compile_commands_dir\": \"/path/to/dir/containing/compile_commands.json\"}\n)\n```\n\n**Other languages**: pass a custom `lsp_command`:\n\n```\nlsp_register_project(\n    project_path=\"/path/to/project\",\n    language=\"go\",\n    lsp_command=[\"gopls\"]\n)\n```\n\n### Key Rules\n\n- **Use LSP instead of grepping**: `lsp_find_references` is semantically aware — it finds\n  actual references, not string matches. It won't return comments, strings, or unrelated\n  symbols with the same name\n- **Hover before reading**: `lsp_hover` gives you the type signature and documentation\n  for any symbol — often enough to understand usage without reading the full definition\n- **Call hierarchy for impact analysis**: before changing a function, use\n  `lsp_call_tree_incoming` to get the full recursive call tree in one shot, or\n  `lsp_call_hierarchy_incoming` for a single level\n- **Single-file queries work immediately**: `lsp_read_definition`, `lsp_hover`, and\n  `lsp_document_symbols` don't wait for background indexing. Use these freely even on\n  large codebases that are still indexing\n- **Cross-file queries wait for indexing automatically**: `lsp_find_references`,\n  call hierarchy, type hierarchy, and `lsp_diagnostics` wait for indexing to finish,\n  with the timeout extending automatically as long as progress is being made. No need\n  to poll or sleep. Use `lsp_indexing_status(project_id)` to check progress on large\n  codebases\n- **All positions are 1-based**: line and character offsets in both input and output\n  start at 1. Values from one tool's output (e.g. `lsp_workspace_symbols`) can be\n  fed directly into another tool's input (e.g. `lsp_read_definition`)\n- **Stale compile_commands.json is auto-detected**: if build config files\n  (`CMakeLists.txt`, `meson.build`) are newer than `compile_commands.json`, or\n  5% or more of referenced source files no longer exist, the server regenerates\n  it automatically for CMake/Meson projects. For other build systems, the stale\n  file is used with a warning. Use `lsp_regenerate_index` to force regeneration\n- **Per-tool timeout**: all tools accept an optional `timeout` parameter (seconds)\n  to override the default readiness timeout for that call. Useful for large\n  codebases or debugging timeout issues\n- **Deregister when done**: `lsp_deregister_project` takes the `registration_id` returned\n  by register; the LSP server shuts down when all registrations are released\n````\n\n## Available Tools\n\n### Project Lifecycle\n| Tool | Description |\n|------|-------------|\n| `lsp_scan_languages` | Scan project for file extensions and recommend LSP registrations. Lightweight alternative to detect. |\n| `lsp_detect_project` | Detect languages and build systems without registering. Analyzes build markers, IDE metadata, source conventions. |\n| `lsp_register_project` | Register a project for LSP analysis. Returns a `project_id` (for queries) and a unique `registration_id` (for deregistering). Multiple sessions sharing the same project get the same LSP server. Use `regenerate=True` to clean managed data and force-restart. |\n| `lsp_regenerate_index` | Clean managed data (compilation databases, workspace caches) and force-restart the LSP server. |\n| `lsp_deregister_project` | Deregister a project by `registration_id`. Decrements refcount; stops LSP server at 0. Each token can only be used once. |\n| `lsp_list_projects` | List all registered projects with status, refcounts, and paths. |\n| `lsp_indexing_status` | Query indexing progress for a project: state, elapsed time, active tasks with percentages, completed task count. Returns immediately without waiting for readiness. |\n\n### Code Navigation\n| Tool | Description |\n|------|-------------|\n| `lsp_read_definition` | Go to definition of symbol at position. |\n| `lsp_read_declaration` | Go to declaration (e.g., header in C/C++, interface in Java). |\n| `lsp_read_type_definition` | Go to the type definition of a variable/expression. |\n| `lsp_find_references` | Find all references to symbol at position. |\n| `lsp_find_implementations` | Find all implementations of an interface/abstract method. |\n| `lsp_hover` | Get type signature and documentation for symbol at position. |\n\n### Symbols and Structure\n| Tool | Description |\n|------|-------------|\n| `lsp_document_symbols` | List all symbols (functions, classes, variables, etc.) in a file. |\n| `lsp_workspace_symbols` | Search for symbols across the entire project by name or pattern. |\n| `lsp_call_hierarchy_incoming` | Find all callers of function/method at position (single level). |\n| `lsp_call_hierarchy_outgoing` | Find all functions/methods called by function at position (single level). |\n| `lsp_call_tree_incoming` | Recursively find all callers, returning a tree (default depth 3, has_more on truncated nodes). |\n| `lsp_call_tree_outgoing` | Recursively find all callees, returning a tree (default depth 3, has_more on truncated nodes). |\n| `lsp_type_hierarchy_supertypes` | Find base classes/interfaces of type at position (single level). |\n| `lsp_type_hierarchy_subtypes` | Find derived classes/implementations of type at position (single level). |\n| `lsp_type_tree_supertypes` | Recursively find all supertypes, returning a tree (default depth 3, has_more on truncated nodes). |\n| `lsp_type_tree_subtypes` | Recursively find all subtypes, returning a tree (default depth 3, has_more on truncated nodes). |\n\n### Diagnostics\n| Tool | Description |\n|------|-------------|\n| `lsp_diagnostics` | Get compiler diagnostics (errors, warnings) for a file. |\n\n## Structured Responses\n\nAll tools return structured data (dataclasses), not plain text. This enables fast LLM\nprocessing without parsing. Examples:\n\n**`lsp_read_definition`** returns `LocationResult`:\n```json\n{\n  \"locations\": [\n    {\"file\": \"/path/to/impl.cpp\", \"line\": 42, \"character\": 5}\n  ]\n}\n```\n\n**`lsp_document_symbols`** returns `DocumentSymbolsResult`:\n```json\n{\n  \"symbols\": [\n    {\"name\": \"MyClass\", \"kind\": \"Class\", \"line\": 10, \"children\": [\n      {\"name\": \"method1\", \"kind\": \"Method\", \"line\": 12},\n      {\"name\": \"method2\", \"kind\": \"Method\", \"line\": 18}\n    ]}\n  ]\n}\n```\n\n**`lsp_call_hierarchy_incoming`** returns `CallHierarchyResult`:\n```json\n{\n  \"direction\": \"incoming\",\n  \"items\": [\n    {\"name\": \"main\", \"kind\": \"Function\", \"file\": \"/path/to/main.cpp\", \"line\": 5, \"call_sites\": 1}\n  ],\n  \"indexing\": true\n}\n```\n\n**`lsp_call_tree_incoming`** returns `CallTreeResult` (recursive, default depth 3):\n```json\n{\n  \"direction\": \"incoming\",\n  \"root\": {\n    \"name\": \"target_func\", \"kind\": \"Function\", \"file\": \"/path/to/file.cpp\", \"line\": 42,\n    \"call_sites\": 1,\n    \"children\": [\n      {\"name\": \"caller_a\", \"kind\": \"Function\", \"file\": \"/path/to/a.cpp\", \"line\": 10,\n       \"call_sites\": 2, \"has_more\": true, \"children\": [\n        {\"name\": \"main\", \"kind\": \"Function\", \"file\": \"/path/to/main.cpp\", \"line\": 5,\n         \"call_sites\": 1, \"children\": []}\n      ]},\n      {\"name\": \"caller_b\", \"kind\": \"Function\", \"file\": \"/path/to/b.cpp\", \"line\": 20,\n       \"call_sites\": 1, \"children\": []}\n    ]\n  },\n  \"indexing\": false\n}\n```\n\nNodes with `has_more: true` have deeper levels available — increase `max_depth` to explore.\n\nCross-file queries include `\"indexing\": true` when the LSP server is still building its\nindex, signaling that results may be incomplete.\n\n**`lsp_indexing_status`** returns `IndexingStatusResult`:\n```json\n{\n  \"state\": \"indexing\",\n  \"elapsed_seconds\": 45.2,\n  \"active_tasks\": [\n    {\"title\": \"indexing\", \"message\": \"loading index shards\", \"percentage\": 30}\n  ],\n  \"completed_tasks\": 2\n}\n```\n\n## Configuration\n\n### Timeouts\n\nAll timeouts are configurable via environment variables (in seconds). Set them in your\nMCP server configuration:\n\n```json\n{\n  \"mcpServers\": {\n    \"karellen-lsp-mcp\": {\n      \"type\": \"stdio\",\n      \"command\": \"karellen-lsp-mcp\",\n      \"env\": {\n        \"LSP_MCP_READY_TIMEOUT\": \"300\",\n        \"LSP_MCP_REQUEST_TIMEOUT\": \"120\"\n      }\n    }\n  }\n}\n```\n\n#### Per-Tool Timeout\n\nAll tools accept an optional `timeout` parameter (in seconds) that overrides the\ndaemon's default readiness timeout for that specific call. This is useful for\ndebugging or for large codebases that need more time to index:\n\n```\nlsp_find_references(project_id=\"<id>\", file_path=\"...\", line=42, character=10, timeout=300)\n```\n\nDefault timeouts: 30s for lifecycle tools (scan, detect, deregister, list, indexing_status),\n120s for query tools and registration.\n\n#### Environment Variables\n\n| Variable | Default | Description |\n|----------|---------|-------------|\n| `LSP_MCP_READY_TIMEOUT` | 120 | Base timeout (seconds) for cross-file queries to wait for indexing. Overridden by per-tool `timeout` parameter. Actual timeout extends dynamically based on indexing progress |\n| `LSP_MCP_REQUEST_TIMEOUT` | 60 | Max seconds to wait for a single LSP JSON-RPC response |\n| `LSP_MCP_CLIENT_TIMEOUT` | 180 | Max seconds for the MCP frontend to wait for a daemon response (must exceed ready + request timeouts) |\n| `LSP_MCP_IDLE_TIMEOUT` | 300 | Seconds before the daemon auto-exits when idle (no connections, no projects) |\n| `LSP_MCP_LOG_LEVEL` | `INFO` | Log verbosity for daemon and LSP proxy. Values: `DEBUG`, `INFO`, `WARNING`, `ERROR` |\n\nFor large codebases (e.g. LLVM, Linux kernel), cross-file query timeouts extend\nautomatically as long as indexing is making progress. Single-file queries (definition,\nhover, document symbols) only wait for the server to start, not for indexing. Ensure\n`LSP_MCP_CLIENT_TIMEOUT` exceeds your expected maximum indexing time +\n`LSP_MCP_REQUEST_TIMEOUT`.\n\n## C/C++ Setup with clangd\n\n### compile_commands.json\n\nclangd needs a [compilation database](https://clang.llvm.org/docs/JSONCompilationDatabase.html)\nto understand your project's build flags, include paths, and defines. Generate one with:\n\n**CMake:**\n```bash\ncmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -B build\n```\n\n**Bear (any build system):**\n```bash\nbear -- make\n```\n\n**Meson:**\n```bash\nmeson setup build  # compile_commands.json is generated automatically\n```\n\nThen register with the directory containing `compile_commands.json`:\n\n```python\nlsp_register_project(\n    project_path=\"/path/to/project\",\n    language=\"cpp\",\n    build_info={\"compile_commands_dir\": \"/path/to/build\"}\n)\n```\n\n### Background indexing\n\nFor large projects, pass `--background-index` to clangd for cross-file features:\n\n```python\nlsp_register_project(\n    project_path=\"/path/to/project\",\n    language=\"cpp\",\n    lsp_command=[\"clangd\", \"--background-index\"],\n    build_info={\"compile_commands_dir\": \"/path/to/build\"}\n)\n```\n\n### Installing clangd\n\n**Fedora / RHEL / CentOS:**\n```bash\nsudo dnf install clang-tools-extra\n```\n\n**Ubuntu / Debian:**\n```bash\nsudo apt install clangd\n```\n\n**Arch Linux:**\n```bash\nsudo pacman -S clang\n```\n\n**macOS:**\n```bash\nbrew install llvm\n```\n\n## Troubleshooting\n\n### Daemon files\n\nThe daemon stores its files in platform-standard directories (via\n[platformdirs](https://pypi.org/project/platformdirs/)):\n\n| Directory | Linux | macOS | Windows | Contents |\n|-----------|-------|-------|---------|----------|\n| Runtime | `~/.local/share/karellen-lsp-mcp/` | `~/Library/Caches/karellen-lsp-mcp/` | `%LOCALAPPDATA%/karellen-lsp-mcp/` | `daemon.sock`, `daemon.lock` |\n| Logs | `~/.local/share/karellen-lsp-mcp/log/` | `~/Library/Logs/karellen-lsp-mcp/` | `%LOCALAPPDATA%/karellen-lsp-mcp/Logs/` | `daemon.log` |\n| Data | `~/.local/share/karellen-lsp-mcp/` | `~/Library/Application Support/karellen-lsp-mcp/` | `%LOCALAPPDATA%/karellen-lsp-mcp/` | compile_commands copies, jdtls workspaces |\n\nIf the daemon gets into a bad state, remove the socket file and it will be restarted\nautomatically on the next MCP tool call. Check `daemon.log` to diagnose crashes or\nunexpected behavior.\n\n### LSP server not starting\n\nIf tools return errors about the LSP server, check:\n\n1. The LSP server binary is on PATH (e.g. `which clangd`)\n2. The project path is an absolute path\n3. For C/C++, `compile_commands.json` exists in the specified `compile_commands_dir`\n\n### Incomplete results during indexing\n\nCross-file queries (references, call hierarchy, type hierarchy, diagnostics) automatically\nwait for indexing to finish, with the timeout extending dynamically based on progress.\nIf a query completes while indexing is still in progress (e.g. the server became \"ready\"\nbefore full indexing finished), the response includes an `indexing: true` flag — results\nmay be incomplete. Use `lsp_indexing_status` to check progress, or re-query later.\nSingle-file queries (definition, hover, document symbols) always work immediately.\n\n### Debugging\n\nSet `LSP_MCP_LOG_LEVEL` to control log verbosity for both the LSP proxy and the daemon.\nValues: `DEBUG`, `INFO` (default), `WARNING`, `ERROR`.\n\n**LSP proxy logs** go to stderr. When launched by Claude Code, use `claude --debug` to\nsee LSP server output. For standalone testing:\n\n```bash\nLSP_MCP_LOG_LEVEL=DEBUG karellen-lsp 2>lsp-debug.log\n```\n\n**Daemon logs** are written to `daemon.log` (see table above for location). To enable\ndebug logging, kill the daemon and restart with the env var set:\n\n```bash\npkill -f \"karellen_lsp_mcp.daemon\"\nLSP_MCP_LOG_LEVEL=DEBUG karellen-lsp-mcp  # daemon auto-starts with debug level\n```\n\n### Stale daemon\n\nIf you update `karellen-lsp-mcp` to a new version, the running daemon may still be the\nold version. Kill the daemon to force a restart:\n\n```bash\npkill -f \"karellen_lsp_mcp.daemon\"\n```\n\nThe next MCP tool call or LSP query will auto-start the new version.\n\n## License\n\nApache-2.0\n",
  "bytes": 23624,
  "sha": "7c21c6d23246be2f3185b2efbbb6a3c46e2d7f9403010bc5ea1f31b99b2dc044",
  "repo_slug": "karellen/karellen-lsp-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_karellen_karellen_lsp_mcp_karellen_lsp_m_e8a0816e/readme"
}