emacs-mcp-server
Verified Safeby 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
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
mcp-use
A full-stack framework for building Model Context Protocol (MCP) servers, MCP clients, and AI agents in both Python and TypeScript, supporting interactive UI widgets and robust debugging.
wcgw
An MCP server that empowers AI chat applications to execute shell commands, edit code, and manage project context on a local machine for development tasks.
cclsp
MCP server to integrate LLM-based coding agents with Language Server Protocol (LSP) servers for robust symbol resolution and code navigation.
mcp-use-cli
An interactive command-line interface (CLI) tool for connecting to and interacting with Model Context Protocol (MCP) servers using natural language, acting as an AI client that orchestrates LLM responses with external tools.