# Sublime Text MCP [Health: Active]

**Category:** 💻 Developer Tools  
**Repository:** https://github.com/dpc00/sublime-mcp  
**GitHub Stars:** 4  
**npm Downloads (last month):** 4307  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/sublime-text-mcp

## Description
MCP server for Sublime Text 4. Lets Claude Code read and control a running ST instance.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "sublime-text-mcp": {
    "command": "npx",
    "args": ["-y","sublime-mcp"]
  }
}
```

## Documentation

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

_Full upstream README: https://allmcps.com/mcp/sublime-text-mcp/readme_

