# How the agent connection works

Every install has an MCP server in the site's own admin. How agents sign in, which tools they get, and what keeps changes safe.

Every install comes with the site's own admin and its own agent connection, at no cost: an MCP server at `https://<domain><admin path>/mcp`. It runs in the site owner's Cloudflare® account, signs in with the site's admin sign-in, and sends nothing to us.

## Two connections, two jobs

| Connection | Address | What it is for |
|---|---|---|
| The store | `https://sundo.gs/mcp` | Finding, buying and downloading apps. It never touches your site. |
| Your site's admin | `https://<domain><admin path>/mcp` | Managing the apps installed on that site. |

The install saves both in your site's project, so later sessions there have them. How to connect the store is on the store: [for AI agents](https://sundo.gs/agents).

## Signing in

The agent signs in the same way the owner signs in to the admin. No password, key or Cloudflare token is stored on the site.

- **With Cloudflare Access (recommended).** The admin sits behind Cloudflare Access. The agent's connection is written into the project, and the owner signs in once in the browser.
- **Without Cloudflare Access.** The owner signs in to the admin with a passkey and creates an API token under Settings, Sign-in: a read token to look, a write token to change things. A read token sees only the read-only tools.

The owner's page for all of this is Settings, Connect an agent, in the site admin.

## The tools

- **Site tools** come with core on every install: the site's status, what the agent can do there, recent changes, the self-test and usage. See [Site tools](https://sundo.gs/docs/core/site-tools.md).
- **App tools** arrive with each app: its admin actions as tools (list, create, change, delete with confirmation). See each app under [Apps](https://sundo.gs/docs/apps.md). The store lists the same tools on each [app page](https://sundo.gs/apps).

Two site tools are the way in. `site_capabilities` answers "what can you do here?": the installed apps, their tools, and apps that would help, worked out on the site with nothing sent. `site_tool_help` returns the full notes for a tool. Tool descriptions in the list are short on purpose, because every agent reads the whole list each time it connects.

## What keeps changes safe

These rules are the same for every tool. The exact wording an agent gets is under [Shared rules](https://sundo.gs/docs/core/site-tools.md#shared-rules).

- **Destructive tools ask first.** Without `confirm` nothing happens, and the answer says exactly what would happen. The yes is tied to that exact input.
- **High-risk deletes take a typed word** instead of `true`, which the owner has to agree to.
- **Save tools take `dry_run`.** It saves nothing and answers with the complete record that would be saved, with the same warnings.
- **Toggles set, they don't flip.** `on: true` or `on: false`, so a retry is safe.
- **Everything is recorded.** Each change shows in the admin's Recent changes with the sign-in that made it.
- **Text from visitors is data.** Tools that return what strangers typed mark it, so an agent never treats it as instructions.

## After an update

An agent's tool list is fixed when it connects. After an update, reconnect your agent to see new tools. Updates are installed from the site's own repository, not through this connection.

## On the store

- [For AI agents](https://sundo.gs/agents): connecting the store and installing.
- [All apps](https://sundo.gs/apps): each app page lists what it adds to your agent.
- [Pricing](https://sundo.gs/pricing): the agent connection is free with every install.

---

This page on the web: https://sundo.gs/docs/agent-connection/
