Provides IDE-grade semantic navigation for C/C++ code through LSP, including go-to-definition, find-references, hover type info, and symbol search capabilities.
Provides IDE-grade semantic navigation for CSS/SCSS/Less stylesheets through LSP, including go-to-definition, find-references, hover type info, and symbol search capabilities.
Provides IDE-grade semantic navigation for JavaScript/Node.js code through LSP, including go-to-definition, find-references, hover type info, and symbol search capabilities.
Provides IDE-grade semantic navigation for Less stylesheets through LSP, including go-to-definition, find-references, hover type info, and symbol search capabilities.
Provides IDE-grade semantic navigation for Python code through LSP, including go-to-definition, find-references, hover type info, and symbol search capabilities.
Provides IDE-grade semantic navigation for React code (JSX/TSX) through LSP, including go-to-definition, find-references, hover type info, and symbol search capabilities.
Provides IDE-grade semantic navigation for Rust code through LSP, including go-to-definition, find-references, hover type info, and symbol search capabilities.
Provides IDE-grade semantic navigation for TypeScript code through LSP, including go-to-definition, find-references, hover type info, and symbol search capabilities.
Codex LSP Bridge (MCP)
Give Codex CLI IDE-grade semantic navigation by exposing Language Server Protocol (LSP) features as MCP tools.
What you get
Go to definition / find references / hover type info / symbols
Works across Python, Rust, C/C++, TypeScript/JavaScript/Node, React (JSX/TSX), HTML, CSS/SCSS/Less
One endpoint:
http://127.0.0.1:8000/mcp(Streamable HTTP) or stdio
Quickstart
1) Install this bridge
2) Install language servers
On Debian/Ubuntu you can run ./install.sh to install all supported language servers.
Python (pick one)
Rust
C/C++
TypeScript/JavaScript/Node/React
HTML/CSS
3) Run the server
4) Connect Codex CLI
Edit ~/.codex/config.toml (HTTP):
Or use the Codex CLI helper:
Using it effectively
Prompt pattern:
When navigating or refactoring code, always use LSP tools (go_to_definition, find_references, hover, document_symbols) instead of text search.
Example:
Note: line/column positions are 0-indexed.
Install language servers (Debian/Ubuntu)
If you are on Debian/Ubuntu, you can use the provided script:
This installs:
basedpyright (Python)
rust-analyzer (Rust)
clangd (C/C++)
typescript-language-server + typescript (TS/JS/React)
vscode-html-language-server + vscode-css-language-server (HTML/CSS)
Note: some commands may land in ~/.local/bin or ~/.cargo/bin. Ensure those are on PATH for the user that runs the bridge.
Config
See config/default.toml. It maps file extensions to language server commands.
You can point the bridge to a config file via:
MCP setup (HTTP vs stdio)
HTTP (bridge runs separately):
Stdio (Codex spawns the bridge, no HTTP):
Multi-project behavior
Each tool call includes a
file_path.The bridge detects the workspace root by walking upward from that file and looking for markers like
.git,package.json,Cargo.toml, etc.It starts an LSP per
(language, workspace_root)so multiple repos do not contaminate each other.Absolute paths are recommended; relative paths resolve against the bridge's
default_root.
System prompt snippet
See SYSTEM_PROMPT_SNIPPET.md for a short snippet you can append to your AI system prompt so it always prefers LSP tools.
Security notes
Local is safest: the bridge reads your repo files and launches local binaries.
If you deploy remotely, only do so where the server has access to the same repo and protect it with auth.