Editing, saving and arbitrary Ex commands are gated by three independent variables — the default install can read buffers and move your cursor and nothing else. show_git_diff is the small pleasure here: git computes both sides and Vim renders the comparison in a new tab, where you already know the keys.
An MCP server that runs inside Vim itself and serves over HTTP. It exposes buffers, the cursor, the visual selection, the quickfix and location lists, message history and Ex commands to a connected client.
- list_buffers, get_buffer with an optional line range, open_file and close_buffer
- edit_buffer and save_buffer — replace, insert or delete lines, and write the file (both opt-in)
- get_cursor and set_cursor — read where you are, or move to a line and column
- get_visual_selection — whatever you have highlighted right now
- get_quickfix_list, set_quickfix_list, get_location_list and set_location_list
- get_messages — the :messages history
- show_diff and show_git_diff — a side-by-side diff in a new tab, with git computing both sides inside Vim
- execute_command — any Ex command (opt-in)
- Buffers addressable by number or by file path, defaulting to the current one
Vim compiled with +python3, installed as a plugin. Start it with :McpServerStart, or set the autostart variable in your vimrc. The client connects to http://127.0.0.1:8765/mcp by default. Editing, saving and Ex commands each stay disabled until you enable the matching option.
One command — Plug 'breggles/vim-mcp-server'
