← 开源
isaacphi

mcp-language-server

mcp-language-server gives MCP enabled clients access semantic tools like get definition, references, rename, and diagnostics.

AI EngineeringGive agent toolsGo
在 GitHub 打开
增长势头
+024 小时新增 Star0.0%
1.61k
Star
151
Fork
+1
本周
4
贡献者
创建于 2024-12-30 · 更新于 2026-10-14 · 今日第 9868 名
主要开发者
isaacphiShamazotino

isaacphi/mcp-language-server 排名第 9,868,有 1,609 个星标。

同类别比较

isaacphi/mcp-language-server 排名第 9,868,此处有 8 个同类条目;langchain-ai/deepagentsjs 排名第 9,869。

同类别比较
名称排名指标
hendrycks/test9,830
语言:
Python
星标数:
1,625
分叉数:
121
简介:
Measuring Massive Multitask Language Understanding | ICLR 2021
svnscha/mcp-windbg9,840
语言:
Python
星标数:
1,620
分叉数:
167
简介:
Model Context Protocol for WinDbg.
ray-r-ren/agent-apprenticeship9,847
语言:
Python
星标数:
1,616
分叉数:
64
简介:
The living ecosystem where AI agents complete tasks through workflow loops, improve through iterative execution, are evaluated by mentor agents or humans in the loop, and turn completed work into reusable work experience and data to improve future agents.
actionbook/actionbook9,849
语言:
Rust
星标数:
1,615
分叉数:
121
简介:
Let your AI agent get the sources behind logins and paywalls.
langchain-ai/deepagentsjs9,869
语言:
TypeScript
星标数:
1,609
分叉数:
283
简介:
The batteries included agent harness.
AlibabaResearch/DAMO-ConvAI9,871
语言:
Python
星标数:
1,607
分叉数:
253
简介:
DAMO-ConvAI: The official repository which contains the codebase for Alibaba DAMO Conversational AI.
BytedanceSpeech/seed-tts-eval9,877
语言:
Python
星标数:
1,606
分叉数:
147
datagouv/datagouv-mcp9,886
语言:
Python
星标数:
1,602
分叉数:
145
简介:
Official data.gouv.fr Model Context Protocol (MCP) server that allows AI chatbots to search, explore, and analyze datasets from the French national Open Data platform, directly through conversation.
关键参数与规格
关键参数与规格
参数值
语言Go
类别AI Engineering
子类别Give agent tools
关键词MCP
星标数1,609
分叉数151
贡献者4
创建日期2024-12-30
更新日期2026-10-14
1 天星标数0
7 天星标数1
排名9,868
上次排名9,903
排名变化35
7 天星标排名9,716
上次 7 天星标排名9,771
7 天星标排名变化55
总星标排名7,627
上次总星标排名7,624
总星标排名变化-3
README 摘录

MCP Language Server This is an MCP server that runs and exposes a language server to LLMs. Not a language server for MCP, whatever that would be. Demo helps MCP enabled clients navigate codebases more easily by giving them access semantic tools like get definition, references, rename, and diagnostics. **Install Go**: Follow instructions at 2. **Install a language server**: _follow one of the guides below_ 4. **Configure your MCP client**: _follow one of the guides below_ Go (gopls) Note : Not

