mcp.el  by lizqwerscott

Emacs package for Model Context Protocol (MCP) client integration

Created 8 months ago
459 stars

Top 65.9% on SourcePulse

GitHubView on GitHub
Project Summary

MCP.el provides an Emacs client for the Model Context Protocol (MCP), enabling structured communication with MCP servers. It targets Emacs users who interact with AI models and large language models, offering features for managing server lifecycles, executing tools, and retrieving prompts and resources.

How It Works

MCP.el leverages Emacs Lisp to implement the MCP protocol, which is based on JSON-RPC over Server-Sent Events (SSE). It supports various server types, including filesystem and generic MCP servers, and provides an extensible system for tools and prompts. The client handles asynchronous and synchronous operations, resource management, and integrates with other Emacs AI packages like gptel and llm.

Quick Start & Requirements

  • Install Emacs 30 or higher.
  • Add (add-to-list 'load-path " ") and (require 'mcp-hub) to ~/.emacs.
  • Configure MCP servers via mcp-hub-servers in Emacs Lisp.
  • Start all configured servers with mcp-hub-start-all-server (e.g., via after-init-hook).
  • Manage servers using the mcp-hub interface.

Highlighted Details

  • Supports filesystem, fetch, Qdrant, and Graphlit MCP servers.
  • Integrates with gptel for enhanced AI workflows.
  • Provides functions for manual tool calls, prompt retrieval, and resource management.
  • Includes keybindings for server management (start, stop, restart, view logs).

Maintenance & Community

The project is licensed under GPLv3. The roadmap indicates planned features such as an MCP marketplace, simplified integration with other Emacs AI clients, expanded documentation, and full MCP protocol implementation.

Licensing & Compatibility

Licensed under GNU General Public License v3.0. This is a copyleft license, meaning derivative works must also be licensed under GPLv3.

Limitations & Caveats

The project is still under active development, with several roadmap items yet to be implemented, including an MCP marketplace and broader integration with other Emacs AI clients. Some examples rely on specific server implementations (e.g., "everything" server for prompts/resources) which may not be universally available.

Health Check
Last Commit

2 weeks ago

Responsiveness

1 day

Pull Requests (30d)
1
Issues (30d)
2
Star History
21 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.