Get the FREE Ultimate OpenClaw Setup Guide →

common-sense-coder

An LSP-MCP bridge for code assistants.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio crepererum-oss-common-sense-coder /the/location/of/common-sense-coder/target/release/common-sense-coder --workspace=.

How to use

Common Sense Coder is an MCP server implemented in Rust that acts as an LSP-MCP bridge to make code assistants like Claude Code able to browse and query a codebase through MCP. It runs as a stdio MCP server, typically started by invoking the released binary and feeding IPC via standard input and output. The server connects to an existing LSP server (for example rust-analyzer) under the hood and exposes an MCP interface that lets an LLM request high-level exploration (find things) and detailed information (details) about symbols, documentation, definitions, implementations, and references in a more human-friendly form.

To use it, build the release artifact and point an MCP consumer to the resulting executable. The README provides an example configuration snippet showing how to wire the common-sense-coder binary into an MCP-enabled environment (via the stdio channel) and how to pass workspace context. You can invoke the server with cargo help to see all available arguments and environment variables, which control behaviors like workspace location, symbol discovery, and detail depth.

How to install

Prerequisites:

  • Rust toolchain (Rustup, cargo) installed on your system
  • Git to clone the repository (optional if you already have the source)

Step-by-step:

  1. Install Rust if you don’t have it:
    • On Unix/macOS: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
    • On Windows: follow the Rust install instructions from rustup.rs
  2. Clone the repository (or download the source): git clone https://github.com/crepererum-oss/common-sense-coder.git cd common-sense-coder
  3. Build the release binary: cargo build --release
  4. The executable will be at: target/release/common-sense-coder
  5. Run the server (example for stdio MCP integration): ./target/release/common-sense-coder --workspace=.
  6. If integrating via an MCP configuration file, reference the binary path and pass any needed arguments, as shown in the example configuration.

Note: To discover all available arguments and environment variables, run: cargo run --release -- --help

Additional notes

Tips and notes:

  • The server is designed to bridge an LSP server (like rust-analyzer) with MCP, exposing two main capabilities: find things (explore the codebase) and details (retrieve comprehensive symbol information).
  • In MCP configurations, you typically run the released binary and expose it over stdio. Ensure the workspace you point to contains your codebase.
  • If you encounter permission or path issues, verify the absolute path to the binary and that it has execute permission (chmod +x path/to/binary).
  • Environment variables can be used to tweak logging or behavior if supported; start with an empty env object as shown in the example until you know which vars you need.
  • For debugging, you can inspect the command-line arguments passed to the binary and run cargo run --release -- --help to see supported options.
  • When integrating with Claude Code or other LLMs, ensure your MCP host is configured to forward responses in the expected MCP schema and that the LSP server (rust-analyzer) is available in the environment or configured through the MCP bridge.

Related MCP Servers

Sponsor this space

Reach thousands of developers