EmacsSAFE
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
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.
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"
}
}9f8fc83d3aafOBSERVED · 2026-10-08Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control.
claude mcp add emacs-mcp-server -- uvx emacs-mcp-server
{
"mcpServers": {
"emacs-mcp-server": {
"command": "uvx",
"args": [
"emacs-mcp-server"
]
}
}
}Exposed tools (2)
1 read · 1 write · 0 destructive.
| Tool | Risk | Description |
|---|---|---|
execute_emacs_lisp_code | write | Execute Emacs Lisp code by sending it to the Emacs process and return the result. |
generate_emacs_lisp_code | read | Generate Emacs Lisp code for the given purpose. |
Trust audit
SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | PASS |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- none-observed
- Shell
- none-observed
- Dependencies
- pinned
- Secrets in source
- none-found
Findings (1)
Gates applied: no_behavioural_pass, no_license.
9f8fc83d3aaffull audit observations/trust-audit/mcp-server/vivekhaldar__emacs.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-08 | 9f8fc83d3aaf | SAFE | B | 89 | first audit |
Questions
What tools does Emacs expose?
2 in total: 1 read-only, 1 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.
Is Emacs safe to connect to an agent?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B.
What credentials does Emacs need?
No credential environment variables were found in its source, so it appears to need none.
How current is this page?
The grade is for one exact copy of the source (9f8fc83d3aaf), read on 2026-10-08. The repository is watched and re-audited when it changes.