Cursor Dynamic Workflows

Use Cursor as an MCP host for you-agent-factory Factory Session and dynamic-workflow tools.

What It Is

Cursor dynamic workflows mean using Cursor as a Model Context Protocol (MCP) host for you-agent-factory. Cursor launches you mcp serve as a child process, then calls Factory Session tools that validate, start, and inspect JavaScript or TypeScript dynamic workflows. In this product, a dynamic workflow is a JavaScript orchestrator-backed factory; the live run is still a Factory Session. The MCP path keeps that work inside the editor instead of switching to a separate terminal for every validate, start, or status step.

When To Use

Use this path when you author or drive JavaScript or TypeScript dynamic workflows from Cursor and want Factory Session tools available as MCP tools in the editor. Prefer ordinary factory loops and submit batches without MCP when you only need the CLI install → run → submit path and do not need Cursor to call Factory Session tools. Prefer another MCP host guide when your editor or agent is not Cursor, even if it also speaks MCP.

Steps Or Workflow

Confirm the you CLI is installed, add a Cursor Model Context Protocol (MCP) server entry for you mcp serve, reload Cursor so the child process starts, then run a first Factory Session loop: validate source, start a session, and check status or result.

Cursor MCP config locations

Put the server entry in the project file at .cursor/mcp.json when the workflow lives in that repository, or in the global file at ~/.cursor/mcp.json when you want the same server across projects. Project config is usually enough for one workflow root.

Example Cursor MCP server entry

{
  "mcpServers": {
    "you-agent-factory": {
      "command": "/absolute/path/to/you",
      "args": ["mcp", "serve"],
      "cwd": "/absolute/path/to/project"
    }
  }
}
Replace command with the absolute path to your you binary when Cursor cannot see your shell PATH. Keep args as mcp serve. Set cwd to the workflow project root so sources resolve. After you save the file, restart Cursor or run Developer: Reload Window so Cursor respawns the MCP child process.

First Factory Session loop from Cursor

After reload, confirm Factory Session tools appear in Cursor. Prefer the you.factory_session.* names. Older you.workflow.* aliases still resolve to the same handlers if your host lists them.

Validate workflow source

you.factory_session.validate_source
Call you.factory_session.validate_source on your JavaScript or TypeScript orchestrator source. Compatibility alias: you.workflow.validate. A clean validate confirms Cursor reached you mcp serve and the project cwd can resolve the workflow.

Start a Factory Session

you.factory_session.start_async
Start one session with you.factory_session.start_async when you want to poll, or you.factory_session.start_sync when you want the tool to wait for completion. Compatibility alias for a sync start: you.workflow.run.

Check status and result

you.factory_session.get
you.factory_session.get_result
Read progress with you.factory_session.get, then read the outcome with you.factory_session.get_result when the session is ready. Compatibility aliases: you.workflow.status and you.workflow.result. That validate → start → status or result path is enough to prove the Cursor integration.Full tool catalogs, runtime-backed serve flags, and dynamic-workflow API detail live on the MCP and dynamic-workflows documentation pages. You do not need those pages open to finish this first loop.

Common Pitfalls

If Cursor cannot find you on PATH, set command to the absolute path of the you binary instead of relying on the shell PATH. If validate or start fails to resolve workflow sources, check that cwd is the workflow project root, not a nested package or home directory. After you change MCP config, restart Cursor or run Developer: Reload Window so the MCP child process respawns; saving the file alone is not enough. Treat this guide as a first Cursor integration loop only — full tool catalogs, serve flags, and dynamic-workflow API detail live on the MCP and dynamic-workflows documentation pages linked below.

Tags