Logo Mcpls

Mcpls

Cộng đồng
bug-ops

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

Nhà phát hànhbug-ops
Kho mãmcpls
Ngôn ngữRust
Bản fork
18
Sao
74
Công cụ có sẵn
0
Phương thức truyền tảistdio
Danh mục
Giấy phépApache-2.0
Liên kết
  • Kết nối công cụ với quy trình làm việc AI

    Mcpls cung cấp các khả năng MCP mà ứng dụng khách và tác nhân AI tương thích có thể sử dụng.

  • 0 công cụ có sẵn

    Xem các thao tác có thể gọi bên dưới, kèm tên và mô tả nếu máy chủ cung cấp.

  • Cấu hình sẵn để sao chép

    Dùng các đoạn cấu hình cài đặt mẫu để thiết lập máy chủ này trong ứng dụng khách MCP bạn muốn dùng.

  • Chỉ số quan tâm đến mã nguồn mở

    74 sao và 18 bản fork từ kho mã được liên kết.

mcpls

Crates.io docs.rs CI codecov MSRV License

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.

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

  • Type information — Know exactly what a variable is, not what it might be
  • Cross-references — Find every usage of a symbol across your entire codebase
  • Semantic navigation — Jump to definitions, implementations, type declarations
  • Real diagnostics — See actual compiler errors, not hallucinated ones
  • Safe refactoring — Rename symbols with confidence, workspace-wide

[!TIP] Zero configuration for Rust projects. Just install mcpls and rust-analyzer — ready to go.

Installation

Linux / 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

Both scripts detect your OS/architecture, download the matching release archive, verify its SHA256 checksum, and install mcpls to a per-user directory (~/.local/bin on Linux/macOS, $HOME\.local\bin on Windows) — no sudo/admin rights required.

Cargo:

bash
cargo install mcpls

Manual download:

Download the archive matching your platform from GitHub Releases. Each archive has a corresponding .sha256 checksum file published alongside it — the install scripts above verify this automatically; verify manually if downloading by hand.

PlatformArchitectureArchive
Linuxx86_64mcpls-x86_64-unknown-linux-gnu.tar.gz
Linuxaarch64mcpls-aarch64-unknown-linux-gnu.tar.gz
macOSIntelmcpls-x86_64-apple-darwin.tar.gz
macOSApple Siliconmcpls-aarch64-apple-darwin.tar.gz
Windowsx86_64mcpls-x86_64-pc-windows-msvc.zip
WindowsARM64mcpls-aarch64-pc-windows-msvc.zip

From source:

bash
git clone https://github.com/bug-ops/mcpls
cd mcpls
cargo install --path crates/mcpls-cli

mcpls uses graceful degradation — if one language server fails, it continues with available servers.

Rust (rust-analyzer):

bash
rustup component add rust-analyzer
# Or: brew install rust-analyzer (macOS)

Python (pyright, built-in default):

bash
npm install -g pyright

Python (ty, with custom configuration):

bash
uv tool install ty@latest

TypeScript:

bash
npm install -g typescript-language-server typescript

Go (gopls):

bash
go install golang.org/x/tools/gopls@latest

[!IMPORTANT] At least one language server must be available.

Quick Start

1. Configure Claude Code (~/.claude/claude_desktop_config.json):

json
{
  "mcpServers": {
    "mcpls": {
      "command": "mcpls",
      "args": []
    }
  }
}

2. Experience the difference:

You: What's the return type of process_request on line 47?

Claude: [get_hover] It returns Result<Response, ApiError> where:
        - Response is defined in src/types.rs:23
        - ApiError is an enum with variants: Network, Parse, Timeout

You: Find everywhere ApiError::Timeout is handled

Claude: [get_references] Found 4 matches:
        - src/handlers/api.rs:89 — retry logic
        - src/handlers/api.rs:156 — logging
        - src/middleware/timeout.rs:34 — wrapper
        - tests/api_tests.rs:201 — test case

MCP Tools

Names below are the defaults; if the bridge is configured with mcp.tool_prefix, every tool name gains that prefix ({tool_prefix}_{tool}).

get_diagnostics, get_definition, get_references, and get_document_symbols also publish a structured outputSchema, so MCP clients that support structured tool output get typed structuredContent alongside the text response.

ToolWhat it does
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_signature_helpParameter info and active signature while typing a call
go_to_implementationJump to implementations of a trait method or interface member
go_to_type_definitionJump to the type definition of an expression, distinct from get_definition for variable bindings
get_inlay_hintsInferred type/parameter annotations an editor would render inline
ToolWhat it does
get_diagnosticsReal compiler errors and warnings, not guesses
get_cached_diagnosticsFast access to push-based diagnostics from LSP server
get_code_actionsQuick fixes, refactorings, and source actions at a position
ToolWhat it does
rename_symbolWorkspace-wide rename with full reference tracking
format_documentApply language-specific formatting rules
prepare_call_hierarchyGet callable items at a position for call hierarchy
get_incoming_callsFind all callers of a function (who calls this?)
get_outgoing_callsFind all callees of a function (what does this call?)
ToolWhat it does
get_server_logsDebug LSP issues with internal log messages
get_server_messagesUser-facing messages from the language server

Configuration

mcpls uses smart heuristics to spawn only relevant language servers. Each server checks for project markers before starting.

LanguageServerProject Markers
Rustrust-analyzerCargo.toml, rust-toolchain.toml
Pythonpyrightpyproject.toml, setup.py, requirements.txt
TypeScripttypescript-language-serverpackage.json, tsconfig.json
Gogoplsgo.mod, go.sum
C/C++clangdCMakeLists.txt, compile_commands.json, Makefile
Zigzlsbuild.zig, build.zig.zon

[!TIP] Heuristics use OR logic — if ANY marker exists, the server spawns.

Custom heuristics:

toml
[[lsp_servers]]
language_id = "rust"
command = "rust-analyzer"

[lsp_servers.heuristics]
project_markers = ["Cargo.toml", "rust-toolchain.toml", ".rust-version"]
VariableDescriptionDefault
MCPLS_CONFIGPath to configuration fileAuto-detected
MCPLS_TRUST_PROJECT_CONFIGLoad a ./mcpls.toml found in the current directoryfalse
MCPLS_LOGLog level (trace, debug, info, warn, error)info
MCPLS_LOG_JSONOutput logs as JSONfalse

[!NOTE] The two boolean flags above accept 1/0, true/false, yes/no, y/n, and on/off (case-insensitive).

Config file locations:

PlatformDefault Location
Linux$XDG_CONFIG_HOME/mcpls/mcpls.toml, else ~/.config/mcpls/mcpls.toml
macOS~/Library/Application Support/mcpls/mcpls.toml
Windows%APPDATA%\mcpls\mcpls.toml

[!WARNING] A ./mcpls.toml in the current directory is not loaded automatically: it can control which command mcpls spawns as an LSP server, so running mcpls against an untrusted checkout must not execute commands from that checkout without explicit consent. Pass --trust-project-config (or set MCPLS_TRUST_PROJECT_CONFIG=true) only for repositories you trust.

toml
[mcp]
title = "My Custom Bridge"
description = "Internal LSP bridge for Acme Corp"
instructions = "Use get_hover before get_definition."
tool_prefix = "optics"

[workspace]
roots = ["/path/to/project"]
heuristics_max_depth = 10
max_documents = 100    # 0 = unlimited
max_file_size = 10485760  # bytes, 0 = unlimited

[[lsp_servers]]
language_id = "rust"
command = "rust-analyzer"
args = []
file_patterns = ["**/*.rs"]
timeout_seconds = 30
request_timeout_seconds = 30

[lsp_servers.heuristics]
project_markers = ["Cargo.toml", "rust-toolchain.toml"]

[lsp_servers.initialization_options]
cargo.features = "all"
checkOnSave.command = "clippy"

