mcp-language-server  by isaacphi

MCP server for exposing language server to LLMs

created 7 months ago
754 stars

Top 47.1% on sourcepulse

GitHubView on GitHub
Project Summary

This project provides a language server that bridges MCP-enabled clients with various programming language servers, offering semantic code navigation features like definition lookup, reference finding, renaming, and diagnostics. It targets developers using AI-powered coding assistants that support the MCP protocol, enabling richer code understanding and manipulation within these environments.

How It Works

The server acts as an intermediary, translating MCP requests into standard Language Server Protocol (LSP) calls for underlying language servers (e.g., gopls, rust-analyzer, pyright). It manages the communication channel, forwarding requests and responses between the MCP client and the chosen LSP implementation. This approach allows MCP clients to leverage the sophisticated code analysis capabilities of established LSP servers without needing direct integration.

Quick Start & Requirements

  • Install: go install github.com/isaacphi/mcp-language-server@latest
  • Prerequisites: Go (installation instructions provided), and the desired language server (e.g., gopls, rust-analyzer, pyright, typescript-language-server, clangd).
  • Configuration: Requires configuring the MCP client (e.g., Claude Desktop) with the path to the mcp-language-server binary and specifying the target language server.
  • Links: Go Installation

Highlighted Details

  • Supports multiple language servers including Go, Rust, Python, TypeScript, and C/C++.
  • Enables semantic operations: definition, references, rename, diagnostics, hover, and file edits.
  • Utilizes edited code from gopls for LSP communication and mcp-go for MCP communication.
  • Includes integration tests with mock workspaces for Go, Rust, Python, and TypeScript.

Maintenance & Community

The project is marked as beta software. Contributions are welcomed via small Pull Requests, with issues encouraged for substantial changes. AI-generated code is accepted if tested and well-formed.

Licensing & Compatibility

Permissive BSD-style license. Compatible with commercial use and closed-source linking.

Limitations & Caveats

The project is in beta. Compatibility with language servers beyond those explicitly listed is not guaranteed, though it should work with any server communicating over stdio. Configuration details, especially environment variables, may vary significantly between MCP clients and user setups.

Health Check
Last commit

1 month ago

Responsiveness

Inactive

Pull Requests (30d)
6
Issues (30d)
5
Star History
553 stars in the last 90 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems), Travis Fischer Travis Fischer(Founder of Agentic), and
1 more.

fastmcp by punkpeye

3.7%
2k
TypeScript framework for building MCP servers handling client sessions
created 7 months ago
updated 2 days ago
Feedback? Help us improve.