Skip to main content

Run the standalone Playrunner MCP server

The repository includes a standalone MCP server in apps/mcp. It connects an AI assistant to an existing Playrunner installation's machine API. It provides tools for discovering, authoring and executing workflows, then reading their test evidence. GitHub setup and profile management are available through the broader Cloud MCP interface.

Start the server​

First, start your Playrunner installation using the local setup guide. With Node.js 20 or later available, run these commands from the Playrunner repository root in a separate terminal:

npm ci --prefix apps/mcp
PLAYRUNNER_API_URL=http://localhost:3011 MCP_PORT=3013 \
npm start --prefix apps/mcp
VariableDefaultPurpose
PLAYRUNNER_API_URLhttp://localhost:3011Base URL of the Playrunner API.
MCP_PORT3013Port for the MCP server.

Set the API URL to your installation's public API entry point when using a gateway, so its access and usage checks apply. Expose the MCP endpoint over HTTPS when connecting from another machine. A hosted assistant cannot reach localhost on your computer.

The MCP URL is http://localhost:3013/mcp. Check that the server is running:

curl --fail http://localhost:3013/health

The health endpoint returns OK; it does not verify your API token or workflow access.

Connect with an API token​

  1. Open Settings → API tokens in your Playrunner installation.
  2. Create a token restricted to the workflows the assistant should run. For project listing, workflow authoring or deletion, use an unrestricted token with workflow:write. Restricted execution keys cannot manage resources.
  3. Add your MCP URL to a client supporting remote Streamable HTTP and bearer authentication.
  4. Store the token in the client's protected credential settings. The client must send Authorization: Bearer YOUR_API_TOKEN on every request.
  5. Ask the assistant to list workflows to verify API access.

The server forwards each caller's token to the API, which enforces scope and workflow restrictions. Revoking the token removes that token's access. Keep tokens out of source control and chat messages.

Tools​

ToolRequired inputsOptional inputsPurpose
list_workflowsNonelimitDiscover workflows this token may run.
run_workflowworkflowIdinputs, idempotencyKey, acceptanceCriteria, changeContext, regression, releaseStart a saved workflow and return an execution ID immediately.
get_run_statusworkflowId, executionIdNoneRead the current status of one execution.
list_runsworkflowIdlimitList recent runs, newest first.
get_authoring_guideNoneNoneRead saved regression mappings, immutable run requests and feedback conventions before authoring.
open_workflow_editorworkflowIdNoneOpen the saved graph in clients supporting the workflow editor. Requires management access.
get_workflow_editorworkflowIdNoneRead the current saved graph through the editor integration. Requires management access.
list_projectsNonelimitList owned projects and workflow counts. Requires a management key.
save_workflowdefinitionNoneSave a project and workflow by stable keys. Requires a management key.
delete_workflowworkflowIdNoneDelete an owned workflow after schedule cleanup. Rejects active executions.
delete_projectprojectIdNoneDelete an owned empty project. Non-empty projects are rejected.
get_run_eventsworkflowId, executionIdafterRead execution events using a cursor.
get_run_feedbackworkflowId, executionIdafterRead compact progress, selected journeys, failure identities and authenticated report paths. Never starts a run.
get_release_policyworkflowIdNoneRead saved release requirements and the policy hash for review.
get_release_verdictworkflowId, executionId, candidate, policyVersionmaxAgeSecondsEvaluate evidence for an exact candidate and reviewed policy. Never starts or deploys a run.

Deletion requires an unrestricted workflow:write key. Workflow deletion retains historical execution records. Project deletion does not cascade into workflows. The matching machine API endpoints are DELETE /api/v1/workflows/:workflowId and DELETE /api/v1/projects/:projectId.

save_workflow.definition contains project: { key, title } and workflow: { key, title, nodes, connections }, with optional workflow runner, concurrency and test-plan settings. The API validates the graph and rejects embedded secret values. Reusing the same keys updates the owned resources.

get_run_events.after is a non-negative integer string, defaulting to "0". acceptanceCriteria accepts text or a list of up to 20 strings. changeContext accepts repository owner/name, commit SHAs, refs, event type and pull-request number for CI runs; it cannot override workflow inputs.

limit defaults to 25 and accepts integers from 1 to 100. inputs is an object of named workflow inputs. idempotencyKey is an optional string of up to 200 characters: reuse it for a retry of the same intended run, and use a fresh key for a new run.

The standalone run_workflow uses idempotencyKey, while Cloud uses the required requestKey. Standalone get_run_status requires both workflow and execution IDs; Cloud requires the execution ID and supports event pagination.

Change-aware regression and agent feedback​

Follow Focused regression to save source-to-journey mappings on Playwright nodes, then pass a versioned regression request with exact base/head commit SHAs to run_workflow. This requires an updated API, orchestrator, Playwright runner and MCP server; a server connection alone does not establish feature availability.

The call returns immediately. Continue other work and read get_run_feedback for that execution, passing its nextCursor as after on subsequent reads. Drain pages while hasMore is true. after is a non-negative integer string and defaults to "0".

Check the actual selected scope, full-suite fallback reasons, final failures, expected failures and any incomplete or truncated evidence. The tool does not compare a baseline test run or independently verify the deployed application revision. A completed workflow or an empty failure list is not release approval.

regression cannot be combined with changeContext or release. Use a fresh idempotencyKey for each intended run and reuse it only to recover an ambiguous start response for that same run. Once the execution ID is known, inspect it instead of launching another execution.

Troubleshooting​

SymptomWhat to check
401 UnauthorizedSupply a valid bearer token on every request.
Workflow is missing or inaccessibleCheck token ownership, scope, and allowed workflows.
Connection refusedCheck MCP_PORT, the server process, and client network access.
MCP connects but tools failCheck PLAYRUNNER_API_URL and that the API is running.
Rate or usage limit errorAddress the API's reported limit before starting another run.
Authoring tools are absentUpdate the standalone MCP server to the current release.

The server supports MCP protocol versions 2025-06-18 and 2025-03-26 over stateless Streamable HTTP at POST /mcp.