# Cockpit CMS MCP

> Cockpit CMS MCP connects any AI agent directly to your self-hosted headless content system. You can read all structured data—from blog articles and product listings to localized content and asset metadata—and programmatically write back changes without touching a dashboard. It's full control over your digital assets, accessed via natural conversation.

## Overview
- **Category:** developer-tools
- **Price:** Free
- **Tags:** cms, headless, api-first, self-hosted, content-api

## Description

This MCP gives you complete programmatic access to the data powering your Cockpit CMS instance. Instead of logging into a separate web dashboard to check a product SKU or update an article, you talk directly to it through your AI agent. You can list all content collections, fetch specific items by ID, and perform batch operations across multiple models in one go. Need to change a price or correct localized text? Use the appropriate tool to write the data back. It’s designed for developers who need to query content structures while coding, and for marketing teams that need reliable access to multi-language assets. By connecting it through Vinkius, your agent can manage everything—from fetching asset metadata to updating entire menu structures—all from a single, unified connection point.

## Tools

### batch_content_items
Requests data from multiple different content models in a single call.

### create_or_update_content_item
Creates a new content item, or overwrites an existing one if the ID is provided.

### delete_content_item
Permanently removes a specific content item using its unique identifier.

### get_asset_image
Generates resized versions or thumbnail images from an existing digital asset.

### get_asset
Fetches the technical metadata for a file or asset by its ID.

### get_content_item
Retrieves the complete data for a single content item using its unique identifier.

### get_lokalize_project_locale
Retrieves the specific translation data for a single language within a localization project.

### get_lokalize_project
Lists all available translations for an entire localization project.

### get_menu
Fetches the details of one specific navigation menu by its assigned name.

### get_page_by_route
Retrieves content and structure for a page based on its URL route.

### get_sitemap
Gets the complete, current sitemap listing for all available pages.

### list_content_items
Fetches a list of content items from any collection, supporting filtering and sorting.

### list_menus
Gets a full list of all the menu structures defined in the CMS.

### list_pages
Retrieves an enumeration of every page currently configured on the site.

### list_routes
Provides a lightweight list containing all defined routes and their associated slugs.

### search_detektivo
Performs targeted searches within a specific indexed content area called Detektivo.

### submit_inbox
Submits form data collected in an inbox to be processed by the CMS.

## Prompt Examples

**Prompt:** 
```
List the latest 5 articles from the 'blog' collection.
```

**Response:** 
```
I've retrieved the 5 most recent articles from your 'blog' collection. They include 'New Product Launch', 'Summer Trends', and three others. Would you like to see the full content of any specific post?
```

**Prompt:** 
```
Get the metadata for asset ID 12345.
```

**Response:** 
```
Inspecting asset 12345... It's a JPEG image named 'hero-banner.jpg', size 1.2MB, with dimensions 1920x1080. It was uploaded on June 12th. Do you need a resized version of this image?
```

**Prompt:** 
```
Update the content item in 'products' with ID 98765 to change the price to 49.99.
```

**Response:** 
```
I've updated the product (ID: 98765). The price field has been successfully set to 49.99. All other fields remain unchanged. Is there anything else you'd like to modify?
```

## Capabilities

### Querying Content Collections
Fetch lists of content items by applying filters and sorting criteria across any defined collection.

### Creating or Updating Records
Write new data records, or update existing ones if you provide the unique item ID.

### Managing Digital Assets
Get metadata for files by ID and generate resized versions or thumbnails on demand.

### Retrieving Site Structure
Access the current navigation menus, page lists, and sitemap data for site mapping.

### Handling Localization Data
Retrieve all available translations or focus on a specific language locale within a project.

## Use Cases

### Need to build an inventory audit report.
An Ops Specialist needs to know every product SKU and its associated image metadata. They ask their agent: 'Give me the details for all items in the 'products' collection, plus the asset ID for each.' The agent uses `list_content_items` combined with `get_asset`, giving a single structured report.

### A new landing page is ready but needs content updates.
A Marketing Manager provides updated copy and images. They prompt the agent: 'Update the main hero banner for the /landing route using this text and asset ID.' The agent uses `get_page_by_route` to find the target and then calls `create_or_update_content_item`.

