BM

bigcodegen/mcp-neovim-server

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

324 stars 27 forks 품질 61 트렌드 19MIT

모델 컨텍스트 프로토콜(MCP)과 공식 neovim/node-client 자바스크립트 라이브러리를 사용하여 Neovim을 제어합니다

개요

Claude Desktop(또는 모든 Model Context Protocol 클라이언트)을 MCP와 공식 neovim/node-client 자바스크립트 라이브러리를 사용하여 Neovim에 연결할 수 있습니다. 이 서버는 Claude가 이미 이해하고 있는 Vim의 네이티브 텍스트 편집 명령과 워크플로우를 활용하여 경량 코드 또는 범용 AI 텍스트 지원 계층을 만듭니다. - 소켓 파일을 노출하면 nvim 인스턴스에 연결함 -- nvim 시작 시 /tmp/nvim 청취 - 현재 버퍼를 보고 버퍼 전환을 관리함 - 커서 위치, 모드, 파일명, 표시, 레지스터, 시각적 선택 항목 획득 - vim 명령어와 선택적으로 vim에서 셸 명령 실행 - 삽입, 교체, replace모든 모드를 사용해 편집 가능 - 정규식(regex) 지원을 통한 검색 및 교체 기능 - 프로젝트 전반의 grep 검색과 quickfix 통합 - 포괄적인 창 관리 - 건강 상태 모니터링 및 연결 진단 - nvim://session: 현재 네오빔 텍스트 편집기 세션 - nvim://buffers: 현재 네오빔...

개요(AI 번역)

Claude Desktop(또는 모든 Model Context Protocol 클라이언트)을 MCP와 공식 neovim/node-client 자바스크립트 라이브러리를 사용하여 Neovim에 연결할 수 있습니다. 이 서버는 Claude가 이미 이해하고 있는 Vim의 네이티브 텍스트 편집 명령과 워크플로우를 활용하여 경량 코드 또는 범용 AI 텍스트 지원 계층을 만듭니다.

특징

  • nvim 시작 시 --listen /tmp/nvim와 같은 소켓 파일을 노출하면 nvim 인스턴스에 연결됩니다
  • 현재 버퍼를 확인하고 버퍼 스위칭을 관리합니다
  • 커서 위치, 모드, 파일 이름, 마크, 레지스터, 시각적 선택 값을 얻습니다
  • vim 명령어를 실행하며, 선택적으로 vim을 통해 셸 명령어를 수행합니다.
  • 삽입, 교체, 또는 ReplaceAll 모드를 사용하여 편집할 수 있습니다
  • 정규식을 지원하는 검색 및 교체 기능
  • 프로젝트 전반의 grep 검색과 quickfix 통합
  • 종합 윈도우 관리
  • 건강 모니터링 및 연결 진단

API

자료

  • nvim://session: 현재 네오빔 텍스트 편집기 세션
  • nvim://buffers: 현재 Neovim 세션 내 모든 열린 버퍼의 목록, 수정된 상태, 구문, 창 ID 등 메타데이터

도구

핵심 도구

  • vim_buffer

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.

README

원문 README의 일부입니다. 원문 보기.

Neovim MCP Server

Connect Claude Desktop (or any Model Context Protocol client) to Neovim using MCP and the official neovim/node-client JavaScript library. This server leverages Vim’s native text editing commands and workflows, which Claude already understands, to create a lightweight code or general purpose AI text assistance layer.

Features

  • Connects to your nvim instance if you expose a socket file, for example --listen /tmp/nvim, when starting nvim
  • Views your current buffers and manages buffer switching
  • Gets cursor location, mode, file name, marks, registers, and visual selections
  • Runs vim commands and optionally shell commands through vim
  • Can make edits using insert, replace, or replaceAll modes
  • Search and replace functionality with regex support
  • Project-wide grep search with quickfix integration
  • Comprehensive window management
  • Health monitoring and connection diagnostics

API

Resources

  • nvim://session: Current neovim text editor session
  • nvim://buffers: List of all open buffers in the current Neovim session with metadata including modified status, syntax, and window IDs

Tools

Core Tools

  • vim_buffer
    • Get buffer contents with line numbers (supports filename parameter)
    • Input filename (string, optional) - Get specific buffer by filename
    • Returns numbered lines with buffer content
  • vim_command
    • Send a command to VIM for navigation, spot editing, and line deletion
    • Input command (string)
    • Runs vim commands with nvim.replaceTermcodes. Multiple commands work with newlines
    • Shell commands supported with ! prefix when ALLOW_SHELL_COMMANDS=true
    • On error, 'nvim:errmsg' contents are returned
  • vim_status
    • Get comprehensive Neovim status
    • Returns cursor position, mode, filename, visual selection with enhanced detection, window layout, current tab, marks, registers, working directory, LSP client info, and plugin detection
    • Enhanced visual selection reporting: detects visual mode type (character/line/block), provides accurate selection text, start/end positions, and last visual selection marks
  • vim_edit
    • Edit lines using insert, replace, or replaceAll modes
    • Input startLine (number), mode ("insert" | "replace" | "replaceAll"), lines (string)
    • insert: insert lines at startLine
    • replace: replace lines starting at startLine
    • replaceAll: replace entire buffer contents
  • vim_window
    • Manipulate Neovim windows (split, vsplit, close, navigate)
    • Input command (string: “split”, “vsplit”, “only”, “close”, “wincmd h/j/k/l”)
  • vim_mark
    • Set named marks at specific positions
    • Input mark (string: a-z), line (number), column (number)
  • vim_register
    • Set content of registers
GitHub에서 전체 README 보기

설치

npx -y mcp-neovim-server
MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →

설정

{ "mcpServers": { "MCP Neovim Server": { "command": "npx", "args": [ "-y", "mcp-neovim-server" ], "env": { "ALLOW_SHELL_COMMANDS": "true", "NVIM_SOCKET_PATH": "/tmp/nvim" } } } }