Emacs MCP 服务器
Emacs 的模型上下文协议 (MCP) 服务器。支持在正在运行的 Emacs 进程中生成和运行 elisp 代码。
工具
该服务器公开了两个工具:
generate_emacs_lisp_code
:为给定任务生成 elispexecute_emacs_lisp_code
:将 elisp 传递给正在运行的 Emacs(通过emacsclient
)进行 eval 并执行它。
调用
该项目使用uv
进行管理。首先,运行uv sync
安装所有依赖项。然后source .venv/bin/activate
激活生成的 venv。
要在检查器中运行 MCP 服务器:
mcp dev emacs_mcp_server.py
安装 MCP 服务器以便 Claude Desktop 可以使用它:
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"
}
}
local-only server
The server can only run on the client's local machine because it depends on local resources.
模型上下文协议服务器,能够在正在运行的 Emacs 进程中生成和执行 Elisp 代码,从而允许 AI 助手控制和与 Emacs 交互。
Related MCP Servers
- -securityFlicense-qualityA demonstration implementation of the Model Context Protocol server that facilitates communication between AI models and external tools while maintaining context awareness.Last updated -
- -securityFlicense-qualityA comprehensive Model Context Protocol server implementation that enables AI assistants to interact with file systems, databases, GitHub repositories, web resources, and system tools while maintaining security and control.Last updated -331
- -securityFlicense-qualityA Model Context Protocol server that enables integration with the TESS API, allowing users to list and manage agents, execute agents with custom messages, and manage files through natural language interfaces.Last updated -
- AsecurityAlicenseAqualityAn implementation of the Model Context Protocol server that enables AI models to communicate with Edge Security Acceleration (ESA) services, allowing models to manage routines, deployments, routes, records, and sites through standardized protocols.Last updated -4220424MIT License