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
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:
| Tool | What it does | Key arguments |
|---|---|---|
run_command | Type a shell command and run it. | text; target = pane (default), tab, split_right, split_down |
read_screen | Read recent terminal text (scrollback + visible grid) from the focused pane. | lines (optional) |
send_input | Send raw text with no trailing newline (keystrokes / partial input). | text |
new_tab | Open a new terminal tab. | — |
split | Split the focused pane. | direction = right | down |
list_panes | List panes in the active tab with titles and working directories. | — |
list_tabs | List open tabs with titles and which is active. | — |
focus_tab | Switch to the tab at a zero-based index. | index |
notify | Post a desktop notification. | body; title (optional) |
list_macros | List saved command macros and what each replays. | — |
run_macro | Replay a saved macro into the focused pane. | name |
worktree_create | Create a git worktree from the focused pane's repository and open it in a new tab. | path; branch (optional) |
worktree_open | Open an existing git worktree path in a new tab. | path |
worktree_list | List the git worktrees of the focused pane's repository. | — |
worktree_remove | Remove a git worktree by path (git worktree remove). | path |
agent_states | Read 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.