### Need to build a global content aggregator.
A Dev needs localized data for a new market. They ask: 'What are all the translations available for the project, and what does the German version of the 'About Us' page say?' The agent calls `get_lokalize_project` and then `get_lokalize_project_locale`.

### Running a content cleanup job.
A Content Admin needs to remove several old, unused articles. They ask: 'Delete the three blog posts with IDs 123, 456, and 789.' The agent uses `delete_content_item` multiple times for precise deletion.

## Benefits

- Manage complex data relationships using `batch_content_items`. Instead of running separate queries for products, blogs, and services, you fetch them all in one request.
- Maintain site structure integrity by accessing page maps with `list_pages` or specific routes using `get_page_by_route`, ensuring your agent always knows what content exists.
- Handle media assets without manual steps. Use `get_asset` to check metadata, and then use `get_asset_image` to generate the exact size image needed for a component.
- Update product details or articles using `create_or_update_content_item`. You can modify fields like price or status directly via your agent call, bypassing the admin UI entirely.
- Manage global content changes efficiently. With tools like `get_lokalize_project` and `get_lokalize_project_locale`, you keep multi-language sites consistent across all markets.
- Eliminate manual data retrieval. Use `list_content_items` to fetch filtered lists—for example, 'all draft articles'—and pass that list directly into a downstream workflow.

## How It Works

The bottom line is you get direct, API-level control over your CMS content and assets through natural language prompts.

1. Subscribe to this MCP and supply your Cockpit CMS instance URL and API Key.
2. Select any compatible AI client, like Cursor or Claude.
3. Ask your agent to perform a task, such as 'List all blog posts from the last month' or 'Update product 456 with new details'.

## Frequently Asked Questions

**How do I update a product price using create_or_update_content_item?**
You must call the `create_or_update_content_item` tool and include the specific product ID in your data payload. You'll send the new price field, and the MCP handles overwriting the old value.

**What is the best way to find all my menus?**
Use `list_menus`. This tool pulls a full list of every menu structure defined in your CMS. If you only need one, use `get_menu` and provide the name.

**Can I fetch content from multiple collections at once?**
Yes, that's what `batch_content_items` is for. It allows you to request data from several different content models in a single API call, improving performance.

**How do I get the metadata for an image asset?**
Use the `get_asset` tool and provide the asset's ID. This returns technical details like file size, dimensions, and upload date without needing to generate a new image.

**When I need to retrieve all translations for a project, how do I use the `get_lokalize_project` tool?**
The `get_lokalize_project` tool returns a list of every available locale for your specified Lokalize project. This lets you see exactly which languages are configured before fetching content. You then follow up by using `get_lokalize_project_locale` to pull the actual translated strings for a single language.

**What parameters should I use with `list_content_items` if I only want to see posts from a specific date range?**
You pass filtering criteria, including start and end dates, directly into the `list_content_items` call. This narrows down results instantly, so you don't have to sift through thousands of entries. It's much faster than pulling everything and filtering it yourself.

**If I need a complete overview of my site for SEO purposes, how do I use the `get_sitemap` tool?**
Calling `get_sitemap` pulls the full list of accessible routes and pages from your CMS. This is useful for auditing or ensuring search engines can find every piece of content. It gives you a comprehensive view of what's live on the site.

**Before I use `delete_content_item`, how can I verify that an item exists and has the correct ID?**
You should always run `get_content_item` first, using the suspected ID. This confirms the data payload is present and valid before you attempt deletion. It prevents accidental removal of live content by confirming all details match what you expect.

**Can I filter content items using Mongo-style queries?**
Yes! The `list_content_items` tool supports a `filter` parameter where you can pass a JSON object with Mongo-style query operators to precisely target your data.

**Is it possible to resize images directly through the agent?**
Absolutely. Use the `get_asset_image` tool with parameters like `w` (width), `h` (height), and `m` (mode) to request processed versions of your stored image assets.

**Can I fetch data from multiple collections at once?**
Yes, the `batch_content_items` tool allows you to define multiple models and their respective query parameters in a single JSON object to retrieve all required data in one go.