$git clone https://github.com/ktnyt/cclspcclsp is a Model Context Protocol (MCP) server that seamlessly integrates LLM-based coding agents with Language Server Protocol (LSP) servers. LLM-based coding agents often struggle with providing accurate line/column numbers, which makes naive attempts to integrate with LSP
| 1 | [](https://mseep.ai/app/ktnyt-cclsp) |
| 2 | |
| 3 | # cclsp - not your average LSP adapter |
| 4 | |
| 5 | [](https://www.npmjs.com/package/cclsp) |
| 6 | [](https://opensource.org/licenses/MIT) |
| 7 | [](https://nodejs.org) |
| 8 | [](https://github.com/ktnyt/cclsp/actions/workflows/ci.yml) |
| 9 | [](https://www.npmjs.com/package/cclsp) |
| 10 | [](CONTRIBUTING.md) |
| 11 | |
| 12 | **cclsp** is a Model Context Protocol (MCP) server that seamlessly integrates LLM-based coding agents with Language Server Protocol (LSP) servers. LLM-based coding agents often struggle with providing accurate line/column numbers, which makes naive attempts to integrate with LSP servers fragile and frustrating. cclsp solves this by intelligently trying multiple position combinations and providing robust symbol resolution that just works, no matter how your AI assistant counts lines. |
| 13 | |
| 14 | ## Setup & Usage Demo |
| 15 | |
| 16 | https://github.com/user-attachments/assets/52980f32-64d6-4b78-9cbf-18d6ae120cdd |
| 17 | |
| 18 | ## Table of Contents |
| 19 | |
| 20 | - [Why cclsp?](#why-cclsp) |
| 21 | - [Features](#features) |
| 22 | - [📋 Prerequisites](#-prerequisites) |
| 23 | - [⚡ Setup](#-setup) |
| 24 | - [Automated Setup (Recommended)](#automated-setup-recommended) |
| 25 | - [Claude Code Quick Setup](#claude-code-quick-setup) |
| 26 | - [Manual Setup](#manual-setup) |
| 27 | - [Language Server Installation](#language-server-installation) |
| 28 | - [Verification](#verification) |
| 29 | - [🚀 Usage](#-usage) |
| 30 | - [As MCP Server](#as-mcp-server) |
| 31 | - [Configuration](#configuration) |
| 32 | - [🛠️ Development](#️-development) |
| 33 | - [🔧 MCP Tools](#-mcp-tools) |
| 34 | - [`find_definition`](#find_definition) |
| 35 | - [`find_references`](#find_references) |
| 36 | - [`rename_symbol`](#rename_symbol) |
| 37 | - [`rename_symbol_strict`](#rename_symbol_strict) |
| 38 | - [`get_diagnostics`](#get_diagnostics) |
| 39 | - [`restart_server`](#restart_server) |
| 40 | - [💡 Real-world Examples](#-real-world-examples) |
| 41 | - [Finding Function Definitions](#finding-function-definitions) |
| 42 | - [Finding All References](#finding-all-references) |
| 43 | - [Renaming Symbols](#renaming-symbols) |
| 44 | - [🔍 Troubleshooting](#-troubleshooting) |
| 45 | - [🤝 Contributing](#-contributing) |
| 46 | - [📄 License](#-license) |
| 47 | |
| 48 | ## Why cclsp? |
| 49 | |
| 50 | When using AI-powered coding assistants like Claude, you often need to navigate codebases to understand symbol relationships. **cclsp** bridges the gap between Language Server Protocol capabilities and Model Context Protocol, enabling: |
| 51 | |
| 52 | - 🔍 **Instant symbol navigation** - Jump to definitions without manually searching |
| 53 | - 📚 **Complete reference finding** - Find all usages of functions, variables, and types |
| 54 | - ✏️ **Safe symbol renaming** - Rename across entire codebases with confidence |
| 55 | - 🌍 **Universal language support** - Works with any LSP-compatible language server |
| 56 | - 🤖 **AI-friendly interface** - Designed for LLMs to understand and use effectively |
| 57 | |
| 58 | ## Features |
| 59 | |
| 60 | - **Go to Definition**: Find where symbols are defined |
| 61 | - **Find References**: Locate all references to a symbol |
| 62 | - **Multi-language Support**: Configurable LSP servers for different file types |
| 63 | - **TypeScript**: Built-in support via typescript-language-server |
| 64 | - **Python**: Support via python-lsp-server (pylsp) |
| 65 | - **Go**: Support via gopls |
| 66 | - **And many more**: Extensive language server configurations |
| 67 | |
| 68 | ## 📋 Prerequisites |
| 69 | |
| 70 | - Node.js 18+ or Bun runtime |
| 71 | - Language servers for your target languages (installed separately) |
| 72 | |
| 73 | ## ⚡ Setup |
| 74 | |
| 75 | cclsp provides an interactive setup wizard that automates the entire configuration process. Choose your preferred method: |
| 76 | |
| 77 | ### Automated Setup (Recommended) |
| 78 | |
| 79 | Run the interactive setup wizard: |
| 80 | |
| 81 | ```bash |
| 82 | # One-time setup (no installation required) |
| 83 | npx cclsp@latest setup |
| 84 | |
| 85 | # For user-wide configuration |
| 86 | npx ccl |