NeoVimMCP
This server exposes Neovim editor state over MCP (Streamable HTTP), letting MCP clients retrieve buffer, cursor, selection, yank, path, and file content snapshots from connected Neovim instances.
Retrieve current file path (absolute and relative)
Get full buffer/file content
Get cursor position and nearby lines for context
Get visual selection (based on marks)
Get yank register content and type
Get line ranges (start to end, 0-indexed, end-exclusive)
Choose which Neovim instance to query (or default to most recent)
Access via HTTP endpoint (
/mcp) with optional bearer-token authSupports multiple Neovim instances with focus tracking
Provides tools for accessing and manipulating Neovim buffers, including retrieving active buffer, listing buffers, looking up buffer content, getting cursor context, publishing buffer updates, and clearing buffers.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@NeoVimMCPshow me the current buffer content"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
NeoVimMCP
MCP server that receives Neovim buffer updates over HTTP and exposes editor context as MCP tools — to clients on this machine or on any other device on your network.
How it works
Neovim (Lua plugin) --HTTP POST--> NeoVimMCP server <--MCP over HTTP-- phone / laptop / any clientNeovim pushes buffer, cursor, selection and yank state to the server on autocmds; the server keeps the latest snapshot per instance in memory and serves it over the MCP Streamable HTTP transport. Nothing depends on a Unix socket, so an MCP client on another device only needs to reach this machine's IP and port.
Related MCP server: @aetherall/mcp-nvim-tmux
Features
MCP over Streamable HTTP — reachable from other devices on the same network
HTTP ingest endpoint Neovim POSTs to
In-memory state store with focus tracking across multiple Neovim instances
Tools for cursor context, line ranges, selection, yank, full buffer and paths
Optional bearer-token auth
stdio transport still available for local-only setups
Start the server
npm install
npm run build
npm startThe startup banner prints the URLs to use:
[MCP] HTTP listening on 0.0.0.0:4389
[MCP] MCP endpoint: http://192.168.1.42:4389/mcp
[MCP] Neovim ingest: http://192.168.1.42:4389/nvim/stateEnvironment variables
Variable | Default | Purpose |
|
| Bind address. Use |
|
| Listen port. |
| (unset) | When set, every request except |
|
| Set to |
Security: the default bind exposes your buffer contents to everyone on the network. Set
NVIM_MCP_TOKENwhenever the server is not bound to loopback — the server warns at startup if you have not. For access beyond your LAN, put it behind a tunnel or reverse proxy with TLS rather than forwarding the port.
Connect Neovim
Copy nvim/nvim-mcp.lua into your config's lua/ directory (or add this repo's
nvim/ folder to your runtimepath), then:
require("nvim-mcp").setup({
url = "http://127.0.0.1:4389",
-- token = "your-token", -- must match NVIM_MCP_TOKEN
-- instance = "work-laptop", -- defaults to hostname-pid
})Requires curl on PATH. Commands: :NvimMcpSync pushes immediately,
:NvimMcpStatus shows the configured URL and instance id.
Connect an MCP client
Any client that speaks the MCP Streamable HTTP transport, on any device that can reach the machine:
{
"mcpServers": {
"nvim": {
"type": "http",
"url": "http://192.168.1.42:4389/mcp",
"headers": { "Authorization": "Bearer your-token" }
}
}
}In Claude Code: claude mcp add --transport http nvim http://192.168.1.42:4389/mcp.
For a local-only stdio setup instead:
{
"mcpServers": {
"nvim": {
"command": "node",
"args": ["/absolute/path/to/nvimMCP/dist/server.js", "--stdio"]
}
}
}Note that stdio mode still binds the HTTP ingest port so Neovim has somewhere to POST — only one instance can own that port at a time.
MCP tools exposed
list_editors— every registered Neovim instance and how stale it isget_cursor_contextget_linesget_selectionget_yankget_full_fileget_path
Every tool except list_editors takes an optional instance argument; without
it, the most recently focused Neovim is used. Responses include age_ms so a
client can tell how fresh the snapshot is.
HTTP API
Method | Path | Purpose |
|
| MCP Streamable HTTP endpoint (also |
|
| Neovim pushes a state snapshot; absent fields keep their previous value |
|
| Mark |
|
| Remove an instance from the store |
|
| Dump the store (debugging) |
|
| Unauthenticated liveness check |
Docker
docker build -t nvimmcp .
docker run -p 4389:4389 -e NVIM_MCP_TOKEN=your-token nvimmcpAvailable Tools
6 toolsget_cursor_contextGet Cursor ContextA
Returns current file, filetype, cursor position, and nearby lines.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
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.
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.
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.
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.
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.
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).
| Name | Required | Description | Default |
|---|---|---|---|
| end | Yes | ||
| start | Yes |
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
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.
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.
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.
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.
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.
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.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
6 tool updates
v1.0.1- First observed
get_cursor_context - First observed
get_full_file - First observed
get_lines - First observed
get_path - First observed
get_selection - First observed
get_yank
TDQS
Scored across 6 tools
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.
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.
With 6 tools covering essential read operations, the count is reasonable for a focused inspection server, though slightly on the lower side.
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
Related MCP Connectors
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
- QuallaaOAuthcom.quallaa
Talk to your public-facing AI from any MCP client — Claude, ChatGPT, Cursor, Cline, Windsurf.
Cross-tool persistent memory and context for AI assistants over MCP.
Related MCP Servers
- AlicenseAqualityDmaintenanceIntegrates Neovim buffers with Claude, enabling real-time buffer awareness and direct in-editor content updates through MCP resources and tools.73 npm19MIT
- FlicenseBqualityDmaintenanceAn MCP server that enables AI agents to control Neovim instances running in tmux sessions.12-
- AlicenseAqualityDmaintenanceMake Neovim feel like Cursor. This MCP server gives an agent full control over the Neovim session it is running inside, including buffers, windows, diagnostics, LSP language intelligence, and terminals.23MIT
- AlicenseNot gradedqualityCmaintenanceProvides VS Code active editor context (open file, cursor position, selection) to MCP-compatible AI tools.9 npm1MIT