Sublime Text MCP logo

Sublime Text MCP

Controls a running Sublime Text 4 instance through MCP, including files, commands, UI state, screenshots, and Python evaluation.

Install Sublime Text MCP

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "sublime-text-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "sublime-mcp"
      ],
      "env": {
        "SUBLIME_MCP_BASE": "YOUR_VALUE_HERE",
        "SUBLIME_MCP_TOKEN": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

Install not yet sandbox-tested— we haven't run this command through our automated sandbox yet. Not a red flag; we're working through the catalog.

Overview

Sublime Text MCP connects MCP-speaking agents to a running Sublime Text 4 instance through streamable HTTP, SSE, or an HTTP bridge. It exposes tools for reading and editing views, searching projects, invoking Sublime commands, inspecting tabs and UI state, and evaluating Python in Sublime’s plugin host. Windows clients can also inspect screenshots, interact with menus and dialogs, and control native windows. Reach for it when an agent needs to operate Sublime itself or interact with installed Sublime packages rather than only edit files externally.

Use cases

  • Inspect and edit the active Sublime Text project
  • Run Sublime commands from an AI coding workflow
  • Search project files and save targeted changes
  • Control quick panels, menus, and dialogs on Windows
  • Investigate or operate installed Sublime packages

Key features

  • Streamable HTTP, SSE, and HTTP bridge endpoints
  • Project search and view-editing tools
  • Dynamic discovery and batching of Sublime capabilities
  • Sublime command execution and plugin-host Python evaluation
  • Windows screenshots and UI interaction
  • Configurable authentication and tool disabling

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked 1d ago

Recent health check succeeded.

9/9 checks healthy over the last 53d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 22h ago via OSV.dev · sublime-mcp (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars4Stargazers on the source repository.
npm downloads5.7kPackage downloads in the last 30 days.
Last commit2d agoMost recent push to the default branch.

How Sublime Text MCP works

What Sublime Text MCP does

Sublime Text MCP gives an MCP client access to a running Sublime Text 4 process. Agents can inspect the active file, views, selections, tabs, project state, view regions, and plugin-rendered phantoms. They can also search a project, save files, perform string-replacement edits, run registered Sublime commands, and evaluate Python inside Sublime’s plugin host.

The server is useful beyond its built-in editing workflow. get_package_mcp_info, run_command, and eval_python can be used to investigate or operate other installed Sublime packages, including debuggers and language-server integrations. Resource claims let multiple agents take turns using the input and control panels.

How it works

The Sublime package starts local services inside the running editor. MCP streamable HTTP is available at /mcp, legacy MCP SSE at /sse, and a plain HTTP bridge supports the bundled Node and Python proxies. Default ports differ by operating system: the HTTP bridge uses 9500 on Windows and 9501 on macOS or Linux, while SSE uses 9502 on Windows and 9503 on macOS or Linux.

Eight workflow tools are advertised initially, including discover_tools, batch, get_help, get_active_file, project_search, save_file, str_replace_based_edit_tool, and ui_screenshot. discover_tools searches or browses a catalog of typed Sublime capabilities, while batch invokes discovered capabilities without placing the entire catalog in the initial tool list. Additional wrappers expose Sublime’s native commands.

On Windows, UI tools can capture Sublime windows, tabs, dialogs, menus, and popups, then click, type, hover, or press keys. Input waits for the person at the computer to become idle before acting. Native-window tools can read or dismiss blocking dialogs, and file-closing operations can discard unsaved changes without opening the Save Changes prompt.

Setup and configuration

Clone the repository and make the repository root available to Sublime as a package named sublime-mcp. On Windows, a directory junction can be created under %APPDATA%\\Sublime Text\\Packages; on macOS and Linux, create a symlink in the corresponding Sublime Packages directory. Restart Sublime Text after linking the package.

Configure an MCP client with a direct URL such as http://127.0.0.1:9502/mcp when it supports streamable HTTP. Clients that cannot connect to a URL directly can use the optional Node or Python proxy packages. Those proxies connect to the HTTP bridge and can be pointed at another bridge address with SUBLIME_MCP_BASE.

The MCP Commander.sublime-settings file accepts mcp_port and http_port overrides. Both services bind to loopback by default and have no authentication. Set auth_token to require a bearer token, and use the same value as SUBLIME_MCP_TOKEN when connecting through a bundled proxy. allow_lan_access changes the bind address to all network interfaces; disabled_tools can hide selected tools such as eval_python or run_command.

Tools and capabilities

  • Discover and batch-call typed Sublime capabilities.
  • Read and edit views, selections, files, tabs, and project state.
  • Search project content and save files.
  • Run registered Sublime commands and evaluate Python in the plugin host.
  • Inspect quick panels, menus, view regions, and view phantoms.
  • Capture and operate Sublime UI elements on Windows.
  • Claim, release, and inspect shared agent resources.
  • List or dismiss native dialogs and menus on Windows.

Limitations and notes

The editor must be running for the package and its services to respond. eval_python provides arbitrary code execution within Sublime’s process, so the server should be treated with the same trust level as the local user session. Loopback binding limits network exposure but does not prevent another local process or user from reaching the ports; authentication is recommended for shared machines.

Enabling LAN access exposes both services without authentication unless an auth token is configured. Some MCP clients do not provide a way to send custom headers, which affects direct connections requiring bearer authentication. Windows-only UI features are hidden on other platforms. Browser-origin requests are restricted, while command-line and desktop MCP clients that omit an Origin header are not affected.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Sublime Text MCP

Sublime Text MCP is an MCP server that connects AI agents to a running Sublime Text 4 instance. Its main tools read and edit views, search projects, save files, run Sublime commands, inspect tabs and UI state, capture screenshots on Windows, and evaluate Python in Sublime’s plugin host.

Clone the repository, link its root into Sublime Text’s Packages directory as `sublime-mcp`, and restart Sublime Text. Then configure an MCP client with the server’s streamable-HTTP URL, such as `http://127.0.0.1:9502/mcp` on Windows.

Yes, Sublime Text MCP is intended to let Claude Code control a running Sublime Text 4 instance. Configure Claude Code to connect to the server endpoint started by the Sublime package.

Yes, optional Node and Python proxies are available for clients that cannot connect to a URL directly. They use the server’s HTTP bridge, and `SUBLIME_MCP_BASE` overrides its address.

Set `auth_token` in `MCP Commander.sublime-settings` to require a bearer token on requests. Keep the default loopback binding unless LAN access is necessary, and disable broad tools such as `eval_python` or `run_command` with `disabled_tools` when appropriate.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewSublime Text MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/sublime-text-mcp?style=directory)](https://allmcps.com/mcp/sublime-text-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/sublime-text-mcp"><img src="https://allmcps.com/api/badge/sublime-text-mcp?style=directory" alt="Sublime Text MCP on AllMCPs" /></a>