Emacsclient
БесплатноНе проверенAn MCP server that provides LLMs with direct access to Emacs via its server protocol, offering 22 tools for editing, search, buffer management, and a PR review
Описание
An MCP server that provides LLMs with direct access to Emacs via its server protocol, offering 22 tools for editing, search, buffer management, and a PR review agent.
README
Emacs MCP server + Pi extension — 22 Emacs tools for LLM-assisted editing, search, buffer management, and PR review.
What is this?
A Model Context Protocol (MCP) server that gives LLMs direct access to Emacs — no emacsclient binary needed. It communicates via Unix socket using the Emacs server protocol, implementing &-quoting as defined in emacsclient.c and server.el.
Comes with:
- Rust MCP binary — 22 tools over JSON-RPC stdio
- Pi extension — auto-spawns the binary, registers all tools
- PR review agent — 4-phase workflow (Setup → Analysis → Issues → Report)
Quick Start
1. Install
# Option A: Pi package (recommended — gets extension + agent)
pi install npm:@bimawa/emacsclient-mcp
# Option B: Rust binary only (for other MCP clients)
cargo install emacsclient-mcp
# Option C: Homebrew (macOS)
brew install bimawa/tap/emacsclient-mcp
2. Start Emacs server
M-x server-start
;; or:
emacs --daemon
3. Reload Pi
/reload
Pi picks up the extension, spawns the binary, discovers 22 Emacs tools, and registers the emacs-pr-review agent.
Tools
| Category | Tools |
|---|---|
| Eval | emacs_eval — run arbitrary Elisp |
| Buffers | emacs_list_buffers, emacs_create_buffer, emacs_set_buffer_content, emacs_get_buffer_content, emacs_save_buffer, emacs_kill_buffer |
| Navigation | emacs_find_file, emacs_switch_to_buffer, emacs_goto_line, emacs_get_cursor_position, emacs_get_line |
| Search | emacs_search, emacs_replace |
| Editing | emacs_insert_at_point, emacs_get_region, emacs_set_mark |
| Windows | emacs_split_window_right, emacs_split_window_below, emacs_other_window, emacs_delete_other_windows, emacs_display_in_other_window |
PR Review Agent
Activate with /agent emacs-pr-review in Pi. The agent:
- Setup — gets the diff, opens review buffer in
org-mode, splits Emacs windows - Analysis — reads each changed file, applies review heuristics (R1–R4)
- Findings — documents issues by severity: BLOCKER / CRITICAL / WARNING / SUGGESTION
- Report — shows summary in Emacs, offers inline comments
Protocol
Implements the exact Emacs server protocol from server.el:
- Client sends first (no server greeting)
- Single-line commands:
-auth KEY -eval EXPR\n &-quoting: spaces →&_, newlines →&n, leading-→&-,&→&&- Response:
-emacs-pid PID\n-print RESULT\n
Binary Resolution
The extension finds the binary in this order:
EMACS_MCP_BINARYenvironment variable- Pre-built binary alongside the extension (package distro)
~/.cargo/bin/emacsclient-mcp(cargo install)which emacsclient-mcp(PATH / Homebrew)cargo run --release(dev mode)
Development
# Build the Rust binary
cargo build --release
# Run locally with Pi
pi -e ./extension/index.ts
# Test the MCP binary directly
echo '{"jsonrpc":"2.0","id":1,"method":"initialize",...}' | ./target/release/emacsclient-mcp
License
MIT © bimawa
Установка Emacsclient
У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.
▸ github.com/bimawa/emacsclient-mcpFAQ
Emacsclient MCP бесплатный?
Да, Emacsclient MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для Emacsclient?
Нет, Emacsclient работает без API-ключей и переменных окружения.
Emacsclient — hosted или self-hosted?
Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.
Как установить Emacsclient в Claude Desktop, Claude Code или Cursor?
Открой Emacsclient на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
Fetch
Web content fetching and conversion for efficient LLM usage.
AWS KB Retrieval
Retrieval from AWS Knowledge Base using Bedrock Agent Runtime.
автор: modelcontextprotocolSpring AI MCP Server
Provides auto-configuration for setting up an MCP server in Spring Boot applications.
llm-analysis-assistant
A very streamlined mcp client that supports calling and monitoring stdio/sse/streamableHttp, and can also view request responses through the /logs page. It also
автор: xuzexin-hzCompare Emacsclient with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории ai
