
How to add MCP Language Server to Windsurf
Gives MCP-enabled clients semantic code tools: definition, references, rename, diagnostics, and more. Paste the config into ~/.codeium/windsurf/mcp_config.json and restart Windsurf.
Last updated June 14, 2026 · 1.5k★ · stdio · no auth
Windsurf config for MCP Language Server
go install github.com/isaacphi/mcp-language-server@latest{
"mcpServers": {
"mcp-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"
}
}
}
}Setup steps
- 1Open Windsurf → Cascade → the hammer/MCP icon → Configure (or edit ~/.codeium/windsurf/mcp_config.json).
- 2Paste the MCP Language Server config below.
- 3Fill in placeholder secrets, then save.
- 4Click Refresh in the MCP panel.
- 5MCP Language Server's tools become available to Cascade.
Before you start
- Go installed (https://golang.org/doc/install) to install the server via 'go install'
- A language server installed and on PATH (e.g. gopls, rust-analyzer, pyright, typescript-language-server, or clangd)
- The chosen language server must communicate over stdio
What MCP Language Server can do in Windsurf
definitionRetrieves the complete source code definition of any symbol (function, type, constant, etc.) from your codebase.
referencesLocates all usages and references of a symbol throughout the codebase.
diagnosticsProvides diagnostic information for a specific file, including warnings and errors.
hoverDisplays documentation, type hints, or other hover information for a given location.
rename_symbolRenames a symbol across a project.
edit_fileAllows 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.
MCP Language Server + Windsurf FAQ
Where is the Windsurf config file?
Windsurf reads MCP servers from ~/.codeium/windsurf/mcp_config.json. Paste the MCP Language Server config there under the "mcpServers" key and restart the client.
Is this a language server for MCP?
No. It is an MCP server that runs and exposes an existing LSP language server to LLMs, so MCP clients can use semantic code tools.
Which language servers are supported?
The author has tested gopls (Go), rust-analyzer (Rust), pyright (Python), typescript-language-server (TypeScript), and clangd (C/C++), but it should be compatible with many more. The only requirement is that the language server communicates over stdio.
How do I pass arguments to the underlying language server?
Any arguments placed after '--' in the args array are forwarded to the language server, and environment variables in 'env' are passed on to it as well.