yaya

Connect an agent to yaya

Call the REST API with a bearer key today. A local MCP server and a CLI are built and are not on npm yet. This page is the map. The help articles have every route and tool.

Connect over MCP

Not on npm yet. Until it ships, use REST. The server is yaya-mcp over stdio, and there is no hosted MCP endpoint yet. It reads the credentials the CLI saves, so it needs the CLI too: run yaya setup and yaya login once. It talks to https://api.yaya.page by default; set YAYA_BASE_URL in the server's env to use another origin.

{
  "mcpServers": {
    "yaya": { "command": "yaya-mcp" }
  }
}

Restart the client, then ask the agent to call yaya_get_openapi. A response means it is connected. Server card: /.well-known/mcp/server-card.json. Guide: Connect an agent with MCP.

CLI publish (not on npm yet)

Not on npm yet. Until it ships, use REST. Setup writes the origin. Login opens Settings → API keys so you can paste an account key. Never pass a key as a command argument.

yaya setup --base-url <url> [--api-key-env YAYA_API_KEY]
yaya login [key] [--base-url <url>] [--key-stdin | --account-key-env <name>]

Then publish a folder as the workspace draft and go live:

yaya publish --dir <folder> [--tenant-id <id>]

Guide: Use the yaya CLI.

REST via OpenAPI

Send the key as a bearer token. Call a route under /api/v1 on https://api.yaya.page. The contract is /openapi.json. Live endpoints with curl examples: API reference.

curl https://api.yaya.page/api/v1/profile \
  -H "Authorization: Bearer yaya_ak_..."

Account keys start with yaya_ak_. Workspace keys start with yaya_sk_ and belong to one business. A workspace key never works on account routes. The api host accepts only bearer keys, not a cookie session. Guide: Use the REST API.

Account keys and scopes

Create an account key at /settings/api-keys while signed in. yaya shows the secret once. Tick only the scopes the job needs.

  • profile:read: Read your public profile
  • profile:write: Update profile, username, and sites
  • email:write: Change sign-in email
  • billing:read: View payment methods and invoices
  • billing:write: Manage payment methods
  • domains:read: View your domains
  • domains:write: Manage your domains

Workspace keys use two scopes: suite:read and suite:write. A key never has more access than the person who made it. Revoke a key on the same settings page; it stops working immediately. Guide: API scopes and rate limits.

What an agent can do

The yaya-mcp server has these tools, with matching REST routes. Most need a key with the matching scope; some need a signed-in session, as noted.

  • Publish. Write a folder as the workspace draft, then publish it (yaya_agent_publish, yaya_tenant_publish).
  • Versions. List site versions (yaya_list_site_versions). Restore and delete need a signed-in session.
  • Domains. Search names and check a hostname (yaya_search_domains, yaya_check_domain).
  • Profile. Read and update the account profile (yaya_get_profile, yaya_patch_profile). Needs profile:read / profile:write.
  • Drive. Upload, read, and delete files on the workspace drive (yaya_put_drive_file, yaya_read_drive_file, yaya_delete_drive_file).
  • Variables. List, set, and delete named secrets. Values are never returned. Session only (yaya_list_variables, yaya_set_variable, yaya_delete_variable).

Full lists: MCP tool reference and CLI command reference. Agent guide: /agents.md.

Help center