Direct MCP tools that allow Claude Code to communicate with and control a running Emacs instance.
This server has significant definition quality gaps. Four tools are explicitly defined with basic descriptions and Zod schemas, but the descriptions are minimal (34-50 chars), parameter descriptions lack format constraints and ranges, and output schemas are not formally documented. Tool naming is adequate (verb-noun pattern) but the list_tools tool is meta-introspection rather than a meaningful domain tool. No error handling guidance is present, errors thrown but not categorized as retryable/user-fixable/fatal. Schemas use Zod which translates to JSON Schema, but the server does not document or expose output schemas, forcing LLMs to infer result structure. No tool annotations (readOnlyHint/destructiveHint/idempotentHint) despite open_in_buffer being a WRITE operation. Security: no input sanitization visible for file paths or repo paths, risking command injection if LLMs pass untrusted input; temp logging to /tmp/emacs-mcp-direct.log could leak sensitive data.
Checks if the Emacs server is running
Lists all available tools in this MCP server
Opens the specified file in a new buffer in Emacs
Opens Magit to show Git changes
No output schemas documented or exposed. Tools return structured objects (content, metadata) but LLMs have no way to discover or rely on the schema. Forcing LLMs to infer result structure wastes tokens and risks hallucination.
Parameter descriptions lack format constraints, ranges, and prerequisites. file_path and repo_path accept strings but lack validation rules (absolute vs relative, must exist, etc.). LLMs pass invalid values, causing failures that lack recovery guidance.
No input sanitization for file_path and repo_path. Code executes these paths via emacsclient and shell commands. Untrusted input (e.g. file_path with shell metacharacters) could enable command injection. LLMs can be prompted to pass malicious payloads.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | F | 45 | 2026-07-28+ | v2 |
| 2026-03-09 | F | 0 | - | v1 |
Tool descriptions are sparse (34-50 chars, below 10-char baseline minimum for context). Descriptions do not explain WHEN to use each tool, prerequisites (Emacs server must be running), what happens on error, or why one tool differs from another. LLMs cannot determine tool selection confidence.
Error handling lacks guidance. Errors are thrown but not categorized as retryable, user-fixable, or fatal. No recovery suggestions (e.g. 'Call check_server() first' or 'Please start Emacs with M-x server-start'). Actionable errors are present in some code paths but not returned to LLM.
No tool annotations (readOnlyHint, destructiveHint, idempotentHint). open_in_buffer is a WRITE operation (modifies Emacs state) but has no destructiveHint annotation. LLMs cannot distinguish read-only from write tools and may make unwarranted assumptions about retry safety.
Temporary log file (/tmp/emacs-mcp-direct.log) accumulates unencrypted data without rotation or cleanup. If file paths, Emacs state, or errors contain sensitive information, they persist in a world-readable file. Violates secret-injection pattern.
list_tools is meta-introspection (describes the server itself) rather than a domain tool. Violates the pattern of 'each tool does exactly one thing', this tool is not about controlling Emacs, but about tool discovery. Standard MCP discovery (via /mcp/tools request) is more appropriate.