MCP Catalogs
首页

mcpls

by bug-ops·34·综合分 46

通用 MCP 到 LSP 桥接器,将语言服务器协议功能作为 MCP 工具暴露给 AI 代理。

developer-toolsai-llmops-infra
8
Forks
25
活跃 Issue
本月
最近提交
2 天前
收录于

概述

mcpls 是 AI 编程助手与语言服务器之间的通用桥接器。它通过模型上下文协议(MCP)展示了 LSP 的全部功能,包括类型推断、交叉引用分析和语义导航,使 AI 代理能够像 IDE 那样理解代码。该工具为 AI 代理提供类型信息、交叉引用、语义导航、实时诊断和安全重构能力。

试试问 AI

装完之后,这里有 5 个你可以让 AI 做的事:

:通过真实的类型信息和交叉引用增强 AI 代码分析
:通过符号重命名实现整个代码库的安全重构
:提供来自实际编译器错误的准确诊断
:支持哪些语言服务器?
:mcpls 是否需要配置?

什么时候选它

当您需要 AI 编程助手超越文本处理,获得对代码库的深度结构化理解,包括访问类型系统、交叉引用和实时诊断时,选择 mcpls。

什么时候不要选它

如果您主要使用不支持 LSP 的语言或需要超出重构范围的功能写入能力,不要选择 mcpls,因为它专注于通过 MCP 暴露只读的 LSP 智能。

此 server 暴露的工具

从 README 抽取出 12 个工具
  • get_hover

    Type signatures, documentation, inferred types at any position

  • get_definition

    Jump to where a symbol is defined — across files, across crates

  • get_references

    Every usage of a symbol in your workspace

  • get_completions

    Context-aware suggestions that respect types and scope

  • get_document_symbols

    Structured outline — functions, types, constants, imports

  • workspace_symbol_search

    Find symbols by name across the entire workspace

  • get_diagnostics

    Real compiler errors and warnings, not guesses

  • get_code_actions

    Quick fixes, refactorings, and source actions at a position

  • rename_symbol

    Workspace-wide rename with full reference tracking

  • format_document

    Apply language-specific formatting rules

  • get_incoming_calls

    Find all callers of a function (who calls this?)

  • get_outgoing_calls

    Find all callees of a function (what does this call?)

可对比工具

mcp-xrefide-mcplsp-mcp-bridgesemantic-mcp

安装

安装

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 讨论

开发者社区最近的相关讨论。

mcpls 对比

GitHub →

最后更新于 · 由 README + GitHub 公开数据自动生成。