# codex-lsp

A Codex plugin that runs an LSP client in the background so Codex gets post-edit diagnostics automatically, plus explicit MCP tools for language-aware operations such as go-to-definition and rename.

codex-lsp ports a standalone LSP runtime into a Codex plugin, giving Codex post-edit diagnostics and MCP tools for language-aware code work. After a successful apply_patch, write, edit or multiedit call, it checks the touched files against a configured language server and, if there are errors, returns blocking feedback to Codex with the diagnostics as context so it can fix the file; deletes are ignored, and unsupported files or missing language servers are handled without breaking the hook.

Its MCP tools cover status, diagnostics, go-to-definition, find-references, symbols, and prepare-rename plus rename, which applies the returned workspace edit.

Language servers are configured per project or per user in a JSON file, with built-in definitions used when nothing is overridden. The plugin ships as a Codex plugin manifest, an MCP server definition, a PostToolUse hook, and a skill describing MCP usage; its runtime lives in a separate lsp-tools-mcp package consumed as a git submodule.

Website: https://github.com/code-yeongyu/codex-lsp
