Lib EL
Emacs Lisp implementation of the Model Context Protocol
What is Lib EL?
Lib EL is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to emacs lisp implementation of the model context protocol
Emacs Lisp implementation of the Model Context Protocol
This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Emacs Lisp implementation of the Model Context Protocol
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx lib-elConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Lib EL
mcp-server-lib.el is an Emacs Lisp library that provides the infrastructure for building Model Context Protocol servers directly inside Emacs. Rather than being a standalone MCP server, it lets Emacs package authors expose their own tools and resources — Elisp functions and buffers — to LLMs over the stdio MCP transport. Teams that live in Emacs can use it to turn any Elisp function into an AI-callable tool, bridging the gap between their editor environment and AI assistants like Claude.
Prerequisites
- Emacs 29.1 or later (uses built-in package infrastructure)
- MELPA or a compatible package archive configured in Emacs
- Basic familiarity with Emacs Lisp for registering custom tools
- An MCP-compatible client such as Claude Desktop that supports stdio servers
Install mcp-server-lib via the Emacs package manager
Open Emacs and run M-x package-install, then enter mcp-server-lib. This installs the library and its transport script dependencies from MELPA.
M-x package-install RET mcp-server-lib RETDeploy the stdio transport script
Run M-x mcp-server-lib-install inside Emacs to write the emacs-mcp-stdio.sh helper script to ~/.emacs.d/. This shell script is what MCP clients invoke to start the server process.
M-x mcp-server-lib-installRegister your tools and resources in your Emacs init file
Add a call to mcp-server-lib-register-server in your init.el or a dedicated package. Each tool entry maps an Elisp function to an MCP tool ID with a human-readable description.
(mcp-server-lib-register-server
:id "my-emacs-server"
:tools (list
(list #'my-list-files
:id "list-files"
:description "List files in a directory"))
:resources (list
(list "resource://notes/{name}"
(lambda (vars) (cdr (assoc 'name vars)))
:name "Notes")))Add the server to your MCP client configuration
Point your Claude Desktop config at the emacs-mcp-stdio.sh script. The script launches Emacs in batch mode and runs your registered server. Adjust the path to match your installation directory.
{
"mcpServers": {
"emacs": {
"command": "/bin/sh",
"args": ["~/.emacs.d/emacs-mcp-stdio.sh"]
}
}
}Enable debug logging if needed
Set the Elisp variable mcp-server-lib-log-io to t in your init file to log all JSON-RPC messages. You can also set the EMACS_MCP_DEBUG_LOG environment variable to a file path for persistent logs.
(setq mcp-server-lib-log-io t)Lib EL Examples
Client configuration
claude_desktop_config.json entry that invokes the emacs-mcp-stdio.sh transport script installed by mcp-server-lib-install.
{
"mcpServers": {
"emacs": {
"command": "/bin/sh",
"args": ["/Users/yourname/.emacs.d/emacs-mcp-stdio.sh"],
"env": {
"EMACS_MCP_DEBUG_LOG": "/tmp/emacs-mcp.log"
}
}
}
}Prompts to try
Example prompts after registering Emacs tools that expose editor functionality to Claude.
- "List the files in my ~/projects directory using the Emacs tool."
- "Read the content of the 'meeting-notes' resource from Emacs."
- "Run the list-buffers tool and tell me which buffers are currently open in Emacs."
- "Use Emacs to evaluate (+ 1 2) and return the result."Troubleshooting Lib EL
emacs-mcp-stdio.sh not found after running mcp-server-lib-install
Check the value of mcp-server-lib-install-directory in Emacs. By default it writes to ~/.emacs.d/. Set that variable to a custom path before running mcp-server-lib-install if you use a non-standard Emacs config directory.
Claude Desktop shows 'server disconnected' immediately on startup
Run the shell script manually in a terminal to see any startup errors. Ensure Emacs is on your PATH or provide an absolute path to the emacs binary inside the script. Check EMACS_MCP_DEBUG_LOG for JSON-RPC trace output.
Tools registered in init.el are not visible to the MCP client
The stdio transport runs Emacs in batch mode, which may skip your full init.el. Explicitly require your server package in the --init-function argument passed to the script, or load the file directly in init.el guarded by (when noninteractive ...).
Frequently Asked Questions about Lib EL
What is Lib EL?
Lib EL is a Model Context Protocol (MCP) server that emacs lisp implementation of the model context protocol It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Lib EL?
Follow the installation instructions on the Lib EL GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Lib EL?
Lib EL works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Lib EL free to use?
Yes, Lib EL is open source and available under the GPL-3.0 license. You can use it freely in both personal and commercial projects.
Lib EL Alternatives — Similar Developer Tools Servers
Looking for alternatives to Lib EL? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
Browse More Developer Tools MCP Servers
Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Lib EL in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Lib EL?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.