MCP

Connect an MCP-capable host to you-agent-factory with you mcp serve over stdio, host JSON configuration, serve modes, and Factory Session tools.

How To Integrate

Install the you CLI, then point your MCP-capable host at the canonical serve entrypoint. The host must launch you mcp serve as a stdio child process—not as an interactive terminal command—so the host owns stdin and stdout for MCP traffic.

Canonical serve command

you mcp serve
Hosts must spawn you mcp serve as a stdio child process. stdin and stdout carry MCP JSON-RPC over newline-delimited messages. stderr is reserved for process diagnostics only—hosts must not parse MCP traffic from stderr.

Generic MCP host JSON

{
  "mcpServers": {
    "you-agent-factory": {
      "command": "/absolute/path/to/you",
      "args": ["mcp", "serve"],
      "cwd": "/absolute/path/to/your-workflow-project"
    }
  }
}
Prefer an absolute path for command when the host PATH is limited. Keep args as mcp serve. Set cwd to the absolute path of the workflow or project root whose sources you want Factory Session tools to resolve. You can use command you when the binary is already on the host PATH.After you save the host configuration, restart or reload the host so it respawns the MCP child process. Saving the file alone is not enough for most hosts.

Serve Modes

you mcp serve exposes the same you.factory_session.* tool catalog in two backing modes. The catalog and Factory Session vocabulary stay the same; only the execution service behind the tools changes.Fixture-backed mode is the default. Launch with you mcp serve (host args ["mcp", "serve"]). It uses the durable session fixture catalog so hosts can smoke-test tool discovery, validate_source, and async polling without a live factory HTTP server. Prefer this path for first-install smoke.Runtime-backed mode launches with you mcp serve --runtime (host args ["mcp", "serve", "--runtime"]). It uses the shared durable JavaScript runtime service for live Factory Session execution. Use it when the host needs real async start, status polling, and terminal or not-ready result reads against live workflow sources.

Runtime-backed MCP host JSON

{
  "mcpServers": {
    "you-agent-factory": {
      "command": "/absolute/path/to/you",
      "args": ["mcp", "serve", "--runtime"],
      "cwd": "/absolute/path/to/your-workflow-project"
    }
  }
}
Keep the default fixture-backed args when deterministic smoke is enough. Switch to the runtime shape only when live durable JavaScript execution is required. Do not combine --runtime with --fixture-catalog.

Factory Session Tools

After the host reloads and connects, it discovers Factory Session tools under the you.factory_session.* names. Prefer those names in new host configuration. The list below is a scannable overview of the primary tools most hosts use first—not a full OpenAPI dump.

Primary Factory Session tools

you.factory_session.validate_source
you.factory_session.start_async
you.factory_session.get
you.factory_session.get_result
validate_source checks JavaScript orchestrator source through the Factory preview contract. start_async starts one durable session for polling. get reads session status and progress. get_result reads the session outcome when it is ready.Hosts also discover additional list, control, and event tools such as list, start_sync, list_dispatches, list_artifacts, control, and read_events. Use those when you need inventory, lifecycle controls, or ordered event facts beyond the primary validate → start → status or result path.Older you.workflow.* aliases may still appear and resolve to the same handlers. Prefer you.factory_session.* names in new configuration.

How To Use

Install the you CLI, add an MCP server entry that launches you mcp serve, set the working directory to your workflow project root, then restart or reload the host so the child process starts. After reload, the host should discover you.factory_session.* tools for validate, start, status, and result flows.

Limits And Assumptions

MCP covers stdio serve, host configuration, and Factory Session tool discovery. It is not HTTP or SSE transport documentation, not a multi-host UI parity matrix, not a sync of packaged you docs mcp topics, not the Cursor dynamic-workflows use-case guide, and not the dynamic-workflows API deep page.

Tags