home / mcp / elisp mcp server

Elisp MCP Server

Provides an MCP server for agentic Elisp development, exposing function docs, definitions, variable info, Info lookup, and source file reading.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "laurynas-biveinis-elisp-dev-mcp": {
      "command": "~/.emacs.d/emacs-mcp-stdio.sh",
      "args": [
        "--init-function=elisp-dev-mcp-enable",
        "--stop-function=elisp-dev-mcp-disable",
        "--server-id=elisp-dev-mcp"
      ]
    }
  }
}

The elisp_dev_mcp server enables AI agents to assist with Emacs Lisp development by exposing a structured MCP interface that lets you query documentation, inspect definitions, read source files, and explore Elisp symbols from within Emacs.

How to use

You register the elisp_dev_mcp server with your MCP client, then start the server inside Emacs to begin handling requests. The server provides practical handlers to describe functions, fetch definitions, inspect variables, look up Info documentation, and read source files.

How to install

Prerequisites include Emacs with MELPA configured for package installation. You also need the MCP server library installed to host the Elisp MCP server.

Steps you can follow to set up the server:

M-x package-refresh-contents
M-x package-install RET elisp-dev-mcp RET
M-x package-install RET mcp-server-lib RET
M-x mcp-server-lib-install

# Start Emacs with the MCP server available (the following command is illustrative; you start the server from Emacs using the provided start function in your session)
M-x mcp-server-lib-start

# Later, stop the server when you are finished
M-x mcp-server-lib-stop

Additional notes

Usage requires starting the MCP server within Emacs and registering the server with your MCP client using the provided CLI integration. You can register the server with a command that points the MCP client at the Emacs process and the Emacs Lisp MCP bridge script.

The server exposes a set of handlers for common Elisp tasks, including retrieving function documentation, obtaining function definitions, describing variables, looking up Info documentation, and reading Elisp source files from system directories and ELPA locations.

Available tools

elisp-describe-function

Get full documentation for an Emacs Lisp function including its interactive specifications and docstring.

elisp-get-function-definition

Retrieve the complete source code for an Emacs Lisp function, including header comments and location information.

elisp-describe-variable

Provide metadata about an Emacs Lisp variable without exposing its current value, including type, documentation, and source location.

elisp-info-lookup-symbol

Look up a symbol in Info documentation and return the complete documentation node and related metadata.

elisp-read-source-file

Read an Elisp source file from Emacs system directories or ELPA packages, supporting library names and absolute file paths.