Emacs MCP Server
Emacs MCPサーバー
Emacs用のModel Context Protocol(MCP)サーバー。実行中のEmacsプロセス内でelispコードを生成および実行できるようにします。
ツール
サーバーは 2 つのツールを公開します。
generate_emacs_lisp_code: 指定されたタスクのelispを生成するexecute_emacs_lisp_code: elisp を実行中の Emacs (emacsclient経由) に渡して評価し、実行します。
Related MCP server: iTerm MCP
呼び出し
このプロジェクトはuvで管理されています。まず、 uv syncを実行してすべての依存関係をインストールします。次に、 source .venv/bin/activate 、生成された venv をアクティベートします。
インスペクターで MCP サーバーを実行するには:
mcp dev emacs_mcp_server.pyClaude Desktop が使用できるように MCP サーバーをインストールするには:
mcp install emacs_mcp_server.pyただし、 claude_desktop_config.json内のJSON設定を編集して、APIキーとemacsclientへのフルパスを追加する必要があります。以下のようになります。
"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"
}
}Available Tools
2 toolsexecute_emacs_lisp_codeC
Execute Emacs Lisp code by sending it to the Emacs process and return the result.
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions sending code to the Emacs process and returning results, but lacks details on permissions, side effects, error handling, or execution environment. This is a significant gap for a code execution tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that front-loads the core functionality with zero waste. Every word earns its place, making it appropriately sized and well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity of code execution, lack of annotations, no output schema, and low schema coverage, the description is incomplete. It doesn't cover return values, error cases, or execution nuances, leaving the agent with insufficient context for safe and effective use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema description coverage is 0%, so the description must compensate. It implies the 'code' parameter is Emacs Lisp code to execute, adding basic meaning beyond the schema. However, it doesn't detail syntax, constraints, or examples, leaving gaps in parameter understanding.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Execute Emacs Lisp code') and the resource ('Emacs process'), specifying that it sends code and returns results. However, it doesn't explicitly differentiate from its sibling tool 'generate_emacs_lisp_code', which likely generates code rather than executing it.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives, such as its sibling 'generate_emacs_lisp_code'. The description implies usage for executing code but lacks explicit context, prerequisites, or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
generate_emacs_lisp_codeC
Generate Emacs Lisp code for the given purpose.
| Name | Required | Description | Default |
|---|---|---|---|
| purpose | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. However, it only states what the tool does without any details on behavioral traits such as whether it's a read-only or destructive operation, authentication needs, rate limits, or what the output looks like. This makes it inadequate for informing the agent about how the tool behaves beyond its basic function.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise and front-loaded, consisting of a single sentence that directly states the tool's purpose. There is no wasted language or unnecessary elaboration, making it efficient and easy to parse. This is an example of optimal conciseness for a simple tool.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (code generation), lack of annotations, no output schema, and low parameter documentation, the description is incomplete. It doesn't provide enough context for the agent to understand how to use the tool effectively, such as what the generated code looks like, any limitations, or how it differs from executing code. This gap makes it insufficient for a tool with these characteristics.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 1 parameter with 0% description coverage, meaning the schema provides no details about the 'purpose' parameter. The description adds minimal semantics by implying the parameter is for specifying the purpose of the code generation, but it doesn't explain what format or content is expected, examples, or constraints. This leaves the parameter poorly documented, failing to compensate for the low schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Generate Emacs Lisp code for the given purpose.' It specifies the verb ('Generate'), resource ('Emacs Lisp code'), and input ('given purpose'), making it easy to understand what the tool does. However, it doesn't explicitly differentiate from its sibling tool 'execute_emacs_lisp_code', which is why it doesn't score a 5.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus its sibling 'execute_emacs_lisp_code'. It doesn't mention any prerequisites, alternatives, or exclusions, leaving the agent to infer usage based on the tool name alone. This lack of explicit guidance reduces its effectiveness in helping the agent select the correct tool.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
2 tool updates
v1.0.0- First observed
execute_emacs_lisp_code - First observed
generate_emacs_lisp_code
TDQS
Scored across 2 tools
The two tools have clearly distinct purposes: one executes Emacs Lisp code, while the other generates it. There is no overlap or ambiguity between these functions, making it easy for an agent to select the appropriate tool based on the task.
Both tools follow a consistent verb_noun pattern with 'execute_emacs_lisp_code' and 'generate_emacs_lisp_code'. The naming is uniform, using snake_case and clear verbs that accurately describe each tool's action.
With only two tools, the server feels thin for an Emacs integration, as it lacks operations like editing files, managing buffers, or handling common Emacs commands. This minimal set may limit agents in performing typical Emacs-related tasks.
The tool surface is severely incomplete for an Emacs server, covering only code execution and generation. It misses essential CRUD/lifecycle operations such as opening files, saving changes, or interacting with Emacs modes, which are core to the domain.
Maintenance
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
Enable secure connectivity between Sentry issues and debugging data, and LLM clients, using a Model Context Protocol (MCP) server.
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.14177 npm5,963MIT
- AlicenseBqualityDmaintenanceA Model Context Protocol server that gives AI models access to your iTerm terminal session, allowing them to read output, write commands, and send control characters.3110 npmMIT
- FlicenseNot gradedqualityDmaintenanceA demonstration implementation of the Model Context Protocol server that facilitates communication between AI models and external tools while maintaining context awareness.-
- AlicenseAqualityDmaintenanceA 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.547 npm14ISC