Skip to main content
Glama

NeoVimMCP

MCP server that receives Neovim buffer updates and exposes editor context as MCP tools.

Features

  • MCP server over stdio for AI clients

  • HTTP bridge endpoint Neovim can POST to

  • In-memory buffer store with active buffer tracking

  • Tools for active buffer, list/lookup, cursor context, publish, and clear

  • Bridge written in C++ for mutliple nvim instances

Related MCP server: @aetherall/mcp-nvim-tmux

Start server

npm install
npm start

Optional env var:

  • NVIM_BUFFER_PORT (default 4389)

MCP tools exposed

  • nvim_get_active_buffer

  • nvim_list_buffers

  • nvim_get_buffer

  • nvim_get_cursor_context

  • nvim_publish_buffer

  • nvim_clear_buffer

Connect your MCP client

Example mcpServers entry:

{
  "mcpServers": {
    "nvim": {
      "command": "node",
      "args": ["/absolute/path/to/nvimMCP/server.js"],
      "env": {
        "NVIM_SOCKET_PATH": "/tmp/nvim.sock (Neovim socket)"
      }
    }
  }
}

Connect Neovim

Drop nvim/nvim-mcp.lua into your config (or source it directly), then call setup:

local nvim_mcp = dofile("/absolute/path/to/nvimMCP/nvim/nvim-mcp.lua")

nvim_mcp.setup({
  endpoint = "http://127.0.0.1:4389/buffer/update",
  clear_endpoint = "http://127.0.0.1:4389/buffer/clear",
  debounce_ms = 150,
})

Available user commands:

  • :NvimMcpPublish (force publish current buffer)

  • :NvimMcpClear (clear current buffer from server)

TODO: Create a mutliplex using C++ to handle multiple instances that can share across the network.

Available Tools

6 tools
get_cursor_contextGet Cursor ContextA

Returns current file, filetype, cursor position, and nearby lines.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.7/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description discloses what information is returned (file, filetype, cursor position, nearby lines) but does not specify details like the number of nearby lines or output format. Without annotations, this is adequate but incomplete.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence that is clear and to the point. Every word earns its place, and it is front-loaded with the key action and results.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

While the description explains the return values, it lacks details on how many nearby lines are returned or the structure of the output. Given the absence of an output schema, more specificity would improve completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema is empty, so the description carries the full burden. It adds meaning by explaining the tool's output, which is beyond the schema's scope. Baseline for zero parameters is 4.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states what the tool returns: current file, filetype, cursor position, and nearby lines. This is specific and distinguishes it from sibling tools like get_lines or get_selection.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives such as get_lines or get_full_file. The agent must infer usage from the description alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_full_fileGet Full FileA

Returns full current buffer content.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description bears the full burden. It accurately describes a non-destructive read operation with no side effects, providing complete transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence with no extraneous words. Perfectly concise and front-loaded with the essential verb and resource.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no parameters, no output schema, and a simple purpose, the description is fully complete. It leaves no ambiguity about what the tool does.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

No parameters exist, so schema coverage is 100%. Description adds no parameter info, but none is needed. Baseline 4 applies for zero-parameter tools.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states action (Returns) and resource (full current buffer content), distinguishing it from sibling tools that return specific parts (cursor context, lines, selection, yank, path).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit when/not-to-use guidance, but the purpose is self-evident for a simple retrieval tool with no parameters. The context of sibling tools implies this is for the entire buffer.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_linesGet Line RangeA

Returns lines from start to end (0-indexed, end-exclusive).

ParametersJSON Schema
NameRequiredDescriptionDefault
endYes
startYes

TDQS

