mcpls

io.github.bug-ops由 GitHub 账号 bug-ops 发布v0.9.1更新于 Nov 3, 2026

Universal MCP to LSP bridge exposing language server code intelligence as MCP tools

已验证STDIO仅桌面开发者工具AI 与机器学习

概览

AI 生成的概览

把 MCP 与语言服务器(LSP)桥接起来,让 AI 助手获得类型、引用、诊断和重构等 IDE 级代码理解能力。

可以做什么
  • 查看代码:按位置或符号名获取悬停类型信息与文档
  • 导航:定义、引用、实现、调用层级与类型层级
  • 检查:来自语言服务器的真实编译器诊断
  • 修改:返回重命名与代码操作编辑,交由客户端应用
  • 探索:跨多个语言服务器的工作区符号搜索、格式化、内联提示、选区与折叠范围
  • 管理:按需重启语言服务器
适用场景
适合希望 AI 编程助手像 IDE 一样理解真实项目的场景,例如解析类型、查找全部引用、获取编译器诊断而非猜测,尤其适用于 Rust、Python、Go 或多语言工作区。
运行要求
以单个 Rust 二进制在本地运行,可通过 Cargo 或提供的安装脚本安装。需要为目标语言安装至少一个语言服务器(例如 rust-analyzer)。默认使用 stdio,可选 HTTP 传输并支持 Host 与 Origin 白名单。未声明任何凭据。
安装前请注意
语言服务器会执行随工作区附带的代码,而 mcpls 不对其进行沙箱隔离;在指向非自己编写的代码前请先阅读安全文档。重命名与代码操作工具会返回编辑内容并由客户端应用,因此可能改动文件。针对不可信代码提供了 untrusted-workspace 模式。

安装

在 SourceWeft 中

  1. 打开 控制台中的 mcpls,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

mcpls

[Crates.io] [docs.rs] [CI] [codecov] [MSRV] [License]

Give your AI coding agent a compiler's understanding of your code.

mcpls is a bridge between the Model Context Protocol (MCP) and the Language Server Protocol (LSP). It runs the language servers for your project (rust-analyzer, pyright, gopls, and others) and exposes their type information, references, diagnostics and refactoring as 31 MCP tools, so an AI client reasons about code the way an IDE does.

mermaid
flowchart LR    C["AI client"] <-->|MCP| M["mcpls"] <-->|LSP| S["rust-analyzer / pyright / gopls / ..."]

Documentation

The full documentation is the mcpls book: https://bug-ops.github.io/mcpls/

TopicChapter
Install and first runInstallation
Connect Claude Code or another clientConnect an AI Client
Configure language serversConfiguration
All 31 toolsTools Overview
Something does not workTroubleshooting
HTTP transport and allowlistsTransports
Security model and untrusted workspacesSecurity and Trust
Every flag and config keyReference

Installation

Linux and macOS:

bash
curl -fsSL https://raw.githubusercontent.com/bug-ops/mcpls/main/scripts/install.sh | sh

Windows (PowerShell):

powershell
irm https://raw.githubusercontent.com/bug-ops/mcpls/main/scripts/install.ps1 | iex

Or with Cargo:

bash
cargo install mcpls

Prebuilt archives for Linux, macOS and Windows (x86_64 and aarch64) with SHA256 checksums and build-provenance attestations are on GitHub Releases.

mcpls is also listed in the official MCP Registry as io.github.bug-ops/mcpls (cargo package, stdio transport), so registry-aware clients can discover it there. The listing installs the same crate as cargo install mcpls.

You also need at least one language server, for example rustup component add rust-analyzer. See Installation for other methods and servers.

Quick start

Register mcpls with Claude Code:

bash
claude mcp add --scope user mcpls -- mcpls

Then ask about your code:

text
You:    What is the return type of process_request?Claude: [get_hover] It returns Result<Response, ApiError>.
You:    Find everywhere ApiError::Timeout is handled.Claude: [get_references] Found 4 matches: src/handlers/api.rs:89, ...

Rust projects need no configuration. Other languages and clients are covered in the book.

Features

  • Type information and documentation at any position
  • Cross-references, definitions, implementations across the whole workspace
  • Real diagnostics from the compiler, not guesses
  • Rename and code-action edits returned for the client to apply
  • Call and type hierarchies, formatting, inlay hints, selection and folding ranges
  • Workspace symbol search across every language server of a polyglot project, with each symbol tagged by its server
  • Address code by symbol name as well as by position, and restart language servers on demand
  • Several language servers at once, started concurrently and stopped with mcpls, with graceful degradation when one fails
  • stdio by default, optional HTTP transport with Host and Origin allowlists and resource subscriptions
  • Untrusted-workspace mode for analyzing code you do not trust
  • Single Rust binary, no runtime dependencies, no unsafe code; release archives carry build-provenance attestations

Security

Language servers run code that comes with the workspace, and mcpls does not sandbox them. Read SECURITY.md and the Security and Trust chapter before pointing mcpls at code you did not write.

Agent skill

skills/mcpls is a packaged Agent Skill that teaches an AI coding agent to install, configure and run mcpls.

Development

bash
cargo buildcargo nextest run --workspace --all-features

Requires Rust 1.99 or later (edition 2024). The book lives in book/ and is built with mdBook. See CONTRIBUTING.md.

Community

Participation is governed by the Code of Conduct. Accessibility of the output and documentation is described in ACCESSIBILITY.md.

License

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

来源:README.md,提交 f13ba47

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

2
  1. v0.9.1最新Nov 3, 2026
  2. v0.9.0Nov 1, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分