# Playbooks, integrations, and MCP servers

These three sit next to each other in the account UI and get used in the same
sentences. They are not the same thing.

## The short version

- **Playbooks** are behavior: saved code with exports, `kody.jobs`, webhooks,
  subscriptions (for example `email.message.received`), playbook apps, and
  helpers your agent calls through `execute`.
- **Integrations** are account-owned OAuth and credential wiring — reusable
  logins (Slack, GitHub, Google, …) that playbooks _use_. A playbook may say it
  needs an integration. It does not own the connection: you connect, refresh,
  lock, and revoke that login on the account.
- **MCP servers** are how agents connect: client and session wiring to talk to
  Kody, or for Kody to talk to another MCP server. They are not playbook
  runtime. Prefer playbooks as the capability surface agents reach _through_
  Kody MCP.

A pasted API key is a **secret**, not an integration. Secrets stay yours;
playbooks and execute refer to them by name.

## Use this one when

| You want to…                                                                       | Use                |
| ---------------------------------------------------------------------------------- | ------------------ |
| Keep working code, a schedule, a webhook, or a helper export                       | A **playbook**     |
| Sign in to Slack / GitHub / Google so that code can act as you                     | An **integration** |
| Point Claude, Cursor, or ChatGPT at Kody — or add another MCP server Kody can call | An **MCP server**  |

Jobs and schedules live on the playbook (`kody.jobs`). Do not hang a cron off an
integration or an MCP connection.

## One example that uses all three

You want Slack messages to become a daily digest.

1. **Integration** — connect Slack on `/account/integrations`. That login is
   yours. Any approved playbook can use it; Slack itself is not a playbook.
2. **Playbook** — a helpers playbook calls Slack through that integration
   (`createAuthenticatedFetch`), exposes an export, and maybe a `kody.jobs` cron
   that posts the digest. Subscriptions can listen for events the same way.
3. **MCP** — your agent is connected to Kody as an MCP client. It finds the
   playbook with `search` and calls the export with `execute`. It does not talk
   to Slack's MCP, and the Slack integration is not a playbook.

Adding Slack as a remote MCP server on `/account/mcp-servers` is a different
job: that exposes Slack's tools as `kody.mcp["slack"]`. Prefer the integration
plus a playbook when you want owned helpers, jobs, or a stable export.

## Next

- [Playbook lifecycle](/guides/playbook-lifecycle) — when to save, edit, or execute
- [Integration bootstrap](/guides/integration-bootstrap) — connect and smoke-test
  first
- [Connect your agent](https://github.com/kentcdodds/kody/blob/main/docs/use/connect-your-agent.md) — Kody as the MCP server
- [Connect remote MCP servers](https://github.com/kentcdodds/kody/blob/main/docs/use/mcp-client-servers.md) — Kody as the MCP
  client
