# Connect Yoya to an AI agent

Yoya (https://yoya.ai) is an AI scheduling assistant. It has two MCP servers (Streamable HTTP):

- https://yoya.ai/api/mcp: manage the user's own Yoya (booking pages, hours, bookings, settings). Needs OAuth: the user signs in to Yoya in a browser and approves access.
- https://yoya.ai/api/mcp/book: find and book times on anyone's public Yoya page. No sign-in.

Use the first unless the user only wants to book with someone else.

## Rules
- Never ask the user for their Yoya password. Sign-in happens in their browser.
- If you run where a browser sign-in can't reach you (a server, a scheduled job), use an agent key instead (see "Headless agents"). Only the user creates one, in Yoya.
- Check existing MCP servers first. Keep them; if "yoya" is taken by a different URL, pick another name.
- After adding the server, give the user the sign-in link (or the exact step), wait for them, then confirm the tools load by calling get_connection_status.
- If your client cannot add remote MCP servers, say so plainly and point to https://yoya.ai/help/mcp. Do not claim Yoya is connected.

## Find your client

### OpenClaw
```
openclaw mcp set yoya '{"url":"https://yoya.ai/api/mcp","transport":"streamable-http","auth":"oauth"}'
openclaw mcp login yoya
```
Send the user the sign-in link that login prints.

### Hermes Agent
```
hermes mcp add --url https://yoya.ai/api/mcp --auth oauth yoya
hermes mcp login yoya
```
Then /reload-mcp. On a remote or headless host, the OAuth callback needs the user's own browser to reach it; explain how (for example an SSH tunnel).

### Claude (desktop, web, mobile)
Send the user to https://claude.ai/directory/yoya and ask them to press Connect. Or Settings > Connectors > Add custom connector with https://yoya.ai/api/mcp.

### Claude Code
```
claude mcp add --transport http yoya https://yoya.ai/api/mcp
```
Then /mcp to sign in.

### Codex
```
codex mcp add yoya --url https://yoya.ai/api/mcp
codex mcp login yoya
```

### Gemini CLI
```
gemini mcp add --transport http yoya https://yoya.ai/api/mcp
```
Then /mcp auth yoya.

### Cursor, Windsurf, VS Code and other config-file clients
Merge into the client's MCP config (Cursor: ~/.cursor/mcp.json), keeping other servers:
```
{ "mcpServers": { "yoya": { "url": "https://yoya.ai/api/mcp" } } }
```
Clients without remote MCP can bridge: `npx -y mcp-remote https://yoya.ai/api/mcp`.

### OpenCode
Merge into opencode.json: `{"mcp":{"yoya":{"type":"remote","url":"https://yoya.ai/api/mcp"}}}`, then `opencode mcp auth yoya`.

### ChatGPT
Settings > Apps > Advanced settings > Developer mode, then create a custom app with https://yoya.ai/api/mcp and OAuth.

### Meta Muse
Add a custom connector with https://yoya.ai/api/mcp (Settings > Connectors), or create it yourself if you can, then open the Yoya sign-in for the user.

### Grok Bot
grok.com/connectors > New connector > Custom > paste https://yoya.ai/api/mcp, then sign in to Yoya.

### Instinct
Connect the remote MCP server https://yoya.ai/api/mcp over streamable HTTP with OAuth and send the user the authorization link. Start a new conversation after sign-in so the tools load. If the account cannot add MCP servers, say so.

## Headless agents (agent key)
The user opens https://yoya.ai/dashboard/settings/agents, creates a key ("Read and change" or "Read only") and gives it to you. Connect to https://yoya.ai/api/mcp with the header:
```
Authorization: Bearer yoya_ak_...
```
In OpenClaw or Hermes, add it as a header on the yoya server in the MCP config instead of auth: oauth. Store the key like any secret; the user can revoke it in the same place.

## Recipes for always-on agents
Full skill: https://yoya.ai/skills/yoya/SKILL.md
- Morning brief: call get_agenda (today) and send the user one short message: each meeting's time, who, and why from the brief.
- Before a meeting: get_agenda, then 10 minutes before each start send the brief and meetingUrl.
- "Move my 3pm to tomorrow": list_my_bookings to find it, confirm with the user, then reschedule_my_booking. Yoya emails the guest.
- "Find time with Sam": if Sam has a Yoya page, book on https://yoya.ai/api/mcp/book. If not, create_scheduling_link with guestName and send Sam the url; it offers a few times and works once.
- New bookings in real time: point a Yoya webhook (https://yoya.ai/help/webhooks) at your agent's webhook endpoint.

## After connecting
Call list_my_booking_pages and get_connection_status. If the user has no booking page yet, offer to make one: ask for their time zone, meeting length and weekly hours, then create_booking_page and set_weekly_hours, and return the link from get_share_link.
