A MCP Server for a Neovim instance, using the Neovim RPC MessagePack-RPC protocol
概要
what is mcpserver.nvim?
mcpserver.nvim is a Neovim plugin that implements a Model Context Protocol (MCP) server, allowing external MCP clients to interact with Neovim through a Unix socket.
how to use mcpserver.nvim?
To use mcpserver.nvim, install it via lazy.nvim, and start the MCP server using the command :MCPServerStart. You can also connect to the Unix socket created by the server for communication with MCP clients.
key features of mcpserver.nvim?
- Fetch the contents of the current buffer using the
get_buffer_contentmethod. - Supports both direct socket connections and stdio-based communication for external clients.
- Allows multiple Neovim instances to run MCP servers simultaneously.
use cases of mcpserver.nvim?
- Integrating external tools with Neovim for enhanced functionality.
- Automating tasks in Neovim through external scripts or applications.
- Developing custom MCP clients that interact with Neovim.
FAQ from mcpserver.nvim?
- Can I run multiple instances of the MCP server?
Yes! Each Neovim instance creates a unique Unix socket, allowing multiple servers to run simultaneously.
- What is the required setup for using mcpserver.nvim?
You need Neovim with Lua support and optionally
netcatfor Unix socket communication in standalone mode.
- How do I get the content of the current buffer?
Use the
get_buffer_contentmethod via the MCP protocol to retrieve the buffer's content.