# Payload CMS MCP for AI Agents AI Agent Connect

> Payload CMS MCP for AI Agents. Manage your Payload CMS content directly from any AI agent—query collections, update documents, and manage globals via its REST API. It lets you handle content updates, audit data, and manage site configurations through natural conversation instead of clicking through the admin panel. You can make bulk edits, verify production data, and manage site settings without leaving your chat interface.

## Overview
- **Category:** loved-by-devs
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_t6Q04CoVJpzCHaQBNfO8SdQRAkWHqidUz0iD4vuL/ai-agent-connect
- **Tags:** backend-framework, api-driven, content-modeling, rest-api, data-collections, web-development

## Description

This Payload CMS MCP lets you talk to your headless CMS instance like it's a teammate. Instead of logging into a dashboard to find a specific post or update a price, you just tell your AI client what needs to happen. It handles the heavy lifting of navigating the backend for you. You can ask it to find every product that's out of stock, update the site's header links, or even delete old preferences across your user base. If you're a developer, you can use it to grab production data quickly to see how a response looks without setting up a local environment. For content managers, it means you can make bulk edits or check the status of entries while staying in your usual workflow. Because Vinkius hosts this Connector, you get a reliable way to hook into your headless CMS, making it easy to move between different content tasks without switching tabs. It's about getting the data you need or making the changes you want without the friction of manual entry. You can check your site's global settings to see who has access or what links are live, and you can push new content into your collections with a simple command. It turns your content management into a conversation, removing the need to navigate complex menus or remember specific IDs.

## Tools

### find_by_id
Locate a single document within a collection by its ID. This is perfect for quickly grabbing specific data for inspection.

### find_many
Search for and list multiple documents that match your query criteria. It lets you filter content by status, date, or other custom fields.

### get_global
Retrieve data from site-wide configurations like headers or footers. Use this to see your current global settings in one go.

### update_document
Modify the fields of an existing document using its ID. It lets you make precise changes to content without opening the admin UI.

### update_global
Change site-wide settings for things like navigation or site titles. This is the best way to update branding or menu links quickly.

### update_preference
Modify a specific user preference in your Payload instance. Use this to change individual user settings through a natural command.

### delete_document
Remove a specific document from a collection using its unique ID. This helps you keep your database clean by getting rid of old entries.

### delete_preference
Clear a specific user preference from your Payload instance. Use this to reset user settings or remove outdated data.

### create_document
Add a new entry to any collection with custom JSON data. It lets you push new content into your system from your chat.

### get_preference
Pull the current settings for a specific user's preferences. Use this to verify what a user sees on your site.

## Prompt Examples

**Prompt:** 
```
Find all products in the 'electronics' collection that are currently out of stock.
```

**Response:** 
```
I've scanned the electronics collection and found 4 items currently out of stock:

| Product Name | SKU | Stock Level |
| :--- | :--- | :--- |
| Wireless Headphones | WH-100 | 0 |
| Smart Watch v2 | SW-200 | 0 |
| Bluetooth Speaker | BS-50 | 0 |
| Gaming Mouse | GM-90 | 0 |

Would you like me to update the stock status or create a notification for these?
```

**Prompt:** 
```
Update the 'header' global to include a new link for the 'Summer Sale'.
```

**Response:** 
```
I've updated the site header configuration. The navigation array now includes the new 'Summer Sale' link. 

**Updated Header Links:**
- Home
- Shop
- **Summer Sale**
- About Us

Is there anything else you'd like to change in the header?
```

**Prompt:** 
```
Show me the user preferences for the user with ID 550.
```

**Response:** 
```
I've retrieved the preferences for user 550:

- **Theme:** Dark Mode
- **Notifications:** Enabled
- **Language:** English
- **_last_login:** 2024-05-12T14:22:01Z

Would you like to modify any of these settings?
```

## Capabilities

### Query specific documents
Find and list content from any collection using your natural language.

### Create new content
Add new entries to your collections with full data support.

### Modify global settings
Update site-wide configurations like headers and footers instantly.

### Fetch user preferences
Retrieve specific user settings to personalize the experience.

### Clean up old data
Remove outdated documents or user preferences from your instance.

## Use Cases

### Updating prices across a store
A store owner asks to set all products in the 'sale' collection to 50% off. The agent uses update_document to loop through and apply the change.

### Quick content audits
A content lead asks to see all posts from last month. The agent uses find_many to list the entries and their statuses.

### Changing site headers
A marketing person wants to change the site logo. The agent uses get_global to see the current logo and update_global to swap it.

### Wiping test data
A dev needs to wipe all test preferences. The agent uses delete_preference to clear the staging environment.

### Pushing new content
A writer wants to add a new blog post. They give the agent the text, and it uses create_document to add it to the site.

## Benefits

- Stop clicking through the admin panel to update simple text using update_document.
- Pull production data into your editor quickly with find_many to verify API behavior.
- Edit site-wide headers and footers in seconds using update_global instead of manual configuration.
- Clean up your database by removing outdated entries with delete_document or delete_preference.
- Handle complex content queries using Payload's native query language via find_many.
- Manage user-specific settings easily by pulling data with get_preference.

## How It Works

The bottom line is you get a direct conversational line to your headless CMS content.

1. Connect your Payload CMS URL and keys to the Connector.
2. Tell your agent which collection or global data you want to access.
3. Get back the exact content or confirmation of the change you requested.

## Frequently Asked Questions

**Can I use the Payload CMS MCP to update my website's navigation?**
Yes, you can use it to edit global settings like navigation links directly. This allows you to manage your site's menu without having to log into the backend.

**Does the Payload CMS MCP work with my production site?**
It works with any Payload CMS instance you provide the URL and keys for. Just make sure your API keys have the correct permissions for the actions you want to perform.

**Can I use this to delete old content?**
Yes, you can ask your agent to remove specific documents or preferences using the delete tools. It's a fast way to clean up your database.

**Is this Connector safe for my CMS data?**
It uses your existing API keys and permissions, so it only does what you authorize. It acts as a bridge between your agent and your data.

**How does the Payload CMS MCP handle complex filters?**
It supports Payload's native query language, so you can ask for specific subsets of data like 'all posts from last week' or 'products under $50'.

**Can I use the Payload CMS MCP to create new blog posts?**
Yes, you can give your agent the content and it will create a new document in your collection. You just need to tell it which collection to use.

**How can I filter results to find specific documents in a collection?**
You can use the `find_many` tool and provide a JSON string in the `where` parameter. This follows Payload's standard query syntax, allowing you to filter by fields, operators (like `equals`, `contains`), and nested logic.

**Can I control how much related data is returned in a query?**
Yes! Most query tools like `find_many`, `find_by_id`, and `get_global` include a `depth` parameter. Increasing this number will populate more levels of nested relationships.

**Does this server support updating global settings like site headers?**
Absolutely. Use the `get_global` tool to retrieve current data and `update_global` to modify it. This is perfect for managing site-wide configurations without leaving your AI assistant.