Basic information
About Vim MCP Server
An MCP server for driving Vim. Connect your coding agent to show you changed files in Vim, or get it to advise you on the code in your open buffers. Can also set your quickfix/location list to direct you to multiple points in your code.
Vim MCP Server is a MCP server in the Other category listed in the AddMCP.net directory, published by breggles. Supported transport: stdio. Runtime: Python. Source code is hosted on github.com. Related topics: vim.
Setup
claude mcp add vim-mcp-server --transport http http://localhost:8765/mcp
[mcp_servers.vim-mcp-server] url = "http://localhost:8765/mcp"
{
"mcpServers": {
"vim-mcp-server": {
"url": "http://localhost:8765/mcp"
}
}
}
{
"servers": {
"vim-mcp-server": {
"type": "http",
"url": "http://localhost:8765/mcp"
}
}
}
Vim MCP Server config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"vim": {
"type": "remote",
"url": "http://localhost:8765/mcp",
"enabled": true
}
}
}
Vim MCP Server tools
Tool list not available yet
This listing does not currently have a tool list to display. This does not mean the server has no tools; check its documentation for supported capabilities.
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is Vim MCP Server?
Vim MCP Server is an MCP (Model Context Protocol) server embedded in Vim that exposes tools over HTTP. It lets MCP-compatible clients—such as AI coding agents—read and modify buffers, move the cursor, retrieve visual selections, manage quickfix and location lists, open side-by-side diffs, read message history, and run Ex commands.
How to use Vim MCP Server?
Install the plugin using your preferred Vim plugin manager (e.g., vim‑plug, Vundle, or manual clone). Start the server in Vim with :McpServerStart (default port 8765). Optionally, set g:mcp_server_autostart = 1 in your vimrc to start it automatically. Point your MCP client at http://127.0.0.1:8765/mcp.
Key features of Vim MCP Server
- List, read, edit, open, save, and close buffers.
- Get and set cursor position.
- Retrieve the current visual selection.
- Run arbitrary Ex commands (opt‑in).
- Manage quickfix and location lists.
- Read Vim message history.
- Show a side‑by‑side diff view in a new tab.
Use cases of Vim MCP Server
- AI coding agents that inspect and modify Vim buffers programmatically.
- Automating buffer navigation and editing via MCP‑compatible tools.
- Integrating Vim’s quickfix and location lists into external workflows.
- Retrieving Vim’s message history for debugging or logging.
Frequently asked questions
1 What are the Vim requirements?
Vim must be compiled with +python3.
2 How do I start and stop the server?
Use :McpServerStart [port] to start and :McpServerStop to stop. Check status with :McpServerStatus.
3 Which tools are opt‑in and how do I enable them?
execute_command, save_buffer, and edit_buffer are disabled by default. Enable them by setting g:mcp_server_allow_execute, g:mcp_server_allow_save, or g:mcp_server_allow_edit to 1 in your vimrc.
4 How do I configure an MCP client for this server?
Set the client to connect to http://127.0.0.1:8765/mcp. For example, in OpenCode’s opencode.jsonc add the server with "type": "remote" and the URL.
5 How can I read‑only tools in OpenCode plan mode?
In opencode.jsonc under agent.plan.tools, disable all vim_* tools and then re‑enable specific read‑only ones like vim_list_buffers, vim_get_buffer, etc.
Comments
No comments yet
Be the first to share feedback about this listing. Sign in to leave a comment.
Sign In