# Flows MCP server

Connect ChatGPT, Claude or Codex to Aplyna so your assistant can read and edit onboarding and paywall drafts.

## Connect your assistant

1. Open a flow in the editor and choose Connect MCP.
2. Pick ChatGPT or Claude and add the connection URL shown there as a custom MCP server (connector). Choose OAuth with automatic client registration.
3. Sign in with your usual Aplyna account, including two-factor verification when it is enabled.
4. Choose a project and either Read drafts or Read and edit drafts, then accept.

### Codex configuration

```
[mcp_servers.aplyna_flows]
url = "https://app.aplyna.com/mcp/flows"
```

> **One project per connection**
> A connection belongs to the person who created it and to one project. You can disconnect it from the same Connect MCP panel.

## Available tools

| Tool | Purpose |
| --- | --- |
| get_context | Selected project, granted permissions and renderer limits. |
| get_flow_schema | The validated flow document format. |
| list_flows | Onboarding and paywall drafts of the project. |
| get_flow | A saved draft with its layouts, IDs and revision. |
| create_flow | A new independent visual draft. |
| save_flow | Validate and replace a full draft at its expected revision. |
| patch_flow | Up to 200 atomic changes to a draft. |
| validate_flow | Check a document without saving it. |
| list_assets | Existing design assets. |
| upload_asset | Add an image, video, SVG or self-contained Lottie file. |
| list_catalog | The project's real offerings and packages, for product bindings. |

## See edits in the editor

An open editor checks for a newer saved draft every few seconds. A clean editor loads it and puts the previous layout in Undo. If you have unsaved changes, the editor shows Load saved draft and waits for your choice.

## Limits and safety

- Drafts only. Publishing, and its compatibility and purchase checks, stay in Aplyna.
- Published screen IDs are kept, and linked paywall versions stay unchanged.
- Product and asset references must belong to the same project.
- Every call rechecks your membership, role and the permission you granted. Read only collaborators cannot edit through MCP.
- The connection cannot read customers, store credentials, SDK keys or reports.
