適用於 AI 編碼代理的語言伺服器協定 (LSP)

適用於 AI 編碼代理的語言伺服器協定 (LSP)

Hacker News·

本文介紹了語言伺服器協定 (LSP) 及其在 AI 編碼代理中的應用,特別強調了 mcpls 專案,該專案作為一個通用的 MCP 到 LSP 橋樑。其目標是將 LSP 功能暴露為 AI 代理的 MCP 工具。

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

To see all available qualifiers, see our documentation.

Universal MCP to LSP bridge - expose Language Server Protocol capabilities as MCP tools for AI agents

License

Licenses found

Uh oh!

There was an error while loading. Please reload this page.

bug-ops/mcpls

Folders and files

Latest commit

History

Repository files navigation

mcpls

Image

Image

Image

Image

Image

Image

Stop treating code as text. Give your AI agent a compiler's understanding.

mcpls is a universal bridge between AI coding assistants and language servers. It exposes the full power of LSP — type inference, cross-reference analysis, semantic navigation — through the Model Context Protocol, enabling AI agents to reason about code the way IDEs do.

Why mcpls?

AI coding assistants are remarkably capable, but they're working blind. They see code as text, not as the structured, typed, interconnected system it actually is. When Claude asks "what type is this variable?" it's guessing from context. When it refactors a function, it's hoping it found all the callers.

mcpls changes that. By bridging MCP and LSP, it gives AI agents access to:

Tip

Zero configuration for Rust projects. Just install mcpls and a language server — ready to go.

Prerequisites

For Rust projects, install rust-analyzer:

Important

mcpls requires a language server to be installed. Without rust-analyzer, you'll see "LSP server process terminated unexpectedly" errors.

Installation

From crates.io

Pre-built binaries

Download from GitHub Releases:

From source

Quick Start

1. Configure Claude Code

Add mcpls to your MCP configuration (~/.claude/claude_desktop_config.json):

2. Configure language servers (optional)

For languages beyond Rust, create ~/.config/mcpls/mcpls.toml:

3. Experience the difference

MCP Tools

Code Intelligence

Diagnostics & Analysis

Refactoring

Call Hierarchy

Server Monitoring

Configuration

Environment Variables

Full Configuration Example

Note

See Configuration Reference for all options.

Supported Language Servers

mcpls works with any LSP 3.17 compliant server. Battle-tested with:

Architecture

Key design decisions:

Documentation

Development

Requirements: Rust 1.85+ (Edition 2024)

Contributing

Contributions welcome. See CONTRIBUTING.md for guidelines.

License

Dual-licensed under Apache 2.0 or MIT at your option.

mcpls — Because AI deserves to understand code, not just read it.

About

Universal MCP to LSP bridge - expose Language Server Protocol capabilities as MCP tools for AI agents

Topics

Resources

License

Licenses found

Contributing

Uh oh!

There was an error while loading. Please reload this page.

Stars

Watchers

Forks

Releases

  6

Uh oh!

There was an error while loading. Please reload this page.

Contributors

  2

Image

Image

Languages

Footer

Footer navigation

Hacker News

相關文章

  1. 你可能錯過的兩分鐘 Claude Code 升級:LSP

    大約 2 個月前

  2. AI能讀懂你的SaaS嗎?為何llms.txt優於MCP,造福開發者

    4 個月前

  3. 我創建了一個讓 AI 能進行運行時程式碼偵錯(斷點、逐行執行等)的 MCP

    3 個月前

  4. Show HN:mcp-apps-kit - 使用單一程式碼庫為 MCP Apps 和 ChatGPT 建置 AI 應用程式

    3 個月前

  5. 種種跡象顯示 MCP 正在走向終結

    大約 2 個月前