Skip to main content
Glama

Emacs MCP Server

by vivekhaldar

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 task
  • execute_emacs_lisp_code: passes elisp to a running Emacs (via emacsclient) 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:

mcp dev emacs_mcp_server.py

To install the MCP server so that Claude Desktop can use it:

mcp install emacs_mcp_server.py

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:

"Emacs-MCP-Server": { "command": "/Users/haldar/.local/bin/uv", "args": [ "run", "--with", "mcp[cli]", "--with", "smartfunc", "mcp", "run", "/Users/haldar/repos/gh/emacs-mcp-server/emacs_mcp_server.py" ], "env": { "OPENAI_API_KEY": "sk-xxxx", "EMACSCLIENT": "/your/path/to/emacsclient" } }
-
security - not tested
-
license - not tested
-
quality - not tested

local-only server

The server can only run on the client's local machine because it depends on local resources.

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.

  1. Tools
    1. Invocation

      Related MCP Servers

      • A
        security
        F
        license
        A
        quality
        A Model Context Protocol server that allows secure execution of pre-approved commands, enabling AI assistants to safely interact with the user's system.
        Last updated -
        1
        3
        18
        JavaScript
      • -
        security
        F
        license
        -
        quality
        A Model Context Protocol server that enables AI assistants like Claude to perform Python development tasks through file operations, code analysis, project management, and safe code execution.
        Last updated -
        1
        Python
        • Linux
        • Apple
      • -
        security
        F
        license
        -
        quality
        A Model Context Protocol server that bridges AI assistants like Claude with Wordware's specialized agent capabilities, allowing dynamic loading and access to any Wordware flow through a standardized interface.
        Last updated -
        Python
      • A
        security
        F
        license
        A
        quality
        A Model Context Protocol server implementation that provides structured, AI-friendly access to eRegulations data, making it easier for AI models to answer user questions about administrative procedures.
        Last updated -
        4
        19
        TypeScript
        • Linux
        • Apple

      View all related MCP servers

      MCP directory API

      We provide all the information about MCP servers via our MCP API.

      curl -X GET 'https://glama.ai/api/mcp/v1/servers/vivekhaldar/emacs-mcp-server'

      If you have feedback or need assistance with the MCP directory API, please join our Discord server