MCP Server¶
The FastMCP bridge exposes the process workflow to MCP-compatible clients using the same settings as the CLI.
Run the server¶
uv run fastmcp run agentsflow/mcp_server.py
TEMPORAL_ADDRESS, TEMPORAL_NAMESPACE), workflow defaults (PROCESS_TASK_QUEUE, PROCESS_AGENT_MODEL), and credentials (OPENAI_API_KEY, Jira/GitHub tokens). Load them however you prefer (shell export, direnv, uv --env-file, etc.).
Tools¶
start_agentsflow_process(issue_url=None, task_text=None, repository_path)– Starts the workflow asynchronously and returnsworkflow_id,run_id,task_queue, and connection metadata. Provide exactly one ofissue_url(Jira/GitHub/etc.) ortask_text(free-form description).repository_pathmust be an absolute path reachable by the worker host.await_agentsflow_result(workflow_ids)– Accepts a list of workflow IDs, returns after the first workflow finishes or pauses, and includes only that workflow's payload. Call again with the remaining IDs to drain the rest. Payload shape:{status: "completed", result: ProcessWorkflowOutput}or{status: "clarification_required", ...}.provide_agentsflow_clarification(workflow_id, answers, assumptions=None)– Signals the workflow to resume after a clarification pause.
Operational tips¶
- Run the MCP server near the worker to avoid network egress on repository paths and Temporal traffic.
- Clarification flows mirror the CLI: call
start, thenawait, respond withprovide_agentsflow_clarificationif needed, andawaitagain.