MCP Catalogs
Home

claude-code-emacs

by yuya373·63·Score 46

Emacs package providing MCP integration for Claude Code, enabling AI-powered coding sessions with buffer and LSP operations.

developer-toolsai-llmproductivity
6
Forks
2
Open issues
this month
Last commit
2d ago
Indexed

Overview

Claude Code Emacs provides seamless integration between Emacs and Claude Code through the Model Context Protocol. It enables AI-powered coding sessions directly within Emacs with project isolation, smart file completion, and custom commands. The package offers deep integration with Emacs features including buffer operations, LSP diagnostics, and Git workflows, creating a powerful coding assistant environment. Its modular design ensures efficient real-time communication between Emacs and Claude Code through WebSocket connections.

Try asking AI

After installing, here are 5 things you can ask your AI assistant:

you:AI-assisted code refactoring and optimization within Emacs
you:Real-time debugging with LSP diagnostic integration
you:Automated code generation using project-specific prompts and custom commands
you:What Emacs versions are required?
you:How does the MCP server communicate with Emacs?

When to choose this

Choose this if you're an Emacs user who wants to integrate Claude Code directly into your editing environment without switching contexts.

When NOT to choose this

Not ideal if you don't use Emacs or prefer a more generalized IDE with AI capabilities, as this solution is tightly coupled with Emacs.

Tools this server exposes

12 tools extracted from the README
  • list_buffers

    List open buffers in Emacs

  • read_buffer

    Read contents of an Emacs buffer

  • get_selected_text

    Get currently selected text in Emacs

  • get_diagnostics

    Get LSP diagnostics for current buffer

  • find_definition

    Find definition of symbol using LSP

  • find_references

    Find references to symbol using LSP

  • describe_symbol

    Get documentation for symbol using LSP

  • diff_files

    Compare two files showing differences

  • view_git_changes

    View git changes for current file

  • apply_patch

    Apply patch to file

  • commit

    Create git commit

  • push

    Push changes to remote git repository

Note: Tool names inferred from MCP integration section and key features, as README doesn't provide explicit MCP tool documentation

Comparable tools

vscode-claude-codecursoremacs-gptel

Installation

# Install MCP server globally
npm install -g claude-code-mcp-server

# Configure Claude Code to use MCP
claude mcp add-json emacs '{
  "type": "stdio",
  "command": "claude-code-mcp"
}'

# Add to Emacs init.el
(add-to-list 'load-path "/path/to/claude-code")
(require 'claude-code)
(global-set-key (kbd "C-c c") 'claude-code-transient)

FAQ

What Emacs versions are required?
Emacs 28.1 or later is required. Additional packages like projectile, vterm, transient, and markdown-mode are needed. LSP-mode (9.0.0+) is optional but recommended for full functionality.
How does the MCP server communicate with Emacs?
The server uses stdio communication with Claude Code and maintains a separate WebSocket connection for each project. This enables real-time event batching and automatic reconnection with health monitoring.

Compare claude-code-emacs with

GitHub →

Last updated · Auto-generated from public README + GitHub signals.