MCP Directory

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

  1. 1Open Windsurf → Cascade → the hammer/MCP icon → Configure (or edit ~/.codeium/windsurf/mcp_config.json).
  2. 2Paste the MCP Language Server config below.
  3. 3Fill in placeholder secrets, then save.
  4. 4Click Refresh in the MCP panel.
  5. 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

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

Displays documentation, type hints, or other hover information for a given location.

rename_symbol

Renames 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.

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.

View repo Full MCP Language Server page