lsmcp  by mizchi

LSP server for headless AI agents

Created 3 months ago
396 stars

Top 72.8% on SourcePulse

GitHubView on GitHub
Project Summary

lsmcp provides a unified interface for Language Server Protocol (LSP) clients, enabling AI agents and developers to perform advanced code manipulation and analysis across multiple programming languages. It acts as a central hub, abstracting away the complexities of individual LSP server configurations and offering a consistent API for operations like code completion, refactoring, and semantic analysis.

How It Works

lsmcp leverages the Language Server Protocol (LSP) to communicate with language-specific servers. It acts as a proxy, routing requests from a client application to the appropriate LSP server based on the language. The project supports pre-configured integrations for popular languages like TypeScript, Rust, Go, and Python, and allows for custom configurations for any language with an LSP server. This approach centralizes language tooling, making it easier for AI agents to integrate and utilize code intelligence features.

Quick Start & Requirements

  • Install: claude mcp add <language> <command> (e.g., claude mcp add typescript npx -- -y @mizchi/lsmcp -p typescript)
  • Prerequisites: Language-specific LSP servers (e.g., typescript-language-server, rust-analyzer, gopls). Node.js and npm/pnpm are used for installation and execution.
  • Setup: Requires installing the core lsmcp package and the relevant LSP server for each language. Configuration can be done via the claude CLI or .mcp.json files.
  • Links: Examples

Highlighted Details

  • Supports a wide range of LSP-based code intelligence features: go-to-definition, find references, diagnostics, code completion, refactoring, and more.
  • Offers built-in presets for popular languages and extensive customization options for any LSP server via command-line arguments, configuration files, or environment variables.
  • Designed for headless AI agents, providing line and symbol-based interfaces for efficient integration.

Maintenance & Community

The project is under active development, with potential for API and feature changes. Further community and development guidelines can be found in CLAUDE.md.

Licensing & Compatibility

MIT License. Compatible with commercial and closed-source applications.

Limitations & Caveats

The project is under active development, meaning APIs and features may change without notice. Some LSP server integrations might require specific versions or configurations to function correctly. Troubleshooting common issues like "LSP server not found" or "Permission denied" may require manual intervention.

Health Check
Last Commit

3 days ago

Responsiveness

1 day

Pull Requests (30d)
15
Issues (30d)
1
Star History
43 stars in the last 30 days

Explore Similar Projects

Starred by Alex Yu Alex Yu(Research Scientist at OpenAI; Former Cofounder of Luma AI), Will Brown Will Brown(Research Lead at Prime Intellect), and
7 more.

avante.nvim by yetone

0.5%
16k
Neovim plugin emulating Cursor AI IDE for AI-driven code assistance
Created 1 year ago
Updated 16 hours ago
Feedback? Help us improve.