A3.5/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided. Description is minimal, stating only the read-like behavior. It does not disclose error handling, performance, or what happens for invalid indices.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single, direct sentence that conveys the core functionality. Zero wasted words, front-loaded with purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Simple tool with no output schema. The description explains what it does but omits return format and error conditions. Given the sibling tools, some usage guidance would improve completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema has 0% description coverage, but the description adds crucial details: parameters are 0-indexed and end-exclusive. This adds significant meaning beyond the schema's type constraints.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it returns lines from start to end with 0-indexed, end-exclusive semantics. It distinguishes from siblings (get_full_file, get_path, etc.) by focusing on a specific range.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool vs alternatives like get_full_file. The description does not mention context or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_pathGet file path absolute and relativeB

Returns the absolute and relative path of the current file.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It does not disclose whether the tool requires a saved file, what happens if no file is open (error or default?), or whether the file must be on disk. The return format (e.g., string, object) is not mentioned.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single concise sentence that directly states the tool's purpose. Every word is necessary and there is no redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no parameters and no output schema, the description is minimal. It does not specify the format of the path strings, whether they are absolute/relative as separate values, or what the path is relative to (e.g., workspace root?). For a simple tool it is adequate but lacks some completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

No parameters exist, so schema coverage is trivially 100%. The description adds value by clarifying the context ('current file'), which is more informative than the empty schema alone. Baseline for 0 params is 4, and this is met.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the tool returns absolute and relative path of the current file, which clearly indicates the action and resource. It differentiates from siblings like get_cursor_context or get_lines, but could be more specific about which file (e.g., currently open file).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool vs alternatives like get_cursor_context or get_full_file. There is no mention of prerequisites or context needed (e.g., must have a file open). The description does not help the agent decide between similar path-related tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_selectionGet Visual SelectionA

Returns last visual selection based on '< and '> marks.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It states the tool is read-only (returns a selection based on marks), which is the key behavioral trait. It does not mention what happens when no selection exists, but for a simple read, this is acceptable.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence with no wasted words. It is front-loaded with the core action ('Returns last visual selection') and immediately provides the basis ('based on '< and '> marks').

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (no parameters, no output schema), the description is fairly complete. It explains what is returned and the basis. It could optionally note that the selection is text or positions, but the name and context make it clear enough.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has no parameters, and schema coverage is 100%. The description does not need to add parameter info, and it adds value by explaining what the returned selection corresponds to (based on marks). Baseline 4 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states that the tool returns the last visual selection based on '< and '> marks. It uses a specific verb ('Returns') and resource ('last visual selection'), and distinguishes from sibling tools like get_cursor_context or get_lines, which serve different purposes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage: use this tool when you need the last visual selection. It does not explicitly state when to use it versus alternatives, but given the sibling tools' names, the context is clear enough. No exclusions or when-not-to-use are provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_yankGet Yank RegisterA

Returns unnamed register text and register type.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description indicates a read operation (returns), which is transparent enough for a simple getter. However, with no annotations provided, it could benefit from stating whether the register might be empty or any side effects, but it's adequate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence, minimal yet complete. Every word is necessary; no fluff.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given zero parameters, no output schema, and a simple read operation, the description is fully adequate. No gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

There are zero parameters, and the description adds no extra info beyond the empty schema. Baseline 4 for no params is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it returns unnamed register text and register type, using a specific verb and resource. It distinguishes from siblings like get_cursor_context or get_lines which serve different purposes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool or when not to, nor any mention of alternatives. The description only states what it does without context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

A3.7/5.0
Disambiguation5/5

Each tool retrieves a distinct piece of information: cursor context, line range, selection, yank register, full file, and file path. There is no overlap in purpose.

Naming Consistency5/5

All tools follow a consistent 'get_' prefix followed by a clear noun describing the fetched data (e.g., get_cursor_context, get_lines). No mixing of styles.

Tool Count4/5

With 6 tools covering essential read operations, the count is reasonable for a focused inspection server, though slightly on the lower side.

Completeness2/5

The server provides only read operations, lacking any mutation tools like edit, execute commands, or buffer management. This leaves significant gaps for a NeoVim integration.

Maintenance

ActivityMaintained
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

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/JaydenYip3/NeovimMCP'

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