metaphasor
Docs menu

Agent integration

Phasor exposes project operations to agents through the Model Context Protocol (MCP). An agent in a compatible client retrieves work with its context, records implementation changes, and takes part in the project's discourse through these tools.

Configure an MCP client

phasor mcp serves Phasor's tools over stdio, and the MCP client starts it. How a server is registered depends on the client. Two common forms follow.

.mcp.json in the project folder, for a client that reads one
{"mcpServers": {"phasor": {
  "command": "phasor",
  "args": ["mcp", "-C", "C:\\Users\\ada\\snake"],
  "env": {"PHASOR_AGENT": "builder-1", "PHASOR_MODEL": "<the model id>"}
}}}
A TOML configuration file, for a client that lists its servers this way
[mcp_servers.phasor]
command = "phasor"
args = ["mcp", "-C", 'C:\Users\ada\snake']
env = { PHASOR_AGENT = "builder-2", PHASOR_MODEL = "<the model id>" }

Agent workflow

This is the workflow the generated instructions ask of an agent. Phasor supplies the instructions and the tools. It does not enforce the sequence.

  1. Load project instructions

    phasor init writes AGENTS.md at the project root: Phasor's standard agent instructions, followed by the project's rules. A client that reads AGENTS.md loads it when a session starts. With any other client, have the agent read it first.

  2. Retrieve work and context

    next lists open work in a fixed order. With load, an item carries its context: the intent text and what changed in it, the threads that reference it, the notes tagged for its paths and the project-wide notes, the project's rules, and the paths of the code, tests and checks bound to it. The rest of the record can be read with show, audit and walk.

  3. Implement and verify

    The agent edits code and tests in .phasor/work/, runs the checks with check, and records the work with land, naming the intent it covers and the rationale. land runs the bound checks and stops if one does not pass.

  4. Record decisions and handoffs

    A decision is posted to the thread it concerns. Something learned that the code does not show is written as a note. Work that stops part of the way is landed with a rationale that begins PARTIAL: and a thread that says what is left. The intent stays open, and the thread is delivered with it to the next session.

Tool sets and access

phasor mcp serves one of three tool sets. Tool definitions are sent to the model with every request, so each set is kept small.

Started withIntended forTools
phasor mcpAn agent that implementsstatus where help next show walk audit draft_new draft_list draft_show draft_write resolve check land sync revert annotate ignore take discuss_open discuss_post discuss_list remember memory
phasor mcp --ownerAn agent that writes and adopts intent on the owner's behalfstatus help outline show memory discuss_open discuss_post discuss_list remember adopt tag release-notes link_add link_bump link_list link_remove
phasor mcp --allTooling and tests68 tools: both sets above, with the history, collaboration and administration commands. The identity and credential commands are not served.

A tool is named after its command, with an underscore where the command has two words: discuss_open is phasor discuss open. The help tool lists the tools served and gives any tool's arguments with an example.

The tool set limits what an agent is offered, not what it is able to do. The server refuses a call to a tool outside the set it serves. An agent that can run shell commands can still run phasor adopt itself, and every agent started from your Phasor home signs with your identity, which is the project's owner. Phasor checks that an adoption carries the owner's signature. It does not tell the owner from the owner's agents.

Under the default set, what keeps an agent from changing intent is its instructions: AGENTS.md tells it not to change intent on its own and to raise a problem with intent in a thread. Start an agent with --owner when you want it to draft and adopt intent for you. Its adoptions are signed with your identity and labelled with the agent's name.

Interactive questions

Started with --ask, phasor mcp passes a question that an agent posts in a thread blocked on the owner to the MCP client, which shows it as a form if it can. An answer given there is recorded as the owner's post and concludes the thread. A question left unanswered stays in phasor status, as it would without --ask.