Atlas / MCP servers / yuya373 / Claude Code Emacs

Claude Code EmacsSAFE

mcp/yuya373/claude-code-emacs

This package provides seamless integration with Claude Code, allowing you to run AI-powered coding sessions directly in your Emacs environment.

Verdict
SAFE
Grade
B
Trust score
89 /100
Exposed tools
14 14r · 0w · 0d
Transport
stdio
License
GPL-3.0
Stars
67
01

Overview

From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.

[](https://github.com/yuya373/claude-code-emacs/actions/workflows/test.yml)

Run Claude Code AI coding sessions directly in Emacs with powerful MCP integration.

Quick Start

;; Add to your init.el
(add-to-list 'load-path "/path/to/claude-code")
(require 'claude-code)
(global-set-key (kbd "C-c c") 'claude-code-transient)
# 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"
}'

Now run M-x claude-code-run to start a session!

Key Features

🚀 Core Features

  • Project-isolated sessions - Each project gets its own Claude Code buffer
  • Smart file completion - Type @ in prompts to reference project files
  • Transient menus - Press C-c c for the main menu with all commands
  • Custom commands - Define reusable commands in .claude/commands/*.md
  • Project prompts - .claude-code.prompt.md file per project for persistent context

🔌 MCP Integration

Claude Code can directly interact with your Emacs environment:

  • Buffer operations - List/read open buffers, get selected text
  • LSP integration - Get diagnostics, find definitions/references, describe symbols
  • Diff tools - Compare files, view git changes, apply patches
  • Real-time events - Buffer changes and diagnostics sent to Claude Code automatically
  • Automatic reconnection - If Emacs restarts, running sessions (including background agents) re-register themselves and reconnect automatically

⌨️ Key Bindings

Global

In Claude Code Session (vterm mode)

Read from source at commit 1f9992b437d1OBSERVED · 2026-10-07
02

Connect

Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control.

claude-code
claude mcp add claude-code-mcp-server -- npx -y [email protected]
claude-desktop
{
  "mcpServers": {
    "claude-code-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "[email protected]"
      ]
    }
  }
}
03

Exposed tools (14)

14 read · 0 write · 0 destructive.

ToolRiskDescription
describeSymbolread
file1.tsreadFirst file
file2.tsreadSecond file
findReferencesread
getCurrentSelectionread
getDefinitionread
getDiagnosticsread
getOpenBuffersread
main.tsreadBuffer: /project/src/main.ts
openCurrentChangesread
openDiffContentread
openDiffFileread
openRevisionDiffread
sendNotificationread
04

Trust audit

SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.

LayerWhat it checksResult
L0Provenance & inventoryPASS
L1Static analysis of the codePASS
L2Instruction surface (what it tells the agent)PASS
L3Class-specific surfacePASS
L4Behavioural (sandbox)SKIPPED

What the source does

Filesystem
none-observed
Network
declared (5 observation(s))
Shell
none-observed
Dependencies
not all pinned
Secrets in source
none-found

Findings (6)

LOWFilesystem / path · fs.traversal · CWE-22, CWE-59
mcp-server/test/resources/buffer-resource.test.ts:2
import { bufferResourceHandler } from '../../src/resources/buffer-resource.js';
LOWFilesystem / path · fs.traversal · CWE-22, CWE-59
mcp-server/test/resources/buffer-resource.test.ts:3
import { EmacsBridge } from '../../src/emacs-bridge.js';
LOWFilesystem / path · fs.traversal · CWE-22, CWE-59
mcp-server/test/tools/buffer-tools.test.ts:1
import { handleGetOpenBuffers } from '../../src/tools/buffer-tools';
LOWFilesystem / path · fs.traversal · CWE-22, CWE-59
mcp-server/test/tools/buffer-tools.test.ts:2
import { EmacsBridge } from '../../src/emacs-bridge';
LOWFilesystem / path · fs.traversal · CWE-22, CWE-59
mcp-server/test/tools/definition-tools.test.ts:1
import { handleGetDefinition, GetDefinitionArgs } from '../../src/tools/definition-tools.js';
LOWSupply chain · supply.unpinned · CWE-829, CWE-1357
mcp-server/package.json
@modelcontextprotocol/sdk, express, ws, zod, @types/express, @types/jest, @types/node, @types/ws
Why it matters. 12 dependency range(s) float
Fix. pin exact versions or ship a lockfile

Gates applied: no_behavioural_pass.

Audited 2026-10-07 · audit v0.4.1 · source sha 1f9992b437d1full audit observations/trust-audit/mcp-server/yuya373__claude-code-emacs.json · Report an issue / request a re-scan
05

Audit history

Every audit this server has had. A grade with a past is a grade somebody is still checking.

DateSourceVerdictGradeScoreChange
2026-10-071f9992b437d1SAFEB89first audit
06

Questions

What is the Claude Code Emacs MCP server?

This package provides seamless integration with Claude Code, allowing you to run AI-powered coding sessions directly in your Emacs environment.

What tools does Claude Code Emacs expose?

14 in total: 14 read-only, 0 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.

Is Claude Code Emacs safe to connect to an agent?

The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B.

What credentials does Claude Code Emacs need?

No credential environment variables were found in its source, so it appears to need none.

How does Claude Code Emacs run?

It speaks stdio, so it runs as a local process your client starts. It is published on npm as claude-code-mcp-server at 0.10.1.

How current is this page?

The grade is for one exact copy of the source (1f9992b437d1), read on 2026-10-07. The repository is watched and re-audited when it changes.

Advertisement