Emacs MCP Server
by vivekhaldar
Emacs MCP 服务器
Emacs 的模型上下文协议 (MCP) 服务器。支持在正在运行的 Emacs 进程中生成和运行 elisp 代码。
工具
该服务器公开了两个工具:
generate_emacs_lisp_code:为给定任务生成 elispexecute_emacs_lisp_code:将 elisp 传递给正在运行的 Emacs(通过emacsclient)进行 eval 并执行它。
Related MCP server: MCP Toolkit
调用
该项目使用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"
}
}Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
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