Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
NVIMNoEnvironment variable set automatically inside a Neovim :terminal. Points to the Neovim socket.
NVIM_MCP_SOCKETNoSocket path or host:port for the Neovim instance. Overrides NVIM and NVIM_LISTEN_ADDRESS.
NVIM_LISTEN_ADDRESSNoLegacy environment variable for Neovim socket.

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
nvim_infoA

Report the connected Neovim instance: version, channel, working directory, current buffer/window and how the connection was resolved. Use this first to confirm the agent is wired to a live Neovim.

nvim_exec_luaA

Run Lua in Neovim via nvim_exec_lua and return the result as JSON. The code is a function body, so use return to produce a value and reference call arguments via .... This is the most powerful tool: anything the Neovim Lua API can do is reachable here.

nvim_commandA

Execute an Ex command (e.g. :write, :bnext, :vsplit foo.txt) and return its captured output.

nvim_evalA

Evaluate a Vimscript expression (e.g. expand('%:p')) and return the result.

nvim_list_buffersA

List all buffers with their number, name, type, modified state and line count. Terminal buffers report buftype 'terminal'.

nvim_read_bufferA

Read lines from a buffer (by number, path, or the current buffer). Line range is 0-based and end-exclusive; end = -1 reads to the end.

nvim_write_bufferA

Replace a line range in a buffer with new lines. Line range is 0-based and end-exclusive; use start = 0, end = -1 to replace the whole buffer.

nvim_open_fileB

Open a file in Neovim, optionally in a split or new tab, and return its buffer info.

nvim_list_windowsA

List open windows with their buffer, size and cursor position.

nvim_diagnosticsA

Return LSP/diagnostic entries (errors, warnings, etc.) for a buffer, or for all buffers if none is given. Great for letting the agent see and fix problems the way Cursor does.

nvim_run_in_terminalA

Open a terminal inside Neovim, run a single shell command, wait for it to finish, and return its output and exit code. This is the one-shot building block: e.g. run echo hello world and read it back. The terminal runs inside the user's editor, so the command shares the editor's environment and working directory.

nvim_open_terminalA

Open a persistent terminal inside Neovim and return its buffer number, channel and job id. Use nvim_terminal_send to type into it and nvim_terminal_read to read its screen. Use this for interactive or long-running sessions; for one-shot commands prefer nvim_run_in_terminal.

nvim_list_terminalsA

List terminal buffers currently open in Neovim, with their job/channel and running state.

nvim_terminal_sendA

Send input to an open terminal buffer. By default a carriage return is appended so the line is submitted; set enter=false to send raw keys (e.g. control characters).

nvim_terminal_readA

Read the rendered contents (scrollback + current screen) of a terminal buffer. Trailing blank lines are trimmed by default.

nvim_lsp_clientsA

List the language servers attached to a buffer (or the current buffer), with their id, name, root directory and whether they have finished initializing. Use this to check language intelligence is available before calling the other nvim_lsp_* tools.

nvim_lsp_hoverA

Get hover documentation (signatures, types, docs) for the symbol at a position, as the editor's language server would show it.

nvim_lsp_definitionA

Resolve the definition location(s) of the symbol at a position. Returns file, line and column (1-based) for each location.

nvim_lsp_referencesB

Find all references to the symbol at a position across the project.

nvim_lsp_document_symbolsA

List the symbols (functions, classes, variables, …) defined in a buffer, with their kind and line. Nesting is reported via depth.

nvim_lsp_renameA

Rename the symbol at a position project-wide via the language server and apply the resulting edits (set apply=false to preview which files would change without modifying anything).

nvim_lsp_code_actionA

List the code actions (quick fixes, refactors) the language server offers at a position, including any diagnostics there. Pass applyIndex (1-based, from a previous listing) to apply one of them.

nvim_lsp_formatA

Format a buffer using its language server and apply the changes in place.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Shooooooooo/nvim-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server