> For the complete documentation index, see [llms.txt](https://docs.amply.tools/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.amply.tools/reference/mcp-tools.md).

# MCP tools

The Amply MCP (`@amplytools/amply-mcp`) lets an AI assistant drive your Amply account — sign in, register apps, and author campaigns — on your behalf. This page lists every tool it exposes. For the why and the setup, see [AI-assisted integration](/getting-started/ai-assisted-integration.md).

Install it once:

```bash
claude mcp add amply -- npx -y @amplytools/amply-mcp     # Claude Code
codex mcp add amply -- npx -y @amplytools/amply-mcp      # Codex CLI
```

The assistant signs you in on first use and caches the session locally. All tool names are prefixed `amply_`.

## Status & sign-in

| Tool           | What it does                                                                                                                                 |
| -------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| `amply_status` | Report whether a session is cached and which user/organization it belongs to. No network call.                                               |
| `amply_signup` | Create a new Amply account and organization, then cache the session. Use once per developer; returns a conflict if the email already exists. |
| `amply_login`  | Sign in to an existing account with email/password and cache the session.                                                                    |
| `amply_logout` | Clear the cached session.                                                                                                                    |
| `amply_whoami` | Return the signed-in user and organization.                                                                                                  |

## Projects & applications

| Tool                       | What it does                                                                                                                                                                                                                                 |
| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `amply_ensure_app`         | **Recommended entry point.** Idempotently resolve a project + application + API key for a given `bundleId` + `platform` — creating what's missing and reusing what exists, without minting duplicate keys. Returns a ready-to-use env block. |
| `amply_list_projects`      | List the projects in your organization.                                                                                                                                                                                                      |
| `amply_create_project`     | Create a new project.                                                                                                                                                                                                                        |
| `amply_find_application`   | Find an application by `bundleId` + `platform` (and its owning project). Read-only — handy as a preflight before deciding whether to create.                                                                                                 |
| `amply_list_applications`  | List the applications under a project.                                                                                                                                                                                                       |
| `amply_get_application`    | Fetch one application by id (public key values and metadata; not the secret).                                                                                                                                                                |
| `amply_create_application` | Register a new iOS or Android application under a project. The first API key is returned in the response.                                                                                                                                    |
| `amply_create_api_key`     | Mint an additional API key for an application. The secret is shown **once** — save it immediately.                                                                                                                                           |

## Campaigns

Authoring tools always create campaigns in **Draft** — nothing goes live until you activate it with `amply_set_campaign_state`.

| Tool                                  | What it does                                                                                                                                                                                                                                   |
| ------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `amply_list_campaigns`                | List campaigns under a project (id, name, type, state, timestamps). Read-only.                                                                                                                                                                 |
| `amply_get_campaign`                  | Fetch one campaign's full triggering / targeting / content for inspection. Read-only.                                                                                                                                                          |
| `amply_set_campaign_state`            | Move a campaign between **Draft**, **Active**, and **Cancel**. `Active` makes it live; `Cancel` pauses it without deleting.                                                                                                                    |
| `amply_create_campaign_from_template` | Create a Draft campaign from one of six known-good templates (see below). The safest way to author a common campaign.                                                                                                                          |
| `amply_create_campaign`               | Create a Draft campaign from a full definition — trigger event with optional property filters, every-N cadence, device/custom-property targeting, and deeplink content. For shapes the templates don't cover.                                  |
| `amply_update_campaign`               | Edit a campaign in place. Each field you supply replaces that field wholesale (a `targeting` array replaces all rules); omitted fields are untouched, and the current state is preserved — an edit never silently deactivates a live campaign. |
| `amply_describe_targeting`            | Return the targeting and triggering vocabulary (slots, comparators, event-property shape) so a campaign can be authored without external docs. Read-only.                                                                                      |

### Campaign templates

`amply_create_campaign_from_template` accepts one of:

| Template                                         | Fires when                                                                                                                                                                                           |
| ------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `rate-review-after-positive-moment`              | A positive event recurs — prompts the native rate-and-review dialog.                                                                                                                                 |
| `deeplink-on-feature-discovery`                  | A feature-interest event fires — opens a deeplink.                                                                                                                                                   |
| `deeplink-on-session-n`                          | The Nth session starts.                                                                                                                                                                              |
| `deeplink-on-custom-property`                    | An event fires and a custom property matches a value.                                                                                                                                                |
| `deeplink-after-positive-event-with-suppression` | A positive event fires, with a cooldown so it isn't repeated too often.                                                                                                                              |
| `deeplink-on-property-change`                    | A custom property changes to a target value (`propertyKey`, `newValue`, optional `oldValue`, `deeplink`) — reacts to the `CustomPropertyChanged` system event, no app-side `*_changed` event needed. |

## Related

* [AI-assisted integration](/getting-started/ai-assisted-integration.md) — what the MCP is and how to set it up
* [Events](/reference/events.md) — the system events campaigns can trigger on
* [API reference](/reference/api-reference.md) — the underlying REST contract


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.amply.tools/reference/mcp-tools.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
