mcp .el
A library for building mcp servers in Emacs lisp.
How to use
The mcp.el library allows you to build Model Context Protocol (MCP) servers using Emacs Lisp, enabling seamless integration with Emacs for enhanced programming capabilities. Developers can leverage this library to create custom tools that provide contextual information and improved interactions within the Emacs environment, making it ideal for building language servers or development tools tailored to specific workflows.
Once connected to the mcp.el server, you can interact using standard MCP commands such as initialize, shutdown, and context-specific queries that retrieve relevant data. You can send requests via the server's REPL or through custom commands you define within your Emacs configuration. This library supports a variety of commands that allow you to manipulate contexts and retrieve contextual information effectively.
How to install
Prerequisites
Ensure you have Emacs installed on your machine to utilize the mcp.el library.
Installation Steps
-
Clone the repository directly from GitHub:
git clone https://github.com/utsahi/mcp-server.el -
Add the following to your Emacs configuration file (typically
.emacsorinit.el):(add-to-list 'load-path "/path/to/mcp-server.el") (require 'mcp)
Replace "/path/to/mcp-server.el" with the actual path where you cloned the repository.
Alternatively, you can install the library using Emacs' built-in package manager if you have it set up to recognize local packages.
Additional notes
When configuring mcp.el, ensure that you properly set the context for your server to avoid issues with command execution. You may also want to check for Emacs package compatibility if you are using other libraries alongside mcp.el. Keep in mind that specific queries may require additional context setup to function optimally.
Related MCP Servers
claude-code-emacs
This package provides seamless integration with Claude Code, allowing you to run AI-powered coding sessions directly in your Emacs environment.
emacs
Pure ELISP MCP server for Emacs
org
Emacs Org-mode integration with Model Context Protocol (MCP) for AI-assisted task management
mcp -lib.el
Emacs Lisp implementation of the Model Context Protocol