all clients will need these environment variables. For Claude Desktop you will need to update the environment variables above based on your machine and username: needs to contain the path to and to . Get this with , , and may be different on your machine. Rust (rust-analyzer) Python (pyright) Typescript (typescript-language-server) C/C++ (clangd) Other Tools : Retrieves the complete source code definition of any symbol (function, type, constant, etc. : Locates all usages and references of a symbol throughout the

codebase. : Provides diagnostic information for a specific file, including warnings and errors. : Display documentation, type hints, or other hover information for a given location. : Allows making multiple text edits to a file based on line numbers. Provides a more reliable and context-economical way to edit files compared to search and replace based edit tools. About This codebase makes use of edited code from gopls to handle LSP communication. Everything here is covered by a permissive BSD style license. Please

let me know by creating an issue if you run into any problems or have suggestions of any kind. Contributing Please keep PRs small and open Issues first for anything substantial. as long as it is tested, passes checks, and doesn't smell too bad. Setup Clone the repo: A justfile is included for convenience: Configure your Claude Desktop (or similar) to use the local binary: Rebuild after making changes. Logging Setting the environment variable to DEBUG enables verbose logging to

stderr for all components including messages to and from the language server and the language server's logs. LSP interaction contains generated code to make calls to the connected language server. LSP allows language servers to return different types for the same methods. Go doesn't like this so there are some ugly workarounds in . Local Development and Snapshot Tests There is a snapshot test suite that makes it a lot easier to try out changes to tools. These run actual language

servers on mock workspaces and capture output and logs. You will need the language servers installed locally to run them. There are tests for go, rust, python, and typescript.

常见问题

记录了多少星标和分叉?

isaacphi/mcp-language-server 有 1,609 个星标和 151 个分叉。

仓库排名是多少?

isaacphi/mcp-language-server 排名第 9,868。

记录的语言和类别是什么?

isaacphi/mcp-language-server 有 1,609 个星标,语言为 Go,类别为 AI Engineering。

哪个仓库排名最接近?

isaacphi/mcp-language-server 与 langchain-ai/deepagentsjs 比较,后者排名第 9,869,有 1,609 个星标。

README

MCP Language Server

This is an MCP server that runs and exposes a language server to LLMs. Not a language server for MCP, whatever that would be.

Demo

mcp-language-server helps MCP enabled clients navigate codebases more easily by giving them access semantic tools like get definition, references, rename, and diagnostics.

Setup

  1. Install Go: Follow instructions at
  2. Install or update this server: go install github.com/isaacphi/mcp-language-server@latest
  3. Install a language server: follow one of the guides below
  4. Configure your MCP client: follow one of the guides below

Go (gopls)

Install gopls: go install golang.org/x/tools/gopls@latest

Configure your MCP client: This will be different but similar for each client. For Claude Desktop, add the following to ~/Library/Application\ Support/Claude/claude_desktop_config.json

{ "mcpServers": { "language-server": { "command": "mcp-language-server", "args": ["--workspace", "/Users/you/dev/yourproject/", "--lsp", "gopls"], "env": { "PATH": "/opt/homebrew/bin:/Users/you/go/bin", "GOPATH": "/users/you/go", "GOCACHE": "/users/you/Library/Caches/go-build", "GOMODCACHE": "/Users/you/go/pkg/mod" } } } }

Note: Not all clients will need these environment variables. For Claude Desktop you will need to update the environment variables above based on your machine and username:

PATH needs to contain the path to go and to gopls. Get this with echo $(which go):$(which gopls) GOPATH, GOCACHE, and GOMODCACHE may be different on your machine. These are the defaults.

Rust (rust-analyzer)

Install rust-analyzer: rustup component add rust-analyzer

Configure your MCP client: This will be different but similar for each client. For Claude Desktop, add the following to ~/Library/Application\ Support/Claude/claude_desktop_config.json

{ "mcpServers": { "language-server": { "command": "mcp-language-server", "args": [ "--workspace", "/Users/you/dev/yourproject/", "--lsp", "rust-analyzer" ] } } }

Python (pyright)

Install pyright: npm install -g pyright

Configure your MCP client: This will be different but similar for each client. For Claude Desktop, add the following to ~/Library/Application\ Support/Claude/claude_desktop_config.json

{ "mcpServers": { "language-server": { "command": "mcp-language-server", "args": [ "--workspace", "/Users/you/dev/yourproject/", "--lsp", "pyright-langserver", "--", "--stdio" ] } } }

Typescript (typescript-language-server)

Install typescript-language-server: npm install -g typescript typescript-language-server

Configure your MCP client: This will be different but similar for each client. For Claude Desktop, add the following to ~/Library/Application\ Support/Claude/claude_desktop_config.json

{ "mcpServers": { "language-server": { "command": "mcp-language-server", "args": [ "--workspace", "/Users/you/dev/yourproject/", "--lsp", "typescript-language-server", "--", "--stdio" ] } } }

C/C++ (clangd)

Install clangd: Download prebuilt binaries from the official LLVM releases page or install via your system's package manager (e.g., apt install clangd, brew install clangd).

Configure your MCP client: This will be different but similar for each client. For Claude Desktop, add the following to ~/Library/Application\ Support/Claude/claude_desktop_config.json

{ "mcpServers": { "language-server": { "command": "mcp-language-server", "args": [ "--workspace", "/Users/you/dev/yourproject/", "--lsp", "/path/to/your/clangd_binary", "--", "--compile-commands-dir=/path/to/yourproject/build_or_compile_commands_dir" ] } } }

Note:

  Replace /path/to/your/clangd_binary with the actual path to your clangd executable.
  --compile-commands-dir should point to the directory containing your compile_commands.json file (e.g., ./build, ./cmake-build-debug).
  Ensure compile_commands.json is generated for your project for clangd to work effectively.

Other

I have only tested this repo with the servers above but it should be compatible with many more. Note:

  The language server must communicate over stdio.
  Any aruments after -- are sent as arguments to the language server.
  Any env variables are passed on to the language server.

Tools

  • definition: Retrieves the complete source code definition of any symbol (function, type, constant, etc.) from your codebase.
  • references: Locates all usages and references of a symbol throughout the codebase.
  • diagnostics: Provides diagnostic information for a specific file, including warnings and errors.
  • hover: Display documentation, type hints, or other hover information for a given location.
  • rename_symbol: Rename a symbol across a project.
  • edit_file: Allows making multiple text edits to a file based on line numbers. Provides a more reliable and context-economical way to edit files compared to search and replace based edit tools.

About

This codebase makes use of edited code from gopls to handle LSP communication. See ATTRIBUTION for details. Everything here is covered by a permissive BSD style license.

mcp-go is used for MCP communication. Thank you for your service.

This is beta software. Please let me know by creating an issue if you run into any problems or have suggestions of any kind.

Contributing

Please keep PRs small and open Issues first for anything substantial. AI slop O.K. as long as it is tested, passes checks, and doesn't smell too bad.

Setup

Clone the repo:

git clone https://github.com/isaacphi/mcp-language-server.git
cd mcp-language-server

A justfile is included for convenience:

just -l
Available recipes:
    build    # Build
    check    # Run code audit checks
    fmt      # Format code
    generate # Generate LSP types and methods
    help     # Help
    install  # Install locally
    snapshot # Update snapshot tests
    test     # Run tests

Configure your Claude Desktop (or similar) to use the local binary:

{
  "mcpServers": {
    "language-server": {
      "command": "/full/path/to/your/clone/mcp-language-server/mcp-language-server",
      "args": [
        "--workspace",
        "/path/to/workspace",
        "--lsp",
        "language-server-executable"
      ],
      "env": {
        "LOG_LEVEL": "DEBUG"
      }
    }
  }
}

Rebuild after making changes.

Logging

Setting the LOG_LEVEL environment variable to DEBUG enables verbose logging to stderr for all components including messages to and from the language server and the language server's logs.

LSP interaction

  • internal/lsp/methods.go contains generated code to make calls to the connected language server.
  • internal/protocol/tsprotocol.go contains generated code for LSP types. I borrowed this from gopls's source code. Thank you for your service.
  • LSP allows language servers to return different types for the same methods. Go doesn't like this so there are some ugly workarounds in internal/protocol/interfaces.go.

Local Development and Snapshot Tests

There is a snapshot test suite that makes it a lot easier to try out changes to tools. These run actual language servers on mock workspaces and capture output and logs.

You will need the language servers installed locally to run them. There are tests for go, rust, python, and typescript.

integrationtests/
├── tests/        # Tests are in this folder
├── snapshots/    # Snapshots of tool outputs
├── test-output/  # Gitignored folder showing the final state of each workspace and logs after each test run
└── workspaces/   # Mock workspaces that the tools run on

To update snapshots, run UPDATE_SNAPSHOTS=true go test ./integrationtests/...

排名相邻
同类项目