# Agility CMS MCP Server

> Source: https://agilitycms.com/docs/developers/agility-cms-mcp-server

The Agility CMS MCP Server connects AI assistants directly to your Agility CMS instances, letting you manage content through natural-language conversations. It implements the [Model Context Protocol](https://modelcontextprotocol.io) (MCP) — an open standard supported by Claude, ChatGPT, GitHub Copilot, Cursor, Windsurf, Gemini, and other MCP-compatible clients.

Ask your AI assistant to model content, create pages, bulk-edit items, audit your schema, publish updates, or run a multilingual migration — and it calls the right Agility Management APIs on your behalf, always within your existing permissions.

- **Endpoint:** `https://mcp.agilitycms.com/api/mcp`
- **Transport:** Streamable HTTP
- **Authentication:** OAuth 2.0
- **Status:** Generally Available — **v2.0.0**
- **Docs & one-click install:** [mcp.agilitycms.com](https://mcp.agilitycms.com)

---

## What's new in 2.0

Version 2.0 grew the toolset from 20 to 27 tools and added full authoring and publishing workflows, with a human-in-the-loop confirmation model for anything destructive. Five more tools have been added since then (dedicated publish and unpublish tools for content and pages, plus `save_page_model`), so the server now exposes **32 tools**.

- **Publishing & workflow:** `publish_content` and `unpublish_content` take content items live or offline, and `publish_page` and `unpublish_page` do the same for pages. `manage_content_workflow` and `manage_page_workflow` approve, decline, or request approval for content items and pages.
- **Page models:** `save_page_model` creates or updates a page model and its content zones.
- **Delete support** — new `delete_content_item`, `delete_page`, and `delete_media` tools, each gated behind explicit confirmation.
- **Media library browsing** — `list_media` lists assets (paged) and returns the Edge (CDN) URL; pairs with the existing upload flow and the new `delete_media`.
- **Identity check** — `get_current_user` is a read-only "whoami" that confirms which user the active token authenticates as (it never returns credentials).
- **Human-in-the-loop confirmation:** unpublish and delete actions are annotated as destructive, so MCP clients can ask you before they run. On clients that support MCP elicitation, delete actions show a "type `DELETE`" prompt in your own UI.
- **Safer authoring** — `save_page` now validates zone names against the page model (instead of silently dropping mismatched components), linked-content reference names are normalized to their canonical case, and permission denials surface as clear messages without ever leaking your token.

> There are **no breaking changes** to the tools that existed in 1.0. Existing setups keep working — you simply gain the new tools.

---

## Available tools

The server exposes **32 tools** across five categories. Each tool is annotated so MCP clients know whether it only reads data or can modify your instance. Actions that take content offline or remove data (unpublish and delete) are annotated as destructive and can ask for confirmation before they run. See [Confirmation for destructive actions](#confirmation-for-destructive-actions).

### Discovery & setup

| Tool | What it does |
|------|--------------|
| `get_available_instances` | Lists the Agility instances you can access |
| `get_current_user` | Identifies the user the current token authenticates as (read-only whoami) |
| `get_locales` | Returns the locale codes configured for an instance |
| `get_containers` | Lists content containers (content lists and single items) |

### Models & schema

| Tool | What it does |
|------|--------------|
| `get_content_models` | Lists content model definitions |
| `get_component_models` | Lists component (page module) model definitions, including Agility's built-in components |
| `get_content_model_details` | Returns the full field schema for a content model |
| `get_component_model_details` | Returns the full field schema for a component model (always includes the numeric model ID) |
| `save_content_model` | Creates or updates a content model |
| `save_component_model` | Creates or updates a component model |
| `save_page_model` | Creates or updates a page model and its content zones |
| `save_container` | Creates or updates a container |

### Content

| Tool | What it does |
|------|--------------|
| `get_content_items` | Retrieves a list of items from a container, with filtering and pagination |
| `get_content_item` | Fetches one or more items by ID (batch supported) |
| `save_content_items` | Creates or updates one or more content items in a single batch. Returns each item's `contentID` and a ready-made editor URL. |
| `publish_content` | Publishes one or more content items (takes them live) |
| `unpublish_content` | Unpublishes one or more content items (takes them offline) *(destructive)* |
| `manage_content_workflow` | Approves, declines, or requests approval for content items |
| `delete_content_item` | Deletes one or more content items *(confirmed — type `DELETE`)* |

### Pages & sitemaps

| Tool | What it does |
|------|--------------|
| `get_sitemaps` | Lists all sitemaps (channels) for an instance |
| `get_sitemap` | Retrieves a specific sitemap, with depth/path filtering and flat mode |
| `get_page` | Retrieves a page by ID, including zones, SEO, and dynamic config |
| `get_page_models` | Lists available page models (templates), with zone definitions |
| `save_page` | Creates or updates a page — static, dynamic, folder, or link (validates zone names) |
| `reorder_page_modules` | Reorders the components within a page zone |
| `publish_page` | Publishes one or more pages (takes them live) |
| `unpublish_page` | Unpublishes one or more pages (takes them offline) *(destructive)* |
| `manage_page_workflow` | Approves, declines, or requests approval for pages |
| `delete_page` | Deletes one or more pages *(confirmed — type `DELETE`)* |

### Media

| Tool | What it does |
|------|--------------|
| `initialize_media_upload` | Starts a media upload and returns a temporary signed URL to POST the file to |
| `list_media` | Lists assets in the media library (paged), returning the Edge (CDN) URL — find a `mediaID`, spot duplicates |
| `delete_media` | Deletes a media asset by `mediaID` *(confirmed — type `DELETE`)* |

---

## Confirmation for destructive actions

Actions that take content offline or remove data are gated:

| Action | Confirmation |
|--------|--------------|
| `delete_content_item`, `delete_media`, `delete_page` | Type **`DELETE`** to proceed |
| `unpublish_content`, `unpublish_page` | Annotated as destructive, so your client may prompt before running it. Reversible with `publish_content` / `publish_page`. |
| `publish_content`, `publish_page` | Not annotated as destructive. Runs under your Agility permissions and is reversible with `unpublish_content` / `unpublish_page`. |
| `manage_content_workflow` / `manage_page_workflow` (`approve` / `decline` / `request-approval`) | Not gated (low risk) |

How an action is confirmed depends on what your MCP client supports (negotiated at connection):

1. **Client permission prompt.** These tools are annotated as *destructive*, so MCP clients prompt before running them ("Allow this tool to run?"). Choosing **"always allow"** in your client opts out of that prompt for that tool — that's a client-side setting, not something the server can override.
2. **Server elicitation (true human gate).** On clients that support **MCP elicitation** (e.g. Claude Code), the server renders the confirmation form (yes/no, or "type `DELETE`") in your own UI — a gate the AI assistant can't satisfy on its own.
3. **No elicitation → your Agility permissions enforce.** On clients that don't support elicitation, the action runs with your own OAuth token and the **Agility Management API enforces your permissions** — if your account can't publish or delete, the API denies it. The response notes that no interactive prompt was shown (`humanConfirmed: false`).

---

## Installation

The hosted server uses the streamable-HTTP endpoint `https://mcp.agilitycms.com/api/mcp`. On first connection your client opens a browser window to authenticate with Agility via OAuth — no API keys or passwords to copy around.

> **Fastest path:** visit **[mcp.agilitycms.com/instructions](https://mcp.agilitycms.com/instructions)** for the **Add to Claude** button, one-click install buttons (VS Code, Cursor, and more), and copy-paste setup for every supported client.

### One-click install

For supported editors, a single click adds the hosted server and kicks off the OAuth sign-in:

- **VS Code** — `vscode:mcp/install` deep link
- **VS Code Insiders** — `vscode-insiders:mcp/install` deep link
- **Cursor** — `cursor://anysphere.cursor-deeplink/mcp/install` deep link
- **LM Studio** — `https://lmstudio.ai/install-mcp` deep link

Grab the buttons from [mcp.agilitycms.com/instructions](https://mcp.agilitycms.com/instructions). For everything else, use the manual steps below.

### Claude (Desktop & Web)

Agility CMS is an official connector in Claude's connector directory, so there is no URL to paste.

1. Open **Customize → Connectors → Discover** and search for **Agility CMS**. (The **Add to Claude** button on [mcp.agilitycms.com/instructions](https://mcp.agilitycms.com/instructions) goes straight there.)
2. Pick **Agility CMS**, not **Agility CMS Knowledgebase** (that is the separate docs connector), and sign in to Agility when prompted. Claude then sees only the instances and content your own Agility account can reach.

**Team or Enterprise workspaces:** an admin enables the Agility CMS connector from the workspace admin settings. That makes it available to everyone but does not connect anyone: each member still signs in to Agility individually, and their own Agility permissions govern every call. There is no shared or service credential.

**Adding it manually:** if the directory entry hasn't reached you yet, open **Customize → Connectors → Add** and add a custom connector:

- **Name:** `Agility CMS`
- **MCP Server URL:** `https://mcp.agilitycms.com/api/mcp`

### Claude Code (CLI)

```bash
claude mcp add --transport http "Agility-CMS" https://mcp.agilitycms.com/api/mcp
```

### GitHub Copilot for VS Code

Use the one-click VS Code badge, or set it up manually:

1. Make sure the latest GitHub Copilot extension is installed in VS Code.
2. Open the Command Palette (`Ctrl+Shift+P` on Windows/Linux, `Cmd+Shift+P` on Mac).
3. Search for **Copilot: Configure MCP Servers** and add:
   - **Server URL:** `https://mcp.agilitycms.com/api/mcp`
   - **Auth Type:** OAuth
4. Follow the OAuth flow to connect your Agility CMS account.

### Gemini CLI

Add the server with a single command:

```bash
gemini mcp add --transport http agility-cms https://mcp.agilitycms.com/api/mcp
```

Or add it manually to `~/.gemini/settings.json`:

```json
{
  "mcpServers": {
    "agility-cms": {
      "httpUrl": "https://mcp.agilitycms.com/api/mcp"
    }
  }
}
```

On first connection, follow the OAuth flow to grant access. Run `/mcp` inside Gemini CLI to confirm the Agility tools are loaded.

### Cursor

1. Open **Cursor Settings → Extensions → MCP Servers**.
2. Click **Add Server** and configure:
   - **Name:** `Agility CMS`
   - **URL:** `https://mcp.agilitycms.com/api/mcp`
   - **Auth:** OAuth
3. Complete the OAuth sign-in to link your Agility CMS account.

### Windsurf

1. Open **Windsurf Settings → AI Tools → Model Context Protocol**.
2. Add a new MCP server with these details:
   - **Server Name:** `Agility CMS MCP`
   - **Endpoint:** `https://mcp.agilitycms.com/api/mcp`
   - **Authentication:** OAuth 2.0
3. Follow the OAuth flow to grant Windsurf access to your Agility CMS account.

### Google Antigravity

1. In an Agent session, open the **"…"** dropdown at the top of the editor's side panel and select **MCP Servers**.
2. Click **Manage MCP Servers**, then **View raw config**.
3. Add Agility CMS as a remote (HTTP) MCP server. It is hosted, so there is nothing to install locally:
   - **Server Name:** `Agility CMS MCP`
   - **Endpoint:** `https://mcp.agilitycms.com/api/mcp`
   - **Transport:** streamable HTTP
   - **Authentication:** OAuth 2.0
4. Return to **Manage MCP Servers** and click **Refresh**. The Agility CMS tools are now available in your agent sessions.

### ChatGPT

ChatGPT now calls connectors **apps**. You add a custom MCP app through Developer mode:

1. Go to **Settings → Apps (Connectors) → Advanced settings** and turn on **Developer mode**.
2. In **Settings → Apps**, click **Create** and configure:
   - **Name:** `Agility CMS`
   - **MCP Server URL:** `https://mcp.agilitycms.com/api/mcp`
   - **Authentication:** OAuth
3. Complete the OAuth flow to connect your Agility CMS account.
4. Enable the app on a conversation to call the Agility CMS tools directly in chat.

> **Note:** Custom MCP apps are available on the web to Pro, Plus, Business, Enterprise, and Education accounts.

---

## Authentication

The server uses **OAuth 2.0** with short-lived access tokens. You sign in through Agility's standard login, and the server acts strictly within your existing permission boundaries — it can only see and change what your account is allowed to. No passwords are ever stored by the MCP server.

---

## Field type support

The model and content tools understand Agility's full field catalog, including:

- **Basic:** text, multi-line text, HTML/rich text, numbers, booleans, dates
- **Selection:** dropdowns, checkbox lists, link fields
- **Media:** image attachments, file attachments, image galleries
- **Relationships:** linked content (shared and nested), with companion text/value fields for searchable lists

When creating or updating models, include all relevant field properties — undefined properties are treated as empty or null.

---

## Working with media

Media uploads use a secure signed-URL flow rather than embedding file bytes in the conversation:

1. Call `initialize_media_upload` to receive a temporary `uploadUrl` (valid for 5 minutes).
2. `POST` the file to that URL as multipart form-data (field name `file`).
3. Use the returned asset URL in an attachment field when you call `save_content_items` or `save_page`.

Use `list_media` to browse the library (and spot duplicates before re-uploading), and `delete_media` to remove an asset by its `mediaID`.

---

## Publishing & workflow

`save_content_items` always saves to the instance's default workflow state (typically **Staging**). A `state` value passed on save is **not** honored, and the tool flags this in its response. Saved items are not live until you publish them: use `publish_content` to take content live and `unpublish_content` to take it offline. Pages follow the same pattern: `save_page` saves to Staging, and `publish_page` / `unpublish_page` take pages live or offline. To move content items or pages through approval, use `manage_content_workflow` or `manage_page_workflow` (`approve`, `decline`, `request-approval`).

For **User Selectable** linked-content fields, the stored value is the linked container's reference name. The editor matches that name case-sensitively, so the server normalizes whatever case you supply to the container's canonical case from `get_containers` on save (and returns the canonical case on read) — preventing the "dropdown renders blank" problem.

---

## Example use cases

- **Content modeling** — "Create a BlogPost model with a title, hero image, rich-text body, and author reference."
- **Page composition** — "Build a `/pricing` landing page with a hero, a 3-up feature grid, and a CTA."
- **Bulk operations** — "Update every BlogPost missing a meta description and set one based on the intro paragraph."
- **Content auditing** — "List all content models and flag fields that aren't used by any container."
- **Multilingual workflows** — "Show me which pages exist in en-us but are missing in fr-ca."
- **Migration** — "Create these 30 product items from the spreadsheet I'm describing."
- **Publishing:** "Publish content items 272 and 273."
- **Cleanup** — "Delete the test articles I just created, and remove any duplicate uploads from the media library."

---

## Support

- **Documentation & setup:** [mcp.agilitycms.com](https://mcp.agilitycms.com)
- **Tool catalog:** [mcp.agilitycms.com/tools](https://mcp.agilitycms.com/tools)
- **Help & feedback:** support@agilitycms.com
- **Source:** [github.com/agility/agility-mcp-server](https://github.com/agility/agility-mcp-server)

---

## Related pages

- [Extending the CMS](https://agilitycms.com/docs/developers/extending-the-cms.md)
- [Custom Sections](https://agilitycms.com/docs/developers/custom-sections.md)
- [Webhooks](https://agilitycms.com/docs/developers/webhooks.md)
- [Apps](https://agilitycms.com/docs/developers/apps.md)
- [Updating Legacy Input Forms](https://agilitycms.com/docs/developers/updating-legacy-input-forms.md)
- [Rich Text Editor Customization](https://agilitycms.com/docs/developers/rich-text-editor-customization.md)
- [Custom Asset Domains](https://agilitycms.com/docs/developers/custom-asset-domains.md)
- [Publishing to Social Channels](https://agilitycms.com/docs/developers/publishing-to-social-channels.md)
- [Agility Decorate](https://agilitycms.com/docs/developers/agility-decorate.md)
- [Connect the Agility MCP Server to Microsoft 365 Copilot](https://agilitycms.com/docs/developers/connect-agility-mcp-server-to-microsoft-365-copilot.md)
- [Verifying Signed Webhooks](https://agilitycms.com/docs/developers/verifying-signed-webhooks.md)
- [Migrating Content into Agility with an AI Agent](https://agilitycms.com/docs/developers/migrating-content-with-an-ai-agent.md)
- [Webhook Events and Payload Reference](https://agilitycms.com/docs/developers/webhook-events-and-payloads.md)

Index of every docs page: https://agilitycms.com/docs/llms.txt
