mcpls
by bug-ops·★ 34·综合分 46
通用 MCP 到 LSP 桥接器,将语言服务器协议功能作为 MCP 工具暴露给 AI 代理。
概述
mcpls 是 AI 编程助手与语言服务器之间的通用桥接器。它通过模型上下文协议(MCP)展示了 LSP 的全部功能,包括类型推断、交叉引用分析和语义导航,使 AI 代理能够像 IDE 那样理解代码。该工具为 AI 代理提供类型信息、交叉引用、语义导航、实时诊断和安全重构能力。
试试问 AI
装完之后,这里有 5 个你可以让 AI 做的事:
什么时候选它
当您需要 AI 编程助手超越文本处理,获得对代码库的深度结构化理解,包括访问类型系统、交叉引用和实时诊断时,选择 mcpls。
什么时候不要选它
如果您主要使用不支持 LSP 的语言或需要超出重构范围的功能写入能力,不要选择 mcpls,因为它专注于通过 MCP 暴露只读的 LSP 智能。
此 server 暴露的工具
从 README 抽取出 12 个工具get_hoverType signatures, documentation, inferred types at any position
get_definitionJump to where a symbol is defined — across files, across crates
get_referencesEvery usage of a symbol in your workspace
get_completionsContext-aware suggestions that respect types and scope
get_document_symbolsStructured outline — functions, types, constants, imports
workspace_symbol_searchFind symbols by name across the entire workspace
get_diagnosticsReal compiler errors and warnings, not guesses
get_code_actionsQuick fixes, refactorings, and source actions at a position
rename_symbolWorkspace-wide rename with full reference tracking
format_documentApply language-specific formatting rules
get_incoming_callsFind all callers of a function (who calls this?)
get_outgoing_callsFind all callees of a function (what does this call?)
可对比工具
安装
安装
cargo install mcpls或从 GitHub Releases 下载预构建的二进制文件。
配置 Claude Code
添加到 ~/.claude/claude_desktop_config.json:
{
"mcpServers": {
"mcpls": {
"command": "mcpls",
"args": []
}
}
}先决条件
安装至少一个语言服务器:
- Rust:
rustup component add rust-analyzer - Python:
npm install -g pyright - TypeScript:
npm install -g typescript-language-server typescript - Go:
go install golang.org/x/tools/gopls@latest
FAQ
- 支持哪些语言服务器?
- mcpls 支持任何符合 LSP 3.17 的服务器,包括 rust-analyzer、pyright、typescript-language-server、gopls、clangd、jdtls、zls 和 24+ 其他服务器。
- mcpls 是否需要配置?
- 使用 rust-analyzer 的 Rust 项目无需配置。对于其他语言,mcpls 使用智能启发式方法,根据项目标记只启动相关的语言服务器。
Hacker News 讨论
开发者社区最近的相关讨论。
- 帖子 by bug-ops · 2026-01-04
mcpls 对比
最后更新于 · 由 README + GitHub 公开数据自动生成。