Sublime Text MCP logo

Sublime Text MCP

Control a running Sublime Text 4 instance through MCP, including file editing, project inspection, commands, UI interaction, 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"
      ]
    }
  }
}

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

We couldn’t confirm it starts correctly

The install command started, but didn't respond the way we expected when we tried to talk to it.

npx -y sublime-mcp

initialize succeeded but no response to tools/list.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked Today.

Overview

Sublime Text MCP MCP server connects MCP-speaking agents to a running Sublime Text 4 instance over streamable HTTP, legacy SSE, or an optional proxy. It can inspect project state, read and edit views, run Sublime commands, operate panels and menus, capture UI screenshots, and evaluate Python in Sublime's plugin host. Reach for it when an agent needs to work inside Sublime Text or interact with installed Sublime packages rather than only manipulating files externally. The server binds to loopback by default and supports configurable authentication, tool restrictions, and ports.

Use cases

  • Inspect the active Sublime Text file and project state
  • Edit and save files through Sublime views
  • Run Sublime commands or interact with installed packages
  • Operate quick panels, menus, dialogs, and editor UI

Key features

  • Streamable HTTP, SSE, and HTTP bridge endpoints
  • Typed tools for file, project, view, and editing workflows
  • Dynamic tool discovery and batched capability calls
  • Sublime command wrappers and plugin-host Python evaluation
  • UI screenshots and Windows-native interaction tools
  • Configurable ports, authentication, and disabled tools

Security & health

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

ActiveLast checked 3d ago

Recent health check succeeded.

5/5 checks healthy over the last 39d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 3d 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 downloads4.3kPackage downloads in the last 30 days.
Last commit4d agoMost recent push to the default branch.
Install checkInconclusiveStarted but did not complete the MCP handshake in our test.

How Sublime Text MCP works

What Sublime Text MCP does

Sublime Text MCP exposes a running Sublime Text 4 installation to MCP-compatible agents. It combines typed tools for common editor workflows with access to Sublime's command system and plugin environment. Agents can inspect open files, selections, tabs, projects, view regions, phantoms, quick panels, menus, and native dialogs. They can also write files, perform structured text replacement, save views, and invoke registered Sublime commands.

The server can reach functionality supplied by other installed Sublime packages. An agent can inspect package-related information and use run_command or eval_python when a package does not have a dedicated typed tool. This makes it suitable for editor automation, package investigation, and workflows that depend on Sublime's own plugin host.

How it works

The Sublime package starts the service inside Sublime Text. It provides streamable MCP HTTP at /mcp, legacy MCP SSE at /sse, and a plain HTTP bridge used by the bundled Node and Python proxies. Default ports differ by operating system; the package settings can override both the MCP and bridge ports.

Agents can connect directly to the streamable HTTP endpoint when their client supports URL-based MCP configuration. Clients without direct URL support can use the Node or Python proxy, which communicates with the HTTP bridge. The discover_tools tool exposes the catalog through categories or search, while batch invokes discovered capabilities without placing the entire catalog in the initial tool context.

Setup and configuration

Install the repository as a Sublime Text package by cloning it and linking the repository root into Sublime's Packages directory. The link locations differ on Windows, macOS, and Linux. Restart Sublime Text after creating the link so the plugin loads.

Configure the agent with the server's streamable HTTP URL, such as http://127.0.0.1:9502/mcp on a Windows default installation. For a proxy-based setup, install the package under packages/node-proxy or packages/python-proxy and run the corresponding command. The Node and Python proxies accept SUBLIME_MCP_BASE to select a different bridge URL and SUBLIME_MCP_TOKEN when token authentication is enabled.

The repository includes npx sublime-mcp doctor to check the bridge, MCP handshake, and focused catalog. Sublime Text also provides an MCP Commander: Connection Doctor command. Server settings are stored in MCP Commander.sublime-settings, where mcp_port, http_port, allow_lan_access, auth_token, and disabled_tools can be configured.

Tools and capabilities

Eight workflow tools are advertised by default:

  • discover_tools searches or browses the internal capability catalog.
  • batch invokes discovered capabilities in groups.
  • get_help provides live guidance.
  • get_active_file reads the active file context.
  • project_search searches the project.
  • save_file saves editor content.
  • str_replace_based_edit_tool performs text edits.
  • ui_screenshot captures Sublime windows and UI elements.

Additional capabilities include generated wrappers for Sublime commands, file and view operations, quick-panel selection, menu clicks, native-window management, keyboard and mouse input, resource claiming, package installation, and inspection of regions or phantoms. Windows-only UI tools can capture windows behind other applications and interact with dialogs, menus, palettes, and quick panels. Input actions wait for computer inactivity before sending real mouse or keyboard events.

Limitations and notes

The service is loopback-only by default and has no authentication unless an auth_token is configured. eval_python executes arbitrary Python in Sublime's process, so access should be treated as equivalent to access to the local user session. Enabling LAN access binds the service to all network interfaces without adding authentication; use a strong token when remote access is necessary.

Some MCP clients do not expose a way to send custom headers, which can prevent direct use of token authentication. Browser-origin requests are restricted, but this does not defend against another local process reaching the loopback service. Windows-specific UI functions are hidden on other platforms. Multiple agents sharing one Sublime instance can use resource claims to coordinate access to input and control panels.

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 inspect files, views, selections, tabs, and projects; edit and save content; run Sublime commands; operate parts of the UI; discover capabilities; and evaluate Python in Sublime's plugin host.

Install it by cloning the repository, linking its root into Sublime Text's Packages directory, and restarting Sublime Text. Then configure an MCP client with the server's streamable HTTP URL, or install the optional Node or Python proxy for clients that cannot connect to a URL directly.

Yes, Cursor is listed as a client that can use the streamable HTTP URL through its JSON MCP configuration. Point Cursor at the server endpoint, using the configured port and `/mcp` path, and ensure Sublime Text is running with the package loaded.

Set `auth_token` in `MCP Commander.sublime-settings` and send the matching Bearer token with every request. The server binds to `127.0.0.1` by default, but loopback access has no authentication unless a token is configured; avoid enabling LAN access without a strong token.

Yes, agents can investigate installed packages with `get_package_mcp_info` and use `run_command` or `eval_python` to reach functionality that lacks a dedicated typed tool. The server does not require a separate MCP server for each installed Sublime package.

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>