Lib EL

v1.0.0Developer Toolsstable

Emacs Lisp implementation of the Model Context Protocol

lib-elmcpai-integration
Share:
44
Stars
0
Downloads
0
Weekly
0/5

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

Implement Model Context Protocol in Emacs Lisp.
LicenseGPL-3.0
Languageemacs lisp
Versionv1.0.0
UpdatedMay 20, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx lib-el

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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
1

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 RET
2

Deploy 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-install
3

Register 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")))
4

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"]
    }
  }
}
5

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.

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.

Quick Config Preview

{ "mcpServers": { "lib-el": { "command": "npx", "args": ["-y", "lib-el"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides