Enable LSP tools in Grok Build
Enable LSP tools in Grok Build
The LSP code-intel tool is off by default. Official switches live in the settings reference.
Turn it on
Environment (process-scoped):
export GROK_LSP_TOOLS=1
Or in user ~/.grok/config.toml / $GROK_HOME/config.toml:
[features]
lsp_tools = true
Project .grok/config.toml only contributes MCP, plugins, and permission rules — put [features] in the user config.
Confirm
grok inspect
Check that feature flags and tool discovery match what you set. Permission rules still apply: a deny on the LSP tool wins over the feature flag — see Configure Grok Build permissions.
Related feature flags
| Flag / setting | Default | Role |
|---|---|---|
GROK_LSP_TOOLS / [features] lsp_tools |
off | LSP code-intel tool |
GROK_WEB_FETCH / [features] web_fetch |
off | Arbitrary page fetch — Enable web_fetch |
GROK_WRITE_FILE / [features] write_file |
on | Disable write with 0 / false for read-only sessions |
GROK_TOOL_SEARCH / [features] tool_search |
on | On-demand MCP tool discovery for large toolsets |
Pitfalls
- Leaving LSP tools off is the secure default; turn them on only when the session needs language-server intel.
- Feature flags do not bypass
denypermission rules or PreToolUse hooks. - LSP availability still depends on language servers present in the environment — enabling the flag alone does not install an LSP binary.