Skip to main content
Glama

Neovim MCP 서버

Claude Desktop(또는 모든 클라이언트)과 Neovim 간의 개념 증명 통합은 Model Context Protocol(MCP)과 공식 neovim/node-client JavaScript 라이브러리를 사용합니다. 이 서버는 Claude가 이미 이해하고 있는 Vim의 기본 텍스트 편집 명령과 워크플로를 활용하여 가벼운 코드 또는 범용 AI 텍스트 지원 계층을 생성합니다.

특징

  • 예를 들어 nvim을 시작할 때 --listen /tmp/nvim 과 같이 소켓 파일을 노출하면 nvim 인스턴스에 연결합니다.

  • 현재 버퍼를 봅니다

  • 커서 위치, 모드, 파일 이름을 가져옵니다.

  • vim 명령을 실행하고 선택적으로 vim을 통해 셸 명령을 실행합니다.

  • 삽입이나 교체를 사용하여 편집할 수 있습니다.

Related MCP server: loreto-mcp

API

자원

  • nvim://session : 현재 neovim 텍스트 편집기 세션

  • nvim://buffers : 수정된 상태, 구문 및 창 ID를 포함한 메타데이터가 포함된 현재 Neovim 세션의 모든 열려 있는 버퍼 목록

도구

  • vim_버퍼

    • 줄 번호가 표시된 현재 VIM 텍스트 편집기 버퍼

    • 입력 filename (문자열)

    • 파일 이름은 무시되고 현재 활성 버퍼 콘텐츠가 포함된 번호가 매겨진 줄의 문자열이 반환됩니다.

  • vim_명령

    • VIM에 탐색, 스팟 편집 및 줄 삭제를 위한 명령 보내기

    • 입력 command (문자열)

    • nvim.replaceTermcodes 통해 전달된 vim 명령을 실행합니다. 여러 명령을 줄바꿈으로 구분하면 작동합니다.

    • 오류가 발생하면 'nvim:errmsg' 내용이 반환됩니다.

  • vim_상태

    • VIM 편집기의 상태를 가져옵니다

    • 상태에는 커서 위치, 모드, 파일 이름, 시각적 선택, 창 레이아웃, 현재 탭, 표시, 레지스터 및 작업 디렉토리가 포함됩니다.

  • vim_edit

    • VIM 편집기에서 insert, replace 또는 replaceAll을 사용하여 줄을 편집합니다.

    • 입력 startLine (숫자), mode ( "insert" | "replace" | "replaceAll" ), lines (문자열)

    • insert는 startLine에 줄을 삽입합니다.

    • replace는 startLine에서 시작하는 줄을 바꿉니다.

    • replaceAll은 버퍼 내용 전체를 교체합니다.

  • vim_window

    • Neovim 창 조작(분할, vssplit, 닫기, 탐색)

    • 입력 command (문자열: "split", "vsplit", "only", "close", "wincmd h/j/k/l")

    • 창 관리 작업을 허용합니다

  • vim_mark

    • 특정 위치에 표시를 설정하세요

    • 입력 mark (문자열: az), line (숫자), column (숫자)

    • 지정된 위치에 명명된 마크를 설정합니다.

  • vim_register

    • 레지스터의 내용 설정

    • 입력 register (문자열: az 또는 "), content (문자열)

    • 등록 내용을 관리합니다

  • vim_visual

    • 시각적으로 선택하기

    • 입력 startLine (숫자), startColumn (숫자), endLine (숫자), endColumn (숫자)

    • 시각적 모드 선택을 생성합니다

클로드는 이 간단한 도구 세트를 사용하여 neovim 세션을 들여다보고 질문에 답하고 버퍼를 편집할 수 있습니다.

제한 사항

  • 이는 모델 컨텍스트 프로토콜을 실험하기 위한 간단한 개념 증명입니다. 사용 시 발생하는 모든 책임은 사용자에게 있습니다.

  • 사용자 정의 neovim 구성과 원활하게 상호 작용하지 않을 수 있습니다!

  • 오류 처리가 개선될 수 있습니다.

  • 가끔 클로드는 vim 명령 입력을 제대로 받지 못할 때가 있습니다.

구성

환경 변수

  • ALLOW_SHELL_COMMANDS : 셸 명령(예: !ls ) 실행을 활성화하려면 'true'로 설정합니다. 보안을 위해 기본값은 false입니다.

  • NVIM_SOCKET_PATH : Neovim 소켓 경로를 설정합니다. 지정하지 않으면 기본값은 '/tmp/nvim'입니다.

Claude Desktop과 함께 사용

claude_desktop_config.json 에 다음을 추가하세요:

지엑스피1

특허

이 MCP 서버는 MIT 라이선스에 따라 라이선스가 부여됩니다. 즉, MIT 라이선스의 약관에 따라 소프트웨어를 자유롭게 사용, 수정 및 배포할 수 있습니다. 자세한 내용은 프로젝트 저장소의 LICENSE 파일을 참조하세요.

Available Tools

19 tools
vim_bufferC

Get buffer contents with line numbers

Inputs: filename.

vim_buffer_saveC

Save current buffer or save to specific filename

Inputs: filename.

vim_buffer_switchC

Switch between buffers by name or number

Inputs: identifier (required).

vim_commandC

Execute Vim commands with optional shell command support

Inputs: command (required).

vim_editC

Edit buffer content using insert, replace, or replaceAll modes

Inputs: lines (required), mode (required), startLine (required).

vim_file_openC

Open files into new buffers

Inputs: filename (required).

vim_foldC

Manage code folding: create, open, close, and toggle folds

Inputs: action (required), endLine, startLine.

vim_grepC

Project-wide search using vimgrep with quickfix list

Inputs: pattern (required), filePattern.

vim_healthB

Check Neovim connection health

Inputs: no named parameters.

vim_jumpC

Navigate Neovim jump list: go back, forward, or list jumps

Inputs: direction (required).

vim_macroC

Record, stop, and play Neovim macros

Inputs: action (required), count, register.

vim_markB

Set named marks at specific positions in the buffer

Inputs: column (required), line (required), mark (required).

vim_registerC

Manage Neovim register contents

Inputs: content (required), register (required).

vim_search_replaceC

Find and replace with global, case-insensitive, and confirm options

Inputs: pattern (required), replacement (required), confirm, global, +1 more.

vim_statusA

Get comprehensive Neovim status including cursor position, mode, marks, and registers

Inputs: no named parameters.

vim_tabC

Manage Neovim tabs: create, close, and navigate between tabs

Inputs: action (required), filename.

vim_visualC

Create visual mode selections in the buffer

Inputs: endColumn (required), endLine (required), startColumn (required), startLine (required).

vim_windowB

Manage Neovim windows: split, close, and navigate between windows

Inputs: command (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 19 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose targeting specific Neovim operations like buffer management, editing, navigation, and system control. There is no overlap or ambiguity; for example, vim_search handles searching within a buffer while vim_grep handles project-wide searches, and vim_buffer_switch is distinct from vim_tab or vim_window for navigation.

    Naming Consistency5/5

    All tools follow a consistent 'vim_' prefix with descriptive snake_case names that clearly indicate their function, such as vim_buffer_save, vim_command, and vim_search_replace. This uniform pattern makes the tool set predictable and easy to understand, with no deviations in style or structure.

    Tool Count4/5

    With 19 tools, the count is slightly high but reasonable for covering the broad scope of Neovim operations, including editing, navigation, file management, and system health. It avoids being excessive by focusing on core functionalities without redundant tools, though it might feel heavy compared to simpler servers.

    Completeness5/5

    The tool set provides comprehensive coverage of Neovim's core features, including CRUD-like operations for buffers, files, and content, as well as navigation, search, macros, marks, and system status. There are no obvious gaps; it supports full lifecycle management from opening files to editing, saving, and navigating, ensuring agents can handle typical workflows without dead ends.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers