# Magnolia CMS MCP

> Magnolia (Enterprise Headless CMS) connects your AI agent directly to an enterprise JCR repository. Control complex content structures, audit component schemas, and manage delivery layer endpoints using natural conversation. Provision nodes, execute workspace commands, and perform deep structural queries without manual REST calls.

## Overview
- **Category:** developer-tools
- **Price:** Free
- **Tags:** jcr-repository, content-orchestration, digital-experience, node-management, enterprise-cms, api-driven-content

## Description

Managing a large-scale headless CMS is hard enough without constantly writing boilerplate API requests. This MCP lets you talk to your Magnolia instance like it's a database of pure content structure. You can ask your agent to list active workspaces or find the JSON mapping for a specific delivery endpoint, all through conversation. Need to audit what fields a template expects? Just ask, and the system extracts the component definitions. It’s true structural control over your JCR repository, allowing you to provision new nodes or even trigger publishing workflows just by chatting with it. If managing complex content requires deep visibility into how your site builds its pages, this MCP is essential for any developer working across the Vinkius catalog.

## Tools

### mg.copy_delivery_node
Copies content nodes while verifying the structural logic that governs data delivery.

### mg.create_cms_node
Creates new, highly-available content nodes and writes custom JSON payload models natively.

### mg.wipe_cms_node
Irreversibly deletes specified content nodes, permanently dropping all associated database bytes.

### mg.execute_workspace_command
Runs automated validation checks and platform logic across your entire configured workspace.

### mg.get_delivery_children
Extracts properties that drive the nesting structure of content branches.

### mg.get_delivery_node
Retrieves pure JSON mappings for any given endpoint path from the JCR tree.

### mg.get_template_schema
Lists all attached structured rules, showing exactly which fields a content template requires.

### mg.list_jcr_workspaces
Identifies and lists all active JCR workspaces spanning different context domains.

### mg.query_delivery_nodes
Searches through cloud logging to trace specific content payload criteria.

### mg.patch_cms_node
Updates existing nodes, substituting or modifying draft document schemas globally.

## Prompt Examples

**Prompt:** 
```
Get the node details for path 'tours/bali' from the 'tours_v1' delivery endpoint
```

**Response:** 
```
Retrieving node '/tours/bali'… I've fetched the JSON mapping. It contains properties like tourName: 'Exotic Bali', price: 1200, and duration: '10 days'. Would you like to see the child nodes or the associated template definition?
```

**Prompt:** 
```
List all active JCR workspaces in our Magnolia instance
```

**Response:** 
```
I've identified the following workspaces: 'website' (Site content), 'dam' (Assets), 'configuration' (System settings), 'imaging' (Image processing), and 'categorization' (Tags). Which one would you like to explore?
```

**Prompt:** 
```
Show me the schema definition for template 'mgnl-news-article'
```

**Response:** 
```
Retrieving schema for 'mgnl-news-article'… This template expects 4 main fields: 'title' (Required, Text), 'body' (RichText), 'image' (Link to DAM), and 'author' (Text). I can help you create a new node implementing this structure.
```

## Capabilities

### Audit and Understand Content Structure
Examine template schemas and discover all active JCR workspaces to map out where content lives.

### Manipulate Nodes and Data Payloads
Create, delete, copy, or update content nodes in the repository using simple commands instead of complex payloads.

### Query Complex Content Relationships
Execute deep queries across delivery endpoints to retrieve pure JSON mappings and identify specific property values.

### Manage Operational Workflows
Trigger platform commands, such as validation checks or content publishing cycles, directly from your agent.

## Use Cases

### Debugging a broken page layout
A developer notices a page is missing data. Instead of manually querying multiple endpoints, they ask their agent to run `mg.get_delivery_node` for the exact path and get the JSON mapping. The response immediately shows that a required property field is null, pinpointing the source issue.

### Setting up a new content type
A content architect needs to know what fields are available for a blog post. They ask their agent to use `mg.get_template_schema`. The system returns a detailed list of required fields and types, allowing them to build the node correctly on the first try.

### Publishing content across environments
A digital ops team needs to move approved draft content live. They instruct their agent to use `mg.execute_workspace_command` and confirm that the publishing workflow completes successfully, moving content through its lifecycle automatically.

### Identifying orphaned assets
A developer suspects some nodes are pointing to outdated data structures. They ask their agent to query using `mg.query_delivery_nodes` to trace explicit payload criteria against cloud logs, finding the exact failing dependency.

## Benefits

- Stop writing boilerplate REST calls. Just ask the agent to run `mg.get_delivery_node` to get the pure JSON mapping for any endpoint path, instantly verifying the data structure you need.
- Avoid manual schema audits. Use `mg.get_template_schema` to automatically extract all required component and page template definitions, saving hours of console clicking.
- Manage content lifecycles without risk. You can use `mg.execute_workspace_command` to trigger publishing workflows or validation checks across the entire system in one go.
- Never lose context visibility again. Use `mg.list_jcr_workspaces` to see every active data domain, from your website content to your DAM assets.
- Need to move content? You can use `mg.copy_delivery_node` to copy nodes while the system verifies that all structural matching and delivery logic remains intact.

## How It Works

The bottom line is you get full, conversation-based access to your enterprise CMS content layer without ever touching an API playground.

1. Subscribe to this MCP and provide your Magnolia Host details, port number, and basic authentication credentials.
2. Connect your preferred AI client (Claude, Cursor, etc.) to the Vinkius catalog using the provided connection string.
3. Start by asking your agent a question like, 'List all active JCR workspaces' or 'Show me the schema for this template,' and execute commands naturally.

## Frequently Asked Questions

**How do I check all my Magnolia workspaces using the Magnolia (Enterprise Headless CMS) MCP?**
Use `mg.list_jcr_workspaces`. This tool immediately lists every active JCR workspace, letting you know exactly where your website content, DAM assets, and system configurations are stored.

**Can I use the Magnolia (Enterprise Headless CMS) MCP to create new nodes?**
Yes. You can provision new, structured content using `mg.create_cms_node`. This allows you to write complex JSON payloads natively without needing a full API client setup.

**What is the best way to find out what fields a template needs?**
Run `mg.get_template_schema`. This tool enumerates all attached structured rules, giving you an explicit list of required fields and properties for any given component or page template.

**Does the Magnolia (Enterprise Headless CMS) MCP support content publishing?**
Yes. You can use `mg.execute_workspace_command` to trigger automated validation checks or initiate full publishing workflows, moving content through its lifecycle with a single command.

**How do I get the data for a specific page path?**
Use `mg.get_delivery_node`. You provide the endpoint and path, and the tool securely retrieves the pure JSON mapping from the JCR tree for that precise location.

**Can I navigate the JCR tree structure through my agent?**
Yes. Use the `mg.get_delivery_children` tool by providing an endpoint and parent path. Your agent will retrieve exclusively the hierarchical descendants, allowing you to understand the branch nesting and property distribution accurately.

**How do I audit the required fields for a specific Magnolia component?**
The `mg.get_template_schema` tool parses the YAML definitions of your components. Your agent will list exactly what fields and scalar parameters the template respects, making it easy to verify your content model without opening the code.

**Can my agent trigger a content publication command?**
Absolutely. Use the `mg.execute_workspace_command` tool and specify 'activate' or 'publish' as the command name. Your agent will dispatch the JSON payload to Magnolia's command system to transition your content across lifecycle states.