Emacs MCP Server
Enables OpenAI models to interact with Emacs through the MCP server, as indicated by the OPENAI_API_KEY requirement in the configuration.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Emacs MCP Serveropen my todo.org file and show the first 5 items"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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.
Related MCP server: MCP Server Demo
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.pyTo install the MCP server so that Claude Desktop can use it:
mcp install emacs_mcp_server.pyBut 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"
}
}Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityFmaintenanceA Model Context Protocol server that enables AI assistants to interact with the Godot game engine, allowing them to launch the editor, run projects, capture debug output, and control project execution.Last updated141804,992MIT
- Flicense-qualityDmaintenanceA demonstration implementation of the Model Context Protocol server that facilitates communication between AI models and external tools while maintaining context awareness.Last updated
- AlicenseAqualityFmaintenanceA Model Context Protocol server that enables AI assistants to interact with iTerm2 terminals, allowing creation and management of terminal sessions, command execution, and reading terminal output.Last updated54214ISC
- -licenseAquality-maintenanceA Model Context Protocol server that allows LLMs to interact with Python environments, enabling code execution, file operations, package management, and development workflows.Last updated9
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to control Unreal E…
A Model Context Protocol server for Wix AI tools
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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