home / mcp / codex lsp bridge mcp server
Exposes LSP capabilities as MCP tools for IDE-grade code navigation and actions across multiple languages.
Configuration
View docs{
"mcpServers": {
"cesarpetrescu-lsp-mcp": {
"url": "http://127.0.0.1:8000/mcp",
"headers": {
"CODEX_LSP_BRIDGE_CONFIG": "/path/to/config/default.toml"
}
}
}
}Codex LSP Bridge exposes Language Server Protocol features as MCP tools, enabling IDE-grade navigation, hover information, code actions, and more across multiple languages. It lets you drive code understanding directly from the MCP client, using a single endpoint or a local bridge process for fast, consistent results across projects.
Connect your MCP client to the Codex LSP Bridge to start using LSP-powered actions. You can run the bridge locally and point your MCP client to the bridge’s MCP endpoint, or you can connect through a remote HTTP configuration. Once connected, you will be able to navigate code, inspect definitions, get hover documentation, apply autofixes, and perform many other language-aware operations through MCP tools.
Prerequisites: you need Python to install the bridge and manage its environment. You may also install language servers for your target languages using your preferred package manager.
# from the project root
pip install -e .Install language servers for the languages you want to support. The following commands install common servers used by the bridge.
# Python language server
pip install basedpyright # provides basedpyright-langserver
# OR
npm i -g pyright # provides pyright-langserver
# Rust language server
rustup component add rust-analyzer
# C/C++ language server
# install clangd via your platform (llvm package)
clangd --version
# TypeScript/JavaScript/Node/React
npm i -g typescript typescript-language-server
# HTML/CSS
npm i -g vscode-langservers-extractedRun the MCP bridge with a configuration file and host/port of your choice.
codex-lsp-bridge serve --config ./config/default.toml --host 127.0.0.1 --port 8000Connect Codex CLI by configuring the MCP endpoint in your user configuration. Use HTTP or stdio transport as shown.
experimental_use_rmcp_client = true
[mcp_servers.lsp_bridge]
url = "http://127.0.0.1:8000/mcp"
```
Or use the Codex CLI helper to add the MCP server:
```bash
codex mcp add lsp_bridge --url http://127.0.0.1:8000/mcpWorking with LSP tools yields accurate navigation and refactoring results. Prefer LSP rename_symbol, go_to_definition, and code_action over plain text search for optimal correctness.
Navigate to the location where a symbol is defined in the current file or project.
Navigate to the type definition of a symbol if available.
Find all references to a symbol across the workspace.
Rename a symbol across the codebase with LSP support.
Show quick information about a symbol under the cursor.
Show function/method signature and parameter information.
List symbols defined in the current document.
List symbols across the entire workspace.
Apply quick fixes or refactors suggested by language servers.
Format the current document according to language-specific rules.
Explore call relationships for a symbol (who calls whom).
Show diagnostic information such as errors and warnings from language servers.
Wait for the latest diagnostic information after edits.
Check the status of the LSP bridge and its connections.
Fuzzy or name-based lookup to locate symbols across files.