Back to Home
rhblind icon

emacs-mcp-server

Verified Safe

by rhblind

Overview

Connect Large Language Models (LLMs) directly to Emacs, enabling them to interact with and control the Emacs environment for tasks like code manipulation, text editing, and executing Emacs Lisp commands.

Installation

Run Command
emacs --batch --eval "(add-to-list 'load-path (expand-file-name "."))" --eval "(require 'mcp-server)" --eval "(mcp-server-start-unix)" --eval "(while mcp-server-running (sleep-for 1))"

Environment Variables

  • EMACS_MCP_TIMEOUT
  • EMACS_MCP_DEBUG

Security Notes

The server exposes an `eval-elisp` tool, allowing execution of arbitrary Emacs Lisp expressions. While the project implements a comprehensive security model with permission systems, input validation (including scanning Elisp for dangerous patterns), execution timeouts, and sensitive file/buffer protection, direct arbitrary code execution inherently presents a high risk. Users must carefully configure security settings, understand the whitelist/blacklist mechanisms, and regularly review audit logs to mitigate potential vulnerabilities and prevent unauthorized access or code injection.

Similar Servers

Stats

Interest Score45
Security Score6
Cost ClassMedium
Avg Tokens300
Stars26
Forks2
Last Update2025-12-03

Tags

LLMEmacsMCPAI IntegrationCoding Agent