This is an [MCP](https://modelcontextprotocol.io/introduction) server that runs and exposes a [language
MCP Language Server becomes available to MCP clients through the mcp language server mcp 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.
This is an MCP server that runs and exposes a language server to LLMs. Not a language server for MCP, whatever that would be.
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.
Once connected, the assistant can call these 8 tools directly:
definition — Retrieves the complete source code definition of any symbol (function, type, constant, etc.) from your codebasereferences — Locates all usages and references of a symbol throughout the codebasediagnostics — Provides diagnostic information for a specific file, including warnings and errorshover — Display documentation, type hints, or other hover information for a given locationrename_symbol — Rename a symbol across a projectedit_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 andSetup — A justfile is included for convenience: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 andThe server is distributed via npm as pyright, so most clients can run it without a manual build step. Add it to your MCP client's configuration and restart the client to pick it up — the copy-paste configs for Claude Desktop, Claude Code and Cursor are on this page.
The server reads 4 environment variables: GOPATH, GOCACHE, GOMODCACHE, LOG_LEVEL. Keep credentials in your client's env block or a secrets manager rather than committing them.
Developer-tool servers are usually the first ones people connect, because they turn "help me with this code" into an assistant that can actually read the repo and act on it. MCP Language Server sits in that group, and the shape of its toolset — definition, references, diagnostics among others — tells you what it is really for. Worth comparing against the other developer tools servers in this directory before you commit to one, since several overlap in scope but differ sharply in setup cost and permissions.
| Tool | What it does |
|---|---|
| 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. |
| Setup | A [justfile](https://just.systems/man/en/) is included for convenience: |
| 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. |
{
"mcpServers": {
"language-server": {
"command": "npx",
"args": ["-y", "pyright"],
"env": {
"GOPATH": "your-value",
"GOCACHE": "your-value",
"GOMODCACHE": "your-value",
"LOG_LEVEL": "your-value"
}
}
}
}Add to claude_desktop_config.json, then restart Claude Desktop.
| Variable | Description | Required |
|---|---|---|
| GOPATH | Filesystem location the server is allowed to use. | Optional |
| GOCACHE | Configuration value read at startup. | Optional |
| GOMODCACHE | Configuration value read at startup. | Optional |
| LOG_LEVEL | Configuration value read at startup. | Optional |
Kill hallucinated APIs — version-accurate, up-to-date library documentation injected straight into context.
Microsoft's official browser automation server — drive a real browser through the accessibility tree, no screenshots needed.
GitHub's official server — repos, issues, pull requests, Actions and code security, straight from your assistant.
Issue tracking at the speed of conversation — Linear's official hosted server with OAuth and zero install.
Local repository surgery — status, diffs, commits, branches and history for any repo on disk.
Timezone sanity for AI — current time anywhere and correct conversions, without the model doing date math.