Extending

MCP & automation

Sinclair can expose your live terminal to AI tools over the Model Context Protocol. Run sinclair mcp and an MCP client — Claude Desktop, Claude Code, or anything that speaks MCP — can open tabs, run commands, read the screen, and more, all in your real window.

How it works

sinclair mcp is a thin stdio server. It speaks the JSON-RPC dialect MCP clients use and forwards every tool call to your already-running Sinclair window over a per-user socket. The stdio process stays trivial (no GUI); the live window does the work. That means the agent acts in the same terminal you are looking at.

Enable it

The MCP server is gated behind the AI settings (off by default). Turn it on in Settings → AI (⌘,) or in your config:

// ~/.config/sinclair/settings.json
{
  "ai-enabled": true,
  "mcp-server-enabled": true
}

Connect a client

Point your MCP client at the sinclair mcp command. Most clients take a small JSON entry naming the command to spawn:

{
  "mcpServers": {
    "sinclair": { "command": "sinclair", "args": ["mcp"] }
  }
}

With Claude Code you can add it from the CLI:

claude mcp add sinclair -- sinclair mcp
Note

Keep a Sinclair window open — sinclair mcp bridges to the running instance, so tools act on your live terminal. See CLI reference for the command itself.

Tools

The server exposes these tools to the client:

ToolWhat it doesKey arguments
run_commandType a shell command and run it.text; target = pane (default), tab, split_right, split_down
read_screenRead recent terminal text (scrollback + visible grid) from the focused pane.lines (optional)
send_inputSend raw text with no trailing newline (keystrokes / partial input).text
new_tabOpen a new terminal tab.
splitSplit the focused pane.direction = right | down
list_panesList panes in the active tab with titles and working directories.
list_tabsList open tabs with titles and which is active.
focus_tabSwitch to the tab at a zero-based index.index
notifyPost a desktop notification.body; title (optional)
list_macrosList saved command macros and what each replays.
run_macroReplay a saved macro into the focused pane.name
worktree_createCreate a git worktree from the focused pane's repository and open it in a new tab.path; branch (optional)
worktree_openOpen an existing git worktree path in a new tab.path
worktree_listList the git worktrees of the focused pane's repository.
worktree_removeRemove a git worktree by path (git worktree remove).path
agent_statesRead every pane's reported agent status (working/blocked/done/idle) across the window.

Plus your plugins' tools. Any installed plugin that declares a tool ([[tool]]) contributes it here automatically, named <plugin-id>_<tool-id>. So the same agent that drives your terminal can also query a database, hit an internal API, or read host stats — through whatever plugins you've installed. That's the point: the terminal's extensions and its AI are the same surface.

Beyond a single terminal

MCP lets one client drive one terminal. To coordinate teams of agents that message each other and run in their own panes, Sinclair ships a local relay — see the Agent mesh. The same AI settings turn both on.