Claude Code IDE for Sublime Text
Enables Sublime Text to integrate with Claude Code via the IDE protocol, providing in-editor diff review, selection context sharing, and @-mentions through a local WebSocket/MCP server.
README
Claude Code IDE for Sublime Text
English | 日本語
Native Claude Code IDE integration for Sublime Text 4 — in-editor diff review (accept/reject), live selection sharing, and @-mentions, speaking the same WebSocket/MCP protocol as the official VS Code and JetBrains extensions.
Unofficial community plugin — not affiliated with or endorsed by Anthropic. "Claude" and "Claude Code" are trademarks of Anthropic, PBC.

Status: core features working — server + context sharing (M1), in-editor diff review (M2), and parallel multi-session support are implemented and tested end-to-end. Polish phase (M3) in progress; not yet on Package Control.
Motivation — why Sublime Text in the LLM era?
Now that an agent writes much of the code, what should an editor be? Our answer:
- Instant and lightweight. Sublime opens in a blink and stays at ~100–300 MB while agent sessions, terminals, and browsers eat the rest of your RAM. The editor is where you read and judge code; it should never be the heavy part of the stack.
- Trivially extensible by you. In an LLM-first workflow, the editor is personal infrastructure: when Claude can write a Sublime plugin in minutes, a scriptable Python API beats a marketplace of prebuilt features. You compose exactly the cockpit you want — this plugin itself is proof.
- No bundled AI, by choice. AI-native IDEs (Cursor, Windsurf, …) and VS Code couple the agent to the editor — with their own subscription, model markup, and upgrade cadence. Claude Code is editor-agnostic; the missing piece was only the thin protocol layer that lets Sublime talk to it. This plugin adds that layer, so the editor stays fast and yours, and the agent stays first-class.
What it does
When Claude Code connects (via /ide or auto-connect), the plugin provides:
- In-editor diff review — Claude's proposed edits open as a side-by-side diff; accept, reject, or hand-edit before accepting (M2)
- Context sharing — current selection, open tabs, workspace folders, dirty state
selection_changedstreaming — Claude always knows what you're looking at@-mention — send the current selection range to the prompt- Lock-file discovery — works from Terminus inside Sublime or any external terminal
Install (manual, while in development)
- Clone this repo anywhere.
- Link it into Sublime's
PackagesasClaudeCodeIDE(any folder name works — imports are relative — but this name keeps settings-file lookup consistent):- Windows:
mklink /J "%APPDATA%\Sublime Text\Packages\ClaudeCodeIDE" "C:\path\to\repo" - macOS/Linux:
ln -s /path/to/repo "~/Library/Application Support/Sublime Text/Packages/ClaudeCodeIDE"
- Windows:
- Restart Sublime Text. The status bar shows
Claude ○ :<port>when the server is listening. - In any terminal, run
claude, then/ideand pick Sublime Text.
Development
Protocol core (claudeide/) is pure Python 3.8 with zero dependencies and never imports sublime, so it is unit-testable outside Sublime:
uv venv --python 3.8
uv pip install pytest
uv run pytest
The Sublime-facing layer lives in adapters/sublime_bridge.py + plugin_main.py.
Protocol
Implements Claude Code's IDE integration protocol (WebSocket + MCP 2025-03-26): lock file at ~/.claude/ide/<port>.lock, localhost-only WebSocket with x-claude-code-ide-authorization, and the standard tool set (openFile, openDiff, getCurrentSelection, getOpenEditors, …).
Protocol reference: coder/claudecode.nvim PROTOCOL.md — huge thanks to that project for documenting it.
FAQ
Does Claude Code work with Sublime Text?
Yes — with this plugin. Claude Code has no built-in Sublime Text support (official extensions exist for VS Code and JetBrains), but its IDE integration is a documented WebSocket/MCP protocol. This plugin implements that protocol natively in Sublime, so features like in-editor diff review, selection context, and @-mentions work the same way they do in the official extensions.
Is this an official Anthropic plugin?
No. It is an unofficial community plugin, not affiliated with or endorsed by Anthropic. It speaks the same protocol the official IDE extensions use, as documented by the claudecode.nvim project.
How do I connect Claude Code to Sublime Text?
Two ways:
- Manual: run
claudein any terminal, type/ide, and pick Sublime Text. - Auto-connect: set a fixed
"port"in the plugin settings and exportCLAUDE_CODE_SSE_PORT=<port>andENABLE_IDE_INTEGRATION=truemachine-wide. Every newclaudesession then attaches to Sublime automatically (~2 s after launch), from any terminal — including Terminus inside Sublime.
What happens when Claude edits a file?
The proposed change opens as a side-by-side diff tab in Sublime. Accept it (ctrl+alt+enter), reject it (ctrl+alt+backspace), or edit the proposal by hand before accepting. Claude blocks until you decide — nothing touches disk without your review.
Does my code get sent anywhere?
The plugin itself sends nothing to the network. It runs a WebSocket server on 127.0.0.1 (localhost only, token-authenticated) that talks to the Claude Code process on your machine. What Claude Code itself sends to Anthropic is governed by Claude Code, exactly as when you use it without an IDE.
Can I run multiple Claude Code sessions at once?
Yes. The server accepts concurrent clients, so several Claude sessions (e.g. one per project or task) can attach to the same Sublime instance in parallel; diff reviews from each are tracked independently.
Which platforms are supported?
The protocol core is dependency-free Python 3.8 (the Sublime Text 4 plugin host). Developed and tested end-to-end on Windows; macOS and Linux use the same code paths and are expected to work — issues and reports welcome.
Why keep Sublime instead of an AI-native IDE?
Because the agent doesn't need to live inside the editor. Claude Code runs in a terminal; the editor's job is reading, judging, and occasionally hand-editing what the agent proposes — a job Sublime does instantly and in ~100–300 MB of RAM. Decoupling means you upgrade the agent and the editor independently, with no bundled subscription or lock-in. See Motivation.
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。