Skip to main content
Glama

sublime-mcp

MCP server for Sublime Text 4 — lets AI agents read and control a running editor.

What it is

sublime-mcp is a Sublime Text plugin that speaks the Model Context Protocol. An agent connects to it over HTTP and works with the editor you already have open: it reads files, edits text, runs commands, and — on Windows — sees the screen and answers dialogs.

It runs inside Sublime's own plugin host, so there is no automation layer in between and no helper process to keep alive. Everything an agent does goes through Sublime's API, which means it sees the same tabs, selections, panels and menus you do.

Related MCP server: Bismuth_MCP_Godot

Table of contents

Install

1. Install the plugin

The repository root is the Sublime package. Clone it and link it into Sublime's Packages directory as sublime-mcp, then restart Sublime so the plugin loads.

:: Windows
mklink /J "%APPDATA%\Sublime Text\Packages\sublime-mcp" "C:\path\to\sublime-mcp"
# macOS
ln -s "$(pwd)" "$HOME/Library/Application Support/Sublime Text/Packages/sublime-mcp"

# Linux
ln -s "$(pwd)" "$HOME/.config/sublime-text/Packages/sublime-mcp"

The server starts with Sublime. MCP Commander: Server Status in the Command Palette starts, stops and reports it.

2. Point your agent at it

{ "mcpServers": { "sublime-mcp": { "type": "http", "url": "http://127.0.0.1:9502/mcp" } } }

On macOS and Linux the port is 9503. Clients that predate streamable HTTP can use "type": "sse" with http://127.0.0.1:9502/sse.

A client that can only launch a command needs one of the bundled proxies:

cd packages/node-proxy && npm install . && npx sublime-mcp    # Node
cd packages/python-proxy && pip install . && sublime-mcp      # Python

3. Check the connection

npx sublime-mcp doctor

It reports the HTTP bridge, the MCP handshake and the tool catalog. MCP Commander: Connection Doctor shows the server's side of the same picture.

Usage

A connected agent gets eight tools immediately — get_help, discover_tools, batch, get_active_file, project_search, save_file, str_replace_based_edit_tool and ui_screenshot — and finds everything else through discover_tools. That catalog covers editing and navigation, tabs and windows, Sublime commands by id, project state, quick panels and menus, the console, and the regions and phantoms a package drew. batch runs several of them in one request.

discover_tools(query="screenshot")
batch(calls=[{tool: "get_sheets", args: {}}, {tool: "get_console", args: {lines: 20}}])

If you are writing the agent side, read AGENT_GUIDE.md first: it is the order the tools should be used in, including the traps. The same guidance ships as a skill in skills/sublime-mcp; skills/package-skill-generator turns a one-off investigation of any other Sublime package — a debugger, a language server — into a small reusable skill instead of another MCP server.

Configuration

Settings live in MCP Commander.sublime-settings (Preferences › Package Settings › MCP Commander).

what

Windows

macOS / Linux

key

MCP streamable HTTP /mcp and legacy SSE /sse

9502

9503

mcp_port

HTTP bridge, used by the bundled proxies

9500

9501

http_port

The proxies read SUBLIME_MCP_BASE (for example http://127.0.0.1:9500) and SUBLIME_MCP_TOKEN when those differ from the defaults.

Security

Both servers listen on 127.0.0.1 and do not authenticate by default. One tool, eval_python, runs arbitrary code in Sublime's process, so an agent connected here can do anything you can do with that editor. Treat the connection as you would your own login session.

These settings change that posture:

  • auth_token — require Authorization: Bearer <token> on every request. This is the only control that helps against another process, or another user, on the same machine. Use a long random value; for a proxy, set the same value as SUBLIME_MCP_TOKEN.

  • allow_lan_access — bind 0.0.0.0 so other devices can connect. Still unauthenticated unless auth_token is set. Use it only for a specific client that cannot reach 127.0.0.1, such as WSL without localhost forwarding.

  • disabled_tools — refuse and hide named tools, for example ["eval_python", "run_command"].

Browsers are refused on the default configuration: the tool endpoints send no Access-Control-Allow-Origin, and with no token set they reject any request whose Origin or Host names something other than loopback. Command-line and desktop clients send no Origin and are unaffected. None of this stops a process already running as you; auth_token is the answer to that.

Requirements

  • Sublime Text 4 (developed against build 4215). Sublime Text 3 is not supported.

  • Windows, macOS or Linux. The ui_* and native-dialog tools are Windows only and are hidden elsewhere.

  • Python 3.8 or newer in Sublime's plugin host. Panels opened by older Python 3.3 packages are reachable with "install_py33_helper": true (off by default).

Maintainers

Donald Chitester.

Contributing

Issues and pull requests are welcome at dpc00/sublime-commander. For a bug, the useful report is the tool call, what you expected, and what came back — plus the relevant lines from View > Show Console.

Changes are recorded in CHANGELOG.md with the reason and how the fix was verified.

License

MIT © Donald Chitester. See LICENSE.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Gives MCP-compatible AI clients a controlled bridge to local files, processes, search, and document utilities, including reading/writing and moving files, text block editing, directory listing, content search, starting and managing terminal processes, and PDF/Excel/DOCX/image handling. It serves these tools over MCP Streamable HTTP at a configurable endpoint, with optional Bearer-token authentication and read-only or restricted-directory modes for safer remote exposure.
      1
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables AI agents to read and edit Godot 4.x scenes and resources, introspect the class API, run the game in a managed headless process with frame stepping, input injection and screenshots, validate scripts, and diagnose code via a built-in GDScript LSP plus a bridge to an already open editor.
      23
      MIT
    • F
      license
      Not graded
      quality
      A
      maintenance
      Exposes an OAuth-gated suite of 38 tools that lets web-based AI clients read and edit files, run whitelisted shell commands, search content, use Git and SQLite, drive browsers and DevTools, and reach localhost or LAN services, clipboard, notifications, ports, Postman, and long-running background tasks on your own machine. Everything runs locally with security controls such as folder scoping, command whitelisting, rate limits, and a call log.
      -
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to inspect, edit, and run Godot 4 projects — scenes, nodes, signals, resources, animations, tile maps, audio buses, visual shaders, project settings, input actions, and exports — with GDScript language-server diagnostics, offline class reference, live in-game debugging, and GUT/GdUnit4 test runs. It works through a live editor bridge so every edit can be undone with Ctrl+Z, and falls back to headless execution when the editor is closed.
      1
      MIT