Skip to main content
Yukta includes a Model Context Protocol (MCP) server. An MCP client such as Claude Code can use it to create a session, start a workflow, read its status, logs and result, and control the run, all as tool calls.
Yukta is pre-beta (0.0.1-SNAPSHOT). Tool names, arguments and result fields may change before v0.1.0.
Use MCP when an agent drives Yukta. A person or a script is better served by the REST API or the command-line client, which cover the same operations plus a few more. The MCP server offers 23 tools, 2 prompts and 3 resources.

Endpoint and transport

The server listens at /mcp on the same address and port as the REST API, for example http://localhost:8080/mcp. It uses the streamable HTTP transport in stateless mode: every request stands alone and there is no MCP session to keep. There is no standard-input transport. The former path /sse is still accepted as an alias for /mcp.

Connect a client

With Claude Code, one command adds the server:
When the server requires a key, add it as a header:
Other clients take the same two values, a URL and optional headers. A typical configuration file looks like this:

Authentication and roles

/mcp is protected by the same keys as the REST API, plus an optional yukta.mcp.api-key that grants the ADMIN role to MCP only. Send the key as Authorization: Bearer <key> or X-API-Key: <key>. Setting only the REST key therefore closes MCP too. With no key configured, the server accepts requests from loopback only, as for REST; see Security. A key that is not an unrestricted ADMIN key has each tool call checked against the role the tool needs. A call that is not allowed is refused with HTTP 403. A request body above 1 MB is refused with 413. A key limited to sessions can call a tool only with a sessionId argument that names one of its sessions. The four tools that name no session (list_plugins, get_plugin_details, get_session_creation_instructions and get_plugin_creation_guide) are open to such a key. list_sessions and get_control_bus_status are not. Rolling back a version and writing a version note need only the OPERATOR role over MCP, while the equivalent REST calls need ADMIN. create_session needs ADMIN because the workflows it defines can run processes and reach external systems. With named keys, control commands sent through MCP are recorded in the control audit as key:<name>.

Tools

Tools return structured JSON, except where noted. Every tool that takes an executionId also takes the sessionId that owns it. An unknown execution and an execution of another session give the same error, so one session cannot probe another.

Sessions

create_session replaces an existing session with the same sessionId. Its description tells the agent to confirm with the user first, and the tool is marked destructive so clients can prompt for approval.

Workflows and runs

start_workflow has no payload argument; it starts the workflow with an empty trigger payload. To start with input, use the REST API or the CLI. get_execution_logs returns formatted log lines. filterPattern is a regular expression applied to each line, at most 200 characters, and an expensive pattern is rejected. tailLines keeps the last N matching lines. One call returns at most 5000 lines. While a run is active, pass the previous nextCursor as afterCursor to receive only the lines written since, and read each line once. get_execution_result is the way to read the output of a run: every message that reached a terminal node, then NODE_END and EXECUTION_END events. complete is true once the run has ended; use get_workflow_status to tell whether it is still running.

Control

control_workflow actions RESTART, RESTART_FROM_NODE and RECOVER return the id of the new run in resultExecutionIds. STOP_ALL returns the ids it stopped there. control_node actions set_node_breakpoint holds a node when a payload field equals a value, such as field=payload.status and equalsValue=error. signal_node answers a node that waits for a signal, such as an approval step: decision approve lets the message through, reject fails or drops it, and any other value is passed on to the workflow. It fails when the node is not waiting. See Approvals and signals and Run controls.

Versions

Each change to a workflow is saved as a version, and the newest 20 are kept. A rollback saves the restored definition as a new version, and runs that already started keep the definition they use.

Plugins and server status

For the options of a plugin, the REST plugin endpoint also returns the declared configuration schema.

Prompts

Prompts are templates a client can offer to the user.

Resources

What an agent sees on errors

A failed tool call returns a tool result marked as an error, with a message the agent can act on. The text names the problem and, where it helps, the tool to use next. Calls that the key may not make are refused at HTTP level instead; see Authentication and roles.

Example: create, run and watch a workflow

An agent is asked to greet Ada with a small workflow. It reads the instructions, creates the session, starts the workflow and follows the run.
1

Read the instructions and the plugins

The agent calls get_session_creation_instructions and list_plugins to learn the format and the node types.
2

Create the session

create_session with:
The result is { "sessionId": "greetings", "createdWorkflows": ["greet"], "warnings": [], "success": true }.
3

Start the workflow

start_workflow with { "sessionId": "greetings", "workflowId": "greet" } returns { "executionId": "550e8400-e29b-41d4-a716-446655440000" }.
4

Read the status and logs

get_workflow_status with the session and execution ids returns the run status and a status per node. get_execution_logs with { "sessionId": "greetings", "executionId": "550e8400-e29b-41d4-a716-446655440000", "afterCursor": 0 } returns the lines so far and a nextCursor to pass on the next poll.
5

Read the result

get_execution_result returns the events the terminal node received and complete: true once the run ended.
If the run fails, the agent can call control_node with RETRY on the failed node, or control_workflow with RESTART, then follow the new run id from resultExecutionIds.

Limits and defaults