> ## Documentation Index
> Fetch the complete documentation index at: https://docs.joystream.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# JoyStream MCP server

> Build, ship, and debug JoyStream agents from Claude Code, Codex, or any MCP client, signed in as yourself, with every side-effecting action confirmed by you.

JoyStream hosts a Model Context Protocol (MCP) server at `https://api.joystream.ai/mcp`. Connect a coding agent such as Claude Code or Codex to it and the coding agent can list your workspaces, write and build agent definitions, run agents, read runs and tickets, download run files, and search connector actions and skills. It acts as you, with your role in each workspace.

The quickest way to connect is the [JoyStream plugin](https://docs.joystream.ai/guides/use-joystream-from-claude-code-or-codex.md), which registers the server and adds three skills for authoring, shipping, and debugging agents.

## Signing in

The server uses OAuth, not an API key. On first use your MCP client opens JoyStream's sign-in and consent page in a browser. Approve it and the client holds a grant for your account. Nothing is pasted into a config file.

Each client you approve appears under **Settings → Connected apps**, where you can revoke it. A revoked app has to be approved again to reconnect, and loses access within about an hour.

![The Connected apps page in JoyStream settings, listing two Claude Code grants with a Revoke button on each](https://mintcdn.com/joystream/_JHoEHVWg6RV9AVX/images/connected-apps.png?fit=max\&auto=format\&n=_JHoEHVWg6RV9AVX\&q=85\&s=b7ea207bdf272ca63efbd3d7ca6202d1)

Settings → Connected apps lists every MCP client you approved.

From the CLI:

```bash theme={null}
jstm auth apps list
jstm auth apps revoke <client_id> --yes
```

## Permissions

Tools act with your role in the workspace they touch. Viewers can read. Changing anything, including answering a paused run, needs member or above. A workspace you don't belong to is reported as not found rather than forbidden.

The server cannot manage members, sharing, vaults, billing, or settings. Use the web UI or the CLI for those.

## Confirming actions

The server is stateless, so a tool that would change something outside JoyStream does not act on its first call. It stores a proposal and returns a summary:

```json theme={null}
{
  "confirmation_required": true,
  "summary": "Start a real run of agent failed-payment-digest on the latest version with input {since=7d}. It acts on the connected systems.",
  "expires_at": "2026-10-15T14:32:10Z"
}
```

Your coding agent shows you that summary and waits for your yes. It then calls `confirm` with the exact text, and the action runs once. A proposal expires after 5 minutes, and calling `confirm` again with the same summary returns the same result rather than acting twice.

Tools that require confirmation: `run_agent` with mode `live` (a real Run), `execute_action`, `agent_credential_set`, `agent_credential_clear`, and the Agent Universe actions that change something (`agent_universe_publish`, `agent_universe_unpublish`, `agent_universe_update_version`, `agent_universe_clone`, `agent_universe_edit_listing`, `agent_universe_regenerate_listing`, `agent_universe_set_resources`). Everything else acts immediately, including a Simulation (`run_agent` with mode `dry_run`).

## Tools

Where a tool takes `agent`, it accepts a UUID, a bare handle, or `org/workspace/handle`. Several tools let you omit `workspace` when you belong to exactly one.

### Read

| Tool | What it returns |
| - | - |
| `list_workspaces` | Workspaces you belong to, grouped by org |
| `list_agents` | Agents in a workspace |
| `get_agent` | One agent's details |
| `get_agent_spec` | The agent's builder spec and committed definition |
| `get_agent_readiness` | Whether the agent can run, and what blocks it |
| `list_agent_versions`, `get_agent_version` | Built versions, newest first, or one version |
| `get_build` | One build with its status and phase |
| `list_runs`, `get_run` | Recent runs, or one run with its stories and, if it failed, a `failure_kind` |
| `get_ticket` | One ticket with its run summary and, for a story, its files |
| `get_artifact` | A single-use download link for one run file, or its text when small. See [Run artifacts](https://docs.joystream.ai/features/run-artifacts.md) |
| `list_trigger_events`, `get_trigger_event` | Recent trigger events, or one |
| `get_credit_balance`, `get_credit_ledger` | The workspace's credit position and recent ledger entries |
| `agent_credentials` | The credential the agent is set to use for each service |
| `search_skills` | Catalog skills a spec may use as steps |

### Connectors

| Tool | What it does |
| - | - |
| `list_apps` | Providers in the catalog with connection and action counts |
| `list_connections` | The workspace's connections and their account profiles, never the credentials |
| `search_actions` | Find connector actions by intent. The `actionId` becomes an action step in a spec |
| `get_action_guide` | One action's input parameters and how to call it |
| `execute_action` | Run a connector action directly. Requires confirmation |

### Agent Universe

| Tool | What it does |
| - | - |
| `agent_universe_search`, `agent_universe_get_public_agent` | Find public agents, or read one: what it does, its inputs, and the connections a copy needs |
| `agent_universe_clone_targets`, `agent_universe_clone` | List the workspaces you can copy into, and copy a public agent. Cloning requires confirmation |
| `agent_universe_preflight` | What would block listing the agent, and exactly what would become public |
| `agent_universe_publish`, `agent_universe_unpublish`, `agent_universe_update_version` | List the agent, take its page down, or move the page to a newer version. All require confirmation |
| `agent_universe_get_listing`, `agent_universe_edit_listing`, `agent_universe_regenerate_listing`, `agent_universe_set_resources` | Read and change the page's copy and resources. Changes require confirmation |

See [Agent Universe](https://docs.joystream.ai/features/agent-universe.md).

### Author, build, and run

| Tool | What it does |
| - | - |
| `create_agent`, `update_agent` | Create an agent from a spec, or replace its spec. Validation errors come back with the field and message. Pass `notes` to record why |
| `build_agent`, `wait_for_build` | Start a build and poll it to `built` or `failed` |
| `run_agent`, `wait_for_run` | Start a run and poll it to a finish or to `awaiting_input`. `mode` is required: `dry_run` starts a Simulation at once; `live` is a real Run and requires confirmation. `version` is optional: a version id or text, or the latest built version when left out |
| `upload_run_input` | Store a file for a file input; merge the returned `input` into `run_agent`'s input |
| `answer_input_request` | Answer a paused run's input request |
| `agent_credential_set`, `agent_credential_clear` | Set or clear the credential the agent uses for a service. Both require confirmation |
| `confirm` | Perform an action another tool proposed, given its exact summary |

## Resources and prompts

The server publishes reference documents your coding agent can read:

| Resource | Content |
| - | - |
| `joystream://docs/agent-spec` | The agent definition format and common validator errors |
| `joystream://docs/lifecycle` | Build, Simulation and Run, versions, and which tool does each |
| `joystream://docs/failure-kinds` | What each run `failure_kind` means and what to check first |
| `joystream://docs/artifacts` | How to find, download, and read a run's files |
| `joystream://schemas/agent-spec` | The JSON schema for an agent definition |

It also serves your own data as resources, such as `joystream://agents/{agent}/spec` and `joystream://runs/{run}`, and prompts for common jobs: `create-agent`, `improve-agent`, `ship-agent`, `triage-run`, `review-failures`, `debug-connection`, and `explain-agent`. Codex does not support MCP prompts, which is why the plugin ships the same guidance as skills.

## Limits

Requests over 1 MiB are rejected. The `wait_for_build` and `wait_for_run` tools poll every 2 seconds for up to 120 seconds by default and at most 600. When too many waits are in flight the tool returns once with `waited: false` and a `retry_after_s` hint instead of an error.

## Troubleshooting

* **404 "Endpoint not found".** The URL must be exactly `https://api.joystream.ai/mcp`, with no trailing slash.
* **Sign-in loops.** Sign in to JoyStream in the same browser first, then retry the client's authenticate step.
* **401 "Needs authentication".** Re-authenticate from the client. In Claude Code run `/mcp`, choose **joystream**, then **Authenticate**. In Codex run `codex mcp login joystream`.
* **Starting over.** Revoke the app under **Settings → Connected apps** and authenticate again.

## See also

* [Use JoyStream from Claude Code or Codex](https://docs.joystream.ai/guides/use-joystream-from-claude-code-or-codex.md)
* [Run artifacts](https://docs.joystream.ai/features/run-artifacts.md)
* [`jstm auth`](https://docs.joystream.ai/cli/auth)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.