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.)
16 Comments
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!
@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.
Unfortunately claude-code.nvim doesn't have feature parity with the other IDE extensions (see https://github.com/greggh/claude-code.nvim/issues/27).
@net What does that mean? I thought someone was already looking into implementing this feature? Why is it not possible?
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
This is looking very promising for Emacs integration:
https://github.com/manzaltu/claude-code-ide.el
https://www.reddit.com/r/emacs/comments/1liv9ju/announcing_claude_code_ide_mcp_based_claude_code/
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
@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.
@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.
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.
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.
This issue is still present — please do not leave it idle or close it.
For Neovim/Emacs users, Claude Code already works well via the CLI in your terminal — but here are ways to get tighter integration:
Neovim:
claudein a Neovim terminal split (:term claude). This gives you Claude Code in a pane alongside your code.``
vim
`" In your init.lua or vimrc
command! -range Claude <line1>,<line2>w !claude -p
:Claude`, and get Claude's response in stdout.Select code, run
``
bash
``CLAUDE_CODE_SSE_PORT=3000 claude
Emacs:
claudeinM-x vtermorM-x shell. vterm handles the TUI better than basic shell-mode.``
elisp
``(defun claude-region (start end)
"Send region to Claude Code"
(interactive "r")
(shell-command-on-region start end "claude -p" "*Claude Output*"))
For both editors — the IDE integration protocol:
Claude Code's IDE integration uses:
~/.claude/ide/<port>.lockThe 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.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)
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