Support for other IDEs (Neovim/Emacs)

Open 💬 16 comments Opened May 22, 2025 by garrett-hopper

Looking at the VSCode extension, it looks like integration with other IDEs may be as simple as exposing an MCP server with the necessary tools. (And setting ENABLE_IDE_INTEGRATION/CLAUDE_CODE_SSE_PORT/~/.claude/ide/<port>.lock)

Would it be possible to document the expected tools used by the IDE integration to allow 3rd party IDE integrations?

Are there existing plans/roadmaps for other IDEs?

I'm specifically looking to integrate more deeply with Neovim/Emacs. Ideally that would be open-source and easily modifiable. (Neovim/Emacs users tend to have particular setups and would likely desire more customizability to work properly with their particular configurations/plugins.)

View original on GitHub ↗

16 Comments

ThomasK33 · 1 year ago

Hey @garrett-hopper,

I analyzed the VS Code extension protocol and built a Neovim plugin based on those findings: https://github.com/coder/claudecode.nvim/

For the documentation you're looking for, check out PROTOCOL.md.
I documented the WebSocket MCP protocol at that time, along with all the tools Claude expects. (I'll need to look into the expected tools again, since I'm seeing calls to new tools that didn't exist at the time, like closing all diff tabs.)

For other IDEs: The protocol is editor-agnostic. Any editor that can run a WebSocket server and implement the MCP tools can integrate with Claude Code. An Emacs integration would be feasible using the same approach.

V4G4X · 1 year ago
Hey @garrett-hopper, I analyzed the VS Code extension protocol and built a Neovim plugin based on those findings: https://github.com/coder/claudecode.nvim/ For the documentation you're looking for, check out PROTOCOL.md. I documented the WebSocket MCP protocol at that time, along with all the tools Claude expects. (I'll need to look into the expected tools again, since I'm seeing calls to new tools that didn't exist at the time, like closing all diff tabs.) For other IDEs: The protocol is editor-agnostic. Any editor that can run a WebSocket server and implement the MCP tools can integrate with Claude Code. An Emacs integration would be feasible using the same approach.

@ThomasK33 That is some crazy work, Thank you!

kylesnowschwartz · 1 year ago

@ThomasK33 There is also an alternative (which I've contributed to) at https://github.com/greggh/claude-code.nvim I'll try yours out as well. It would be great if Anthropic would release an 'official' one with feature parity.

net · 1 year ago

Unfortunately claude-code.nvim doesn't have feature parity with the other IDE extensions (see https://github.com/greggh/claude-code.nvim/issues/27).

danielespirito · 1 year ago

@net What does that mean? I thought someone was already looking into implementing this feature? Why is it not possible?

lelouvincx · 1 year ago

Thanks for the hard work @ThomasK33 ,

When I open a terminal inside VSCode, it allows data transfer immediately. Do you know how it is allowed to connect without my consent on VSCode?

https://github.com/user-attachments/assets/7652bcf6-d2f8-4f79-a716-3d54db973b33

iusedmyimagination · 1 year ago

See also:
https://github.com/yuya373/claude-code-emacs
https://github.com/yuya373/claude-code-emacs/blob/master/docs/MCP-SETUP.md

🔌 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

kylesnowschwartz · 1 year ago

@ThomasK33 the last release and commit to your excellent https://github.com/coder/claudecode.nvim/ plugin was 3-weeks ago - meanwhile PRs and issues are starting to pile up. Do you want to take on some additional maintainers? Do the folks at Coder plan to continue to support the extension? Thanks for your great work to date.

trevorprater · 11 months ago

@kylenowschwartz, To be clear, this doesn't interact with the Neovim LSP interface, right? Not in the sense that it returns diagnostics, at least. According to the README, it seems.

aristeoibarra · 7 months ago

Any updates on official Neovim support? The community plugins (claudecode.nvim) work but lack feature parity with VS Code.

Having official documentation for the IDE protocol would help maintainers keep plugins up to date with new features.

github-actions[bot] · 6 months ago

This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

cndoit18 · 6 months ago

This issue is still present — please do not leave it idle or close it.

yurukusa · 3 months ago

For Neovim/Emacs users, Claude Code already works well via the CLI in your terminal — but here are ways to get tighter integration:
Neovim:

  1. Terminal split: Run claude in a Neovim terminal split (:term claude). This gives you Claude Code in a pane alongside your code.
  2. claudeterm.nvim (community): There are community plugins emerging that wrap Claude Code's CLI. Search GitHub for "claude-code neovim".
  3. Pipe mode for programmatic use:

``vim
" In your init.lua or vimrc
command! -range Claude <line1>,<line2>w !claude -p
`
Select code, run
:Claude`, and get Claude's response in stdout.

  1. MCP integration: If you use an MCP-capable Neovim plugin, you can connect to Claude Code's MCP server:

``bash
CLAUDE_CODE_SSE_PORT=3000 claude
``
Emacs:

  1. shell-mode / vterm: Run claude in M-x vterm or M-x shell. vterm handles the TUI better than basic shell-mode.
  2. Pipe mode:

``elisp
(defun claude-region (start end)
"Send region to Claude Code"
(interactive "r")
(shell-command-on-region start end "claude -p" "*Claude Output*"))
``

  1. gptel.el: The gptel Emacs package supports custom backends — it may be possible to point it at Claude Code's local API.

For both editors — the IDE integration protocol:
Claude Code's IDE integration uses:

  • SSE server on a configurable port
  • Lock file at ~/.claude/ide/<port>.lock
  • MCP-like tool protocol over the SSE connection

The protocol isn't officially documented yet, but the VS Code extension source (extension.js) is readable and shows the expected tool interfaces. Community reverse-engineering efforts are underway.

RobynTheDevil · 2 months ago
For Neovim/Emacs users, Claude Code already works well via the CLI in your terminal — but here are ways to get tighter integration: Neovim: 1. Terminal split: Run claude in a Neovim terminal split (:term claude). This gives you Claude Code in a pane alongside your code.

Have you had an issue sending <esc> to the embedded neovim terminal running claude cli? Claude does not register any <esc> presses in the neovim termial. I am trying to figure out if this is an issue in my environment or with claude cli. The issue persists even with no custom mappings (nvim --clean)

firish · 7 days ago

The IDE integration protocol is implementable by third parties. I reverse-engineered it and built the Visual Studio side as a community extension (a lockfile in ~/.claude/ide, a localhost WebSocket speaking MCP, and the tools the CLI drives like openDiff and getDiagnostics; the CLI auto-connects when ENABLE_IDE_INTEGRATION and the port env var are set). It has stayed stable across CLI updates as long as you smoke-test on version bumps.

So a Neovim or Emacs implementation is very doable without waiting on official support. Mine is MIT and the protocol details are documented in the repo if anyone wants a reference: https://github.com/firish/claude_code_vs