Agent quickstart

Connect any coding agent to your Kyo workspace with one paste. The prompt below walks the agent through setting itself up on the MCP server — or the REST API when MCP isn't available — and reporting back once it's connected.

You need a Kyo account first — join the beta. The setup includes a browser sign-in (OAuth) that only you can complete; the agent will pause and wait for you at that step. No API keys to create or paste.

How it works

  1. Copy the prompt below into your agent — Claude Code, Cursor, Claude Desktop, or any agent with terminal access.
  2. The agent sets itself up — it installs the CLI, runs kyo login (you finish the sign-in in the browser), and registers the MCP server with its own client. Agents that can't use MCP fall back to the REST API.
  3. It verifies and reports back — who it's connected as, which scopes it holds, and what it can see — then proposes next steps and waits for your approval before writing anything.

The prompt

Paste this into your agent's chat (or its rules / system-prompt file):

prompt
Connect this environment to Kyo (https://www.trykyo.com) — my agency's workspace for
CRM, tasks, projects, and more. Follow the steps in order and tell me what you did
after each one.

Ground rules
- Never print token values or the contents of credential files; refer to them by
  name only.
- The Kyo API is non-destructive: v1 has no DELETE. Do not attempt to delete
  anything.
- Company enrichment (kyo_enrich_company / POST /v1/enrich) spends paid workspace
  credits — skip it unless I explicitly ask.
- Ask me before creating or updating more than a handful of records.

Step 1 — Pick the connection
If you can use MCP tools (Claude Code, Claude Desktop, Cursor, or another
MCP-capable client), set up the Kyo MCP server (Step 2). Otherwise use the REST
API directly (Step 3).

Step 2 — MCP setup (preferred)
0. Remote-capable client (claude.ai connectors, Claude Code, Cursor, or any MCP
   client that supports remote servers with OAuth)? Skip the install — connect
   to the hosted server and complete the browser sign-in it opens:
   https://app.trykyo.com/api/mcp
   (Claude Code: claude mcp add --transport http kyo https://app.trykyo.com/api/mcp)
   Then jump to step 5. Otherwise set up the local stdio server:
1. Check Node.js 18+ and npm are available: node -v
2. Install the CLI: npm install -g kyo-cli
3. Run: kyo login
   This opens a browser for OAuth sign-in. I will complete it — wait for the
   command to finish, then confirm the connection with: kyo whoami
4. Register the MCP server with the client you are running in:
   - Claude Code:     claude mcp add kyo -- npx -y kyo-cli mcp
   - Claude Desktop:  add {"mcpServers": {"kyo": {"command": "npx", "args":
                      ["-y", "kyo-cli", "mcp"]}}} to claude_desktop_config.json
   - Cursor:          add {"mcpServers": {"kyo": {"command": "kyo", "args":
                      ["mcp"]}}} to ~/.cursor/mcp.json
   - Other stdio MCP clients: command npx, args ["-y", "kyo-cli", "mcp"]
5. After the client restarts it discovers 36 kyo_* tools (kyo_list_deals,
   kyo_create_task, ...). Verify by calling kyo_whoami.
Full guide: https://www.trykyo.com/docs/mcp

Step 3 — REST API (no MCP)
- Base URL: https://pvozbkuhjofzitsmpspf.supabase.co/functions/v1/api-v1/v1
- Every request needs two headers:
    Authorization: Bearer (a kyo_at_... access token)
    apikey: (the public anon key published at https://www.trykyo.com/docs/api#auth)
- Tokens come from the OAuth 2.0 + PKCE flow: https://www.trykyo.com/docs/oauth
  Access tokens last 1 hour; refresh tokens rotate on every use.
  If a browser sign-in is easier, install kyo-cli (Step 2.1–2.3) and shell out to
  it instead — kyo deals list, kyo tasks create --name "...", output is JSON.
- Resources under /v1: deals, people, companies, tasks, deal_tasks, pipelines,
  pipeline_stages, labels, comments, spaces, projects, deal_people, deal_labels,
  activity (read-only), credits (read-only), enrich (POST-only, metered).
- Reads: GET /v1/deals?limit=50 — keyset pagination via next_cursor (limit max
  200), plus exact-match filters like ?pipeline_id=...
- Writes: POST /v1/(resource) to create, PATCH /v1/(resource)/(id) to update.
  DELETE returns 405 everywhere.
- Rate limits: 60 requests/min per token, 600/min per workspace. On 429, honor
  Retry-After.
- Errors are JSON: {"error": "code", "message": "...", "request_id": "..."} —
  403 insufficient_scope means the token lacks resource:read / resource:write.
Full reference: https://www.trykyo.com/docs/api

Step 4 — Verify and report back
1. Confirm the connection: call the kyo_whoami tool, run kyo whoami, or
   GET /v1/pipelines.
2. Tell me which user and workspace you are connected as, which scopes were
   granted, and the names of my pipelines.
3. Suggest 3 useful things you could do from here (for example: turn TODOs in
   this repo into Kyo tasks, create deals from a lead list, or post a comment on
   a deal when a deploy ships) — and wait for my approval before writing
   anything.

What the agent will do

StepWhat happensYou'll need to
InstallInstalls kyo-cli from npm
Sign inRuns kyo login, which opens your browserApprove the OAuth grant
RegisterAdds the MCP server to its own client configRestart the client if asked
VerifyCalls kyo_whoami and lists your pipelinesCheck it's the right workspace
ProposeSuggests next steps, writes nothing yetApprove what you want

The agent only ever acts as you: every call is bounded by the scopes you approve at sign-in and by your workspace permissions, and v1 of the API has no DELETE.

After setup

Try a few asks to see it working:

  • "List my Kyo deals and summarise the pipeline."
  • "Create a task in the Acme space for the bug we just fixed, priority 3."
  • "Move the Initech deal to Negotiation and add a comment."

To disconnect, run kyo logout or revoke the grant from Settings → API in the Kyo app. For the full surface, see the MCP tools table, the REST API reference, and the OAuth 2.0 guide.