Skip to main content

Model Context Protocol (MCP) server for Emacs

Project description

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"
      }
    }

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mseep_emacs_mcp_server-0.1.0.tar.gz (2.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mseep_emacs_mcp_server-0.1.0-py3-none-any.whl (1.9 kB view details)

Uploaded Python 3

File details

Details for the file mseep_emacs_mcp_server-0.1.0.tar.gz.

File metadata

  • Download URL: mseep_emacs_mcp_server-0.1.0.tar.gz
  • Upload date:
  • Size: 2.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.12

File hashes

Hashes for mseep_emacs_mcp_server-0.1.0.tar.gz
Algorithm Hash digest
SHA256 30a9d7f63285f75ff02f5f20cc5c3e6a4db34b138f0c233ccfdb9801de30dcc8
MD5 ae22a387934a3246c89a66d2d595f6ec
BLAKE2b-256 7053ab8b41b8246f4e39fffe8719349c25526becf670220a11168af40e42773f

See more details on using hashes here.

File details

Details for the file mseep_emacs_mcp_server-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mseep_emacs_mcp_server-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c299d48f6c733a414e7c1a9762a4c32e8ff7efde04f00c8fcb9faac2c88873b6
MD5 964224311552b41ba76a7191d721d71f
BLAKE2b-256 590c5d10eaf7bf8d05f2a7dece516e361856526b058d4db15b724fe47988f913

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page