Emacs MCP Server
Model Context Protocol (MCP) server for Emacs. Enables generating and running elisp code in a running Emacs process.
Tools
The server exposes two tools:
generate_emacs_lisp_code
: generates elisp for a given taskexecute_emacs_lisp_code
: passes elisp to a running Emacs (viaemacsclient
) to eval and execute it.
Invocation
The project is managed with uv
. First, run uv sync
to install all dependencies. Then source .venv/bin/activate
to activate the resulting venv.
To run the MCP server in the inspector:
To install the MCP server so that Claude Desktop can use it:
But you will have to edit the resulting JSON config in claude_desktop_config.json
to include API keys and the full path to emacsclient
. It should look something like this:
This server cannot be installed
A Model Context Protocol server that enables generating and executing Elisp code in a running Emacs process, allowing AI assistants to control and interact with Emacs.