claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

Support for other IDEs (Neovim/Emacs)

Open garrett-hopper opened this issue 10 months ago • 12 comments

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.)

garrett-hopper avatar May 22 '25 18:05 garrett-hopper

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 avatar Jun 16 '25 05:06 ThomasK33

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!

V4G4X avatar Jun 16 '25 11:06 V4G4X

@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.

kylesnowschwartz avatar Jun 19 '25 21:06 kylesnowschwartz

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 avatar Jun 19 '25 22:06 net

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

danielespirito avatar Jun 21 '25 08:06 danielespirito

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

lelouvincx avatar Jun 25 '25 04:06 lelouvincx

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/

iusedmyimagination avatar Jun 26 '25 07:06 iusedmyimagination

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

iusedmyimagination avatar Jun 30 '25 18:06 iusedmyimagination

@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.

kylesnowschwartz avatar Jul 12 '25 01:07 kylesnowschwartz

@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.

trevorprater avatar Aug 12 '25 23:08 trevorprater