Get the FREE Ultimate OpenClaw Setup Guide →

emacs

MCP server from toastynerd/emacs-mcp-server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio toastynerd-emacs-mcp-server npx -y emacs-mcp-server

How to use

This MCP server provides direct tooling to control a running Emacs instance via Claude Code using the Model Context Protocol. The available tools include emacs-mcp-open to open specific files in Emacs buffers, emacs-mcp-magit to view or work with Git changes using Magit, emacs-mcp-check to verify the Emacs server status and readiness, and emacs-mcp-list to enumerate the supported tools. After installing and registering these direct tools, you can issue commands through Claude Code like: /mcp emacs-mcp-open file_path="/path/to/file.txt" to open a file, /mcp emacs-mcp-magit repo_path="/path/to/repo" to inspect Git changes, /mcp emacs-mcp-check to confirm server health, and /mcp emacs-mcp-list to see all available capabilities. This setup complements git-mcp by enabling interactive Emacs workflows alongside repository documentation access provided through Git MCP integration.

How to install

Prerequisites:

  • Node.js v16+ and npm
  • Emacs with server mode enabled (M-x server-start)
  • Magit (for Git functionality)
  • Claude Code CLI installed

Installation steps:

  1. Install the MCP server globally (recommended):
npm install -g emacs-mcp-server
  1. Verify installation and run the MCP server (example):
npx -y emacs-mcp-server
  1. Register the MCP tools with Claude Code (examples):
claude mcp add emacs-mcp-open emacs-mcp-open
claude mcp add emacs-mcp-magit emacs-mcp-magit
claude mcp add emacs-mcp-check emacs-mcp-check
claude mcp add emacs-mcp-list emacs-mcp-list
  1. Optional development setup (local):
# Clone repo
git clone https://github.com/toastynerd/emacs-mcp-server.git
cd emacs-mcp-server

# Install dependencies
npm install

# Run unit tests (if applicable)
npm test

Prerequisites recap: ensure Emacs server is running, Magit is installed, and Claude Code CLI is configured to recognize the MCP tools.

Additional notes

Tips and caveats:

  • Ensure Emacs server is started (M-x server-start) before using the tools.
  • The emacs-mcp-magit tool relies on Magit being configured for the repository; ensure you have access rights and proper Git setup.
  • If Claude Code cannot reach Emacs, verify that network policies allow the CLI to communicate with the local Emacs server and that any required ports are accessible.
  • Check the tool list via emacs-mcp-list to confirm supported commands and correct tool names.
  • When using Open, you can pass additional parameters like file_path to specify the target file; adjust paths to match the host environment where Claude Code runs.

Related MCP Servers

Sponsor this space

Reach thousands of developers