MCP tools
Yoyo’s MCP server lives at https://api.yoyo.codes/mcp and takes a personal
API token as Authorization: Bearer yoyo_…. Setup for each client is in
Publish from an AI agent.
Every tool returns structured output as well as text. Errors come back as tool
results with isError set, written for the agent to act on: “Private
projects need Yoyo Pro. Publish it as public (leave out private), or upgrade
at …”.
Wherever a tool takes project, you can pass the project’s name
(pricing-demo), its id, its live URL
(https://pricing-demo-you.yoyo.codes) or its editor URL
(https://yoyo.codes/you/pricing-demo). Only your own projects resolve.
yoyo_publish
Section titled “yoyo_publish”Creates a new project and returns its live URL. It never overwrites an existing project.
| Input | Type | Notes |
|---|---|---|
html |
string | Shorthand for a one-page site: the content of index.html. |
markdown |
string | Shorthand for a document: the content of index.md, rendered as a page. |
files |
{path, content}[] |
Several files. Paths are relative, e.g. index.html, css/site.css. |
name |
string, optional | URL name, e.g. pricing-demo. Lowercase letters, digits and hyphens. |
title |
string, optional | Display title. Defaults to the page’s <title> or first Markdown heading. |
private |
boolean, optional | Visible only to you. Needs Pro. |
Pass at least one of html, markdown or files.
Naming. name is cleaned up to fit URL rules (3–63 characters, starting
with a letter); a note says so if it changed. Without a name, one is made
from the title. If you already have a project by that name, the new one is
published as name-2 (then -3, …) with a note pointing at yoyo_update.
yoyo_update
Section titled “yoyo_update”Changes files in a project you own. Changes are live right away.
| Input | Type | Notes |
|---|---|---|
project |
string | Name, id or URL. |
files |
{path, content}[] |
Files to add or overwrite. |
delete |
string[] | Paths to remove. |
replace |
boolean, optional | Also delete every file not in files. Only for sending the whole site. |
Without replace, files you don’t mention are left alone, so a large site can
be sent over several calls. Files whose content hasn’t changed are skipped.
The whole batch is checked against your limits before anything is written.
Deploy result
Section titled “Deploy result”yoyo_publish and yoyo_update return the same shape:
{ "url": "https://pricing-demo-you.yoyo.codes", "edit_url": "https://yoyo.codes/you/pricing-demo", "project": "pricing-demo", "created": true, "public": true, "files": [{ "path": "index.html", "bytes": 2140, "status": "added" }], "warnings": [], "notes": []}files[].statusisadded,changed,unchangedordeleted.warningsflag things that may stop the site working: noindex.html,index.mdorREADME.mdat the root,.ts/.tsx/.jsxfiles, apackage.json, bare imports with no import map, or links to files that aren’t in the project. Warnings never block a write.notesexplain what the server changed, such as a renamed project.
yoyo_snapshot
Section titled “yoyo_snapshot”Saves the project’s current state at a permanent URL that doesn’t change when the project is edited. See URLs & snapshots.
| Input | Type | Notes |
|---|---|---|
project |
string | Name, id or URL. |
label |
string, optional | Used in the URL, e.g. bug-repro. Defaults to v1, v2, … |
description |
string, optional | A note about this snapshot. |
Returns url, label and project.
yoyo_list_projects
Section titled “yoyo_list_projects”Lists your projects, most recently updated first. Read-only.
| Input | Type | Notes |
|---|---|---|
query |
string, optional | Only projects whose name or title contains this text. |
limit |
number, optional | Default 50, max 200. |
Returns projects (each with name, title, url, edit_url, public and
updated_at) and total, the number of matches before the limit.
yoyo_get_project
Section titled “yoyo_get_project”Shows one project: the same fields as a list entry, plus description,
files (path, size, last updated) and snapshots (label, URL, created).
Read-only. Agents should call it before yoyo_update on a project they didn’t
create in the same conversation.
| Input | Type | Notes |
|---|---|---|
project |
string | Name, id or URL. |
yoyo_read_file
Section titled “yoyo_read_file”Reads one text file so the agent can edit it and send it back with
yoyo_update. Read-only.
| Input | Type | Notes |
|---|---|---|
project |
string | Name, id or URL. |
path |
string | The file’s path, e.g. index.html. |
Returns path, bytes, content_type and content. Files over 256 KB and
binary files come back with included: false and no content.
Limits
Section titled “Limits”- File contents are UTF-8 text. Binary files can’t be sent through MCP.
- One request can be up to 5 MB.
- File size and total storage follow your plan.
- Each token can make 120 requests a minute; over that, the server answers 429.
yoyo_publishcan create 20 projects an hour and 100 a day per account, counted together with projects created through the CLI or the API with a token. Over that it returns a tool error saying when the limit resets.