[[language_extensions]]
extensions = ["nu"]
language_id = "nushell"

[!NOTE] [mcp] is entirely optional — omitting it (or any of its four fields) keeps mcpls's built-in serverInfo/instructions text unchanged. A configured instructions replaces the built-in capability blurb rather than appending to it.

See Configuration Reference for all options.

By default, mcpls communicates over stdin/stdout. You can expose it as an HTTP server using the --listen flag:

bash
mcpls --listen 127.0.0.1:8080

[!WARNING] mcpls performs no authentication on any transport, including HTTP. When binding to a non-loopback address (e.g., 0.0.0.0:8080), you must place mcpls behind a reverse proxy that:

  • Enforces authentication before forwarding requests
  • Rewrites the Host header (rmcp's host validation only allows localhost, 127.0.0.1, or ::1 by default)

Example (nginx):

nginx
location / {
    auth_request /auth;
    proxy_pass http://localhost:8080;
    proxy_set_header Host localhost;
}

Supported Language Servers

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

LanguageServerNotes
Rustrust-analyzerZero-config, built-in support
Pythonpyright (default), tyFull type inference
TypeScript/JStypescript-language-serverJSX/TSX support
GogoplsModules and workspaces
C/C++clangdcompile_commands.json
JavajdtlsMaven/Gradle projects
Zigzlsbuild.zig support
And 24+ othersAny LSP 3.17 serverSee docs

Architecture

Key design decisions:

  • Single binary — No Node.js, Python, or other runtime dependencies
  • Async-first — Tokio-based, handles multiple LSP servers concurrently
  • Memory-safe — Pure Rust, zero unsafe blocks
  • Resource-bounded — Configurable limits on documents and file sizes

Documentation

Development

bash
cargo build              # Build
cargo nextest run        # Test
cargo run -- --log-level debug  # Run locally

Requirements: Rust 1.88+ (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.

Cài đặt

TypingMind
{
  "mcpServers": {
    "mcpls": {
      "command": "mcpls",
      "args": []
    }
  }
}

Dùng MCP Mcpls với nhiều mô hình AI

TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên sau khi kết nối Mcpls, bạn có thể dùng với nhiều mô hình AI khác nhau trong TypingMind thay vì phải thiết lập riêng cho từng mô hình. MCP này chạy cục bộ thông qua trình kết nối MCP của TypingMind trên thiết bị của bạn.

Hướng dẫn thiết lập để dùng trình kết nối cục bộ

Dùng cách này khi máy chủ MCP cần truy cập các tệp, ứng dụng hoặc tài nguyên riêng tư trên máy tính của bạn.

1

Mở cài đặt MCP

Trong TypingMind, vào Cài đặt, Cài đặt nâng cao, rồi đến Giao thức ngữ cảnh mô hình và chọn Cài trình kết nối.

  1. Mở TypingMind trong trình duyệt của bạn.
  2. Nhấp vào biểu tượng Cài đặt.
  3. Vào Cài đặt nâng cao.
  4. Mở mục Giao thức ngữ cảnh mô hình.
  5. Nhấp vào Cài trình kết nối rồi chọn Thiết bị này.
Màn hình thiết lập trình kết nối MCP của TypingMind với tùy chọn Thiết bị này được chọn
2

Chạy lệnh trình kết nối

Chọn Thiết bị này, sao chép lệnh từ TypingMind và chạy trong Terminal. Giữ tiến trình chạy trong khi bạn dùng MCP.

  1. Sao chép lệnh thiết lập hiển thị trong TypingMind.
  2. Mở Terminal trên macOS hoặc Windows Terminal trên Windows.
  3. Dán và chạy lệnh.
  4. Xác nhận cài đặt gói nếu Terminal hỏi bạn có muốn tiếp tục không.
  5. Giữ tiến trình trong cửa sổ Terminal chạy trong khi dùng các công cụ MCP.
3

Thêm Mcpls làm máy chủ

Khi trạng thái trình kết nối là Sẵn sàng, nhấp vào Sửa máy chủ và dán cấu hình máy chủ MCP.

  1. Đợi đến khi trạng thái trình kết nối hiển thị Sẵn sàng.
  2. Nhấp vào Sửa máy chủ.
  3. Dán cấu hình máy chủ MCP của Mcpls.
  4. Lưu danh sách máy chủ.
  5. Làm mới nếu bạn muốn xác nhận trình kết nối vẫn sẵn sàng.
Cài đặt MCP của TypingMind hiển thị máy chủ đang hoạt động và nút Sửa máy chủ
{
  "mcpServers": {
    "mcpls": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Dùng kết nối với nhiều mô hình

Lưu danh sách máy chủ, mở Plugin, bật các công cụ MCP của Mcpls, sau đó chọn bất kỳ mô hình AI nào được hỗ trợ trong TypingMind và dùng các công cụ trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.

  1. Mở trang Plugin trong TypingMind.
  2. Bật các công cụ MCP của Mcpls.
  3. Bắt đầu cuộc trò chuyện và chọn mô hình AI bạn muốn dùng.
  4. Dùng các công cụ MCP trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.
  5. Chuyển sang mô hình AI khác bất cứ khi nào cần mà không phải kết nối lại MCP.
Cuộc trò chuyện TypingMind dùng các công cụ MCP đã bật với một mô hình AI được chọn
Bạn có thể dùng Mcpls giúp tôi làm việc này không?
Mcpls
Được. Tôi đã đọc.
Đây là kết quả tôi tìm được bằng Mcpls.

Câu hỏi thường gặp

Máy chủ MCP Mcpls dùng để làm gì?

Mcpls là máy chủ MCP cho phép các ứng dụng AI tương thích kết nối với công cụ và ngữ cảnh bên ngoài. Trong TypingMind, bạn chỉ cần thêm máy chủ MCP này một lần để các công cụ của nó có sẵn trong không gian làm việc AI của bạn.

Bạn có thể dùng MCP Mcpls với nhiều mô hình AI trong TypingMind không?

Có. TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên bạn có thể dùng Mcpls với nhiều mô hình AI như Claude, ChatGPT, Gemini hoặc các mô hình khác đã cấu hình trong TypingMind mà không cần thiết lập máy chủ MCP riêng cho từng mô hình.

Vì sao nên dùng MCP Mcpls với TypingMind?

TypingMind là một trong những giao diện trò chuyện với LLM tốt nhất vì tập hợp nhiều mô hình AI, prompt, plugin, tác nhân AI, khóa API và công cụ MCP vào một không gian làm việc. Khi kết nối Mcpls, bạn có thể dùng các công cụ MCP của dịch vụ này với những mô hình ưa thích, đồng thời giữ quy trình trò chuyện gọn gàng trong TypingMind.

Làm cách nào để kết nối MCP Mcpls với TypingMind?

Mcpls hoạt động thông qua trình kết nối MCP cục bộ của TypingMind. Đây là lựa chọn phù hợp nhất khi máy chủ MCP cần truy cập tệp cục bộ, ứng dụng máy tính, công cụ dòng lệnh hoặc tài nguyên riêng trên máy tính của bạn.

MCP Mcpls cung cấp những công cụ nào trong TypingMind?

Mcpls cung cấp các chức năng MCP mà bạn có thể bật từ trang Plugin của TypingMind để dùng trong trò chuyện hoặc gán cho tác nhân AI.

Bạn có cần chia sẻ khóa API với TypingMind để dùng MCP Mcpls không?

Không. TypingMind ưu tiên xử lý cục bộ và cho phép bạn kiểm soát nhà cung cấp mô hình, khóa API, prompt và cấu hình MCP. Nếu Mcpls yêu cầu xác thực, hãy thêm các header, cài đặt OAuth hoặc cấu hình cục bộ cần thiết cho máy chủ MCP đó khi tạo kết nối.

Máy chủ MCP liên quan

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