Vect MCP server
vect mcp serve is a stdio MCP server that hands any agent CLI the workspace,
orchestration and audit tools below. Register it in an agent's MCP config and
the agent can drive Vect itself instead of asking you to copy-paste:
| Tool family | Tools | What it replaces |
|---|---|---|
| Workspace | vect_terminal_run, vect_terminal_read, vect_browser_open, vect_open_file | "restart the dev server", pasting build logs, "open localhost and look", "open src/main.rs, line 42" |
| Orchestration | vect_spawn_agent, vect_list_sessions, vect_send_message, vect_read_output | agents spawning/steering other agents (cross-provider: claude → codex → opencode → hermes), with everything visible in Vect |
| Tasks | vect_task_list, vect_task_create, vect_task_update | tracking work items outside the audit hierarchy |
| Memory | vect_memory_list, vect_memory_save | project memory reads/writes that bypass MEMORY.md sync |
| Rooms | vect_room_list, vect_room_read | scrolling back through what a room said |
| Audit | vect_audit_query | "what did the other agent do?" |
How it connects
The desktop app hosts a localhost IPC bridge. Its port is written to
~/.vect/ipc.port, defaults to 9876, and can be overridden with
VECT_IPC_PORT. vect mcp serve proxies each tool call to it, so the
desktop app must be running. Tools fail with a clear
message otherwise. Spawning an agent, running a terminal command, opening a
page, writing memory and creating or updating a task are each appended to the
audit trail (~/.vect/audit.jsonl) as a tool_called action event. Sending a
message to a running agent is not recorded yet.
Every IPC request must carry the desktop instance's ipc_token. The desktop
generates a fresh random credential at startup and writes it to
~/.vect/ipc-<port>.token (owner-only permissions on Unix); VECT_HOME relocates
both the port and credential files. The bundled CLI and relay read this file
automatically. Custom IPC clients must add the credential to each JSON request
and reload it after a desktop restart. Unauthenticated requests are rejected
before dispatch. Requests must fit within 1 MiB and arrive within ten seconds.
Registering with an agent
Claude Code:
claude mcp add vect -- vect mcp serve --workspace /path/to/worktree
--workspace is optional; when set, workspace-scoped tools (terminal_run,
terminal_read, browser_open, memory_*) default to it so agents don't
have to pass paths. Other CLIs: add a stdio server entry with command vect
and args ["mcp", "serve"] in their MCP config (Vect's MCP settings UI can
manage these files).
Before Vect forwards a project's MCP commands from opencode.json to an agent,
it asks you to review their commands, arguments and environment. Choose
Trust only for projects whose code you trust: these programs run with your
user permissions. Cancel leaves those servers out of the session. The
settings list shows a project's servers only once you have trusted them, and
asks again right after you add or remove one there.
vect chat starts the servers a project's .mcp.json names only once you
have trusted them: run vect trust in the project to review and approve them.
Until then vect doctor lists them as waiting, and -p mode says it skipped
them.
Approval is stored outside the repository and applies only to that project path and the exact configuration contents. Changing either requires approval again. User-level agent configuration remains under your direct control.
Workspace terminals
vect_terminal_run / vect_terminal_read target the embedded terminal of a
workspace tab. Open the worktree as a workspace in Vect first (worktree list
→ panel icon, or the "Open Workspace" palette command). The terminal is the
same one you see, so an agent restarting your dev server happens in front of
you, not in a hidden shell.