cclsp

Bridges coding agents to local language servers for definitions, references, renames and diagnostics

By Mirei Itaya (individual) JavaScript Local · stdio Developer tools

67 popularity score ★ 675 ↓ 13k/wk

Connect your client

Local (npm)

Add in one click

Opens the app, which asks before it adds the server. Then replace each <NAME> in its settings with your value.

Or add it by command or config

It needs CCLSP_CONFIG_PATH. Replace each <NAME> with your value.

Claude CodeTerminal
claude mcp add cclsp -e CCLSP_CONFIG_PATH=<CCLSP_CONFIG_PATH> -- npx -y cclsp@latest
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "cclsp": {
      "command": "npx",
      "args": [
        "-y",
        "cclsp@latest"
      ],
      "env": {
        "CCLSP_CONFIG_PATH": "<CCLSP_CONFIG_PATH>"
      }
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "cclsp": {
      "command": "npx",
      "args": [
        "-y",
        "cclsp@latest"
      ],
      "env": {
        "CCLSP_CONFIG_PATH": "<CCLSP_CONFIG_PATH>"
      }
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "cclsp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "cclsp@latest"
      ],
      "env": {
        "CCLSP_CONFIG_PATH": "<CCLSP_CONFIG_PATH>"
      }
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.cclsp]
command = "npx"
args = ["-y", "cclsp@latest"]

[mcp_servers.cclsp.env]
CCLSP_CONFIG_PATH = "<CCLSP_CONFIG_PATH>"
Gemini CLITerminal
gemini mcp add --scope user -e CCLSP_CONFIG_PATH=<CCLSP_CONFIG_PATH> cclsp npx -- -y cclsp@latest
Local (from source)

Add in one click

Opens the app, which asks before it adds the server. Then replace each <NAME> in its settings with your value.

Or add it by command or config

It needs CCLSP_CONFIG_PATH. Replace each <NAME> with your value.

FirstTerminal
git clone https://github.com/ktnyt/cclsp.git
cd cclsp
bun install
bun run build
Claude CodeTerminal
claude mcp add cclsp -e CCLSP_CONFIG_PATH=<CCLSP_CONFIG_PATH> -- node '<ABSOLUTE_PATH_TO_CLONE>/dist/index.js'
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "cclsp": {
      "command": "node",
      "args": [
        "<ABSOLUTE_PATH_TO_CLONE>/dist/index.js"
      ],
      "env": {
        "CCLSP_CONFIG_PATH": "<CCLSP_CONFIG_PATH>"
      }
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "cclsp": {
      "command": "node",
      "args": [
        "<ABSOLUTE_PATH_TO_CLONE>/dist/index.js"
      ],
      "env": {
        "CCLSP_CONFIG_PATH": "<CCLSP_CONFIG_PATH>"
      }
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "cclsp": {
      "type": "stdio",
      "command": "node",
      "args": [
        "<ABSOLUTE_PATH_TO_CLONE>/dist/index.js"
      ],
      "env": {
        "CCLSP_CONFIG_PATH": "<CCLSP_CONFIG_PATH>"
      }
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.cclsp]
command = "node"
args = ["<ABSOLUTE_PATH_TO_CLONE>/dist/index.js"]

[mcp_servers.cclsp.env]
CCLSP_CONFIG_PATH = "<CCLSP_CONFIG_PATH>"
Gemini CLITerminal
gemini mcp add --scope user -e CCLSP_CONFIG_PATH=<CCLSP_CONFIG_PATH> cclsp node -- '<ABSOLUTE_PATH_TO_CLONE>/dist/index.js'

Settings 1

CCLSP_CONFIG_PATH Required: Absolute path to the cclsp.json file mapping file extensions to language server commands; the server exits at start without it.

What it does

cclsp is a local stdio MCP server that sits between a coding agent (it was built with Claude Code in mind) and the Language Server Protocol servers you already use, such as typescript-language-server, pylsp, gopls, rust-analyzer or clangd. You map file extensions to the command that starts each language server in a cclsp.json file. cclsp then starts those servers itself, and the agent asks it questions about the code by symbol name rather than by exact line and column. Agents often get positions slightly wrong, so cclsp looks the symbol up by name and kind and tries several nearby positions before it gives up.

Version 0.7.0 registers 12 tools in its source, while the README documents only six of them. Beyond go-to-definition, references, renaming, diagnostics and server restarts, the code also adds hover info, find_implementation, workspace symbol search and call hierarchy (prepare_call_hierarchy, then get_incoming_calls or get_outgoing_calls). Renames apply to every affected file by default. With dry_run they only preview the edits.

A `cclsp setup` subcommand runs an interactive wizard. It detects the languages in a project, writes .claude/cclsp.json (or ~/.config/claude/cclsp.json with --user), can install language servers and can register cclsp with Claude Code, asking first each time. Run without arguments, the same binary starts the MCP server.

What it needs

RuntimeNode.js 18+

Node.js 18 or later (the package's engines field), or Bun. Each language server you want to use must be installed separately and be on the path, e.g. typescript-language-server, pylsp, gopls, rust-analyzer, clangd. You also need a cclsp.json file mapping file extensions to those server commands, with CCLSP_CONFIG_PATH pointing at it. Building from source needs Bun.

Limits

In 0.7.0 the server will not start unless CCLSP_CONFIG_PATH names an existing config file. Its loader throws when the variable is unset (src/lsp/config.ts), so the README's note about a TypeScript-only fallback does not hold, and it does not find the wizard's .claude/cclsp.json on its own. A tool fails for files whose extension has no configured server, and some servers need time to index first. The README warns that pylsp slows down after hours of use and suggests restartInterval (minutes) or restart_server. A rename leaves a .bak copy beside each changed file, even when it succeeds.

Who it suits

Suits developers who use a terminal coding agent such as Claude Code and want IDE-style navigation and safe symbol renames across a codebase without opening an IDE, in any language with a working LSP server. It runs entirely on your machine and needs no account. It is a poor fit if you cannot install language servers locally, or if you want the agent kept read-only, since the two rename tools rewrite source files by default unless dry_run is set. It is a community project, not published by any language or editor vendor.

Tools 12

find_definition
Locates where a named symbol is defined, optionally filtered by symbol kind.
find_references
Lists every usage of a named symbol across the workspace, with or without its declaration.
find_implementation
Finds the implementations of an interface or abstract method.
rename_symbol
Renames a symbol by name across all affected files, or previews the edits with dry_run.
rename_symbol_strict
Renames the symbol at a given line and character, for when a name matches several symbols.
get_diagnostics
Pulls the current errors, warnings and hints for one file from its language server.
get_hover
Returns the type information and documentation for the symbol at a position.
find_workspace_symbols
Searches the whole workspace for symbols matching a name.
prepare_call_hierarchy
Gets the call hierarchy item at a position, needed before the two call tools.
get_incoming_calls
Lists the functions and methods that call the prepared function.
get_outgoing_calls
Lists the functions and methods the prepared function calls.
restart_server
Restarts the language servers for given file extensions, or all of them.

Similar servers