# Crafter CMS MCP MCP

> Crafter CMS manages your headless content pipeline directly from an agent. You can run raw GraphQL queries against your delivery schema, create new XML-based pages in the Git repository, inspect existing site structures, or trigger live deployments to the final content engine.

## Overview
- **Category:** developer-tools
- **Price:** Free
- **Tags:** graphql, git-based, content-delivery, enterprise-cms, web-development

## Description

You connect this MCP to take control of complex enterprise content workflows without opening the Studio UI. It lets you treat your entire headless CMS setup like a database and a file system simultaneously. Need to verify which sites are active across different domains? Or maybe you just need to find all articles mentioning 'Q1 report' in deep internal arrays? You can run full-text searches across all content nodes, or execute precise GraphQL queries against the delivery schema using raw payloads. If you write new component files, this MCP provisions high-availability XML payloads directly into your Git boundary and even pushes those changes live to the Delivery Engine with a single command. With Vinkius hosting this connector, you get one place from which any AI agent can manage structure, content generation, and publishing across your whole platform.

## Tools

### wipe_studio_xml
Permanently deletes specified content nodes and data records within the CMS repository.

### execute_graphql_payload
Runs complex GraphQL queries against the CMS engine's data schema.

### get_site_config
Retrieves explicit site configuration details and logging payloads.

### get_site_globals
Enumerates structured rules defining active global settings for the CMS.

### list_platform_sites
Identifies all active sites connected across different domain contexts.

### list_studio_users
Retrieves a list of users and their associated structural permissions within the Studio.

### get_studio_tree
Maps out the full content structure, identifying nested XML folders and properties.

### publish_crafter_content
Triggers an automated deployment process, moving content changes from the CMS studio to the live delivery website.

### search_crafter_delivery
Performs a deep search across all delivered content nodes for specific keywords or phrases.

### write_studio_xml
Generates new XML payloads to create structured pages or components in the CMS repository.

## Prompt Examples

**Prompt:** 
```
List all sites in my Crafter CMS deployment
```

**Response:** 
```
I found 3 sites: 'Corporate-Website' (ID: corporate), 'Developer-Portal' (ID: docs), and 'Marketing-Landing-Pages' (ID: marketing). Which one would you like to explore?
```

**Prompt:** 
```
Execute GraphQL query on site 'corporate': '{ articles { items { title_s } } }'
```

**Response:** 
```
Query executed! I've retrieved the titles for all articles in the 'corporate' site. Results include 'Q1 Financial Report', 'New CEO Announcement', and 'Sustainability Roadmap'.
```

**Prompt:** 
```
Show me the Git tree for site 'marketing' at path '/site/website/landing-pages'
```

**Response:** 
```
Retrieving Studio tree... I found 5 files in '/site/website/landing-pages' including 'summer-sale.xml', 'winter-promo.xml', and 'black-friday.xml'. Each represents a managed XML content node.
```

## Capabilities

### Run data queries
Execute raw GraphQL payloads to pull specific data points out of the delivery schema.

### Map site structure
Inspect the entire Git hierarchy, tracing nested XML structures and identifying active content folders.

### Write new pages
Generate new XML payloads to create physical content nodes that fit into your repository's version control system.

### Publish changes
Trigger the automated workflow required to move and validate content changes from the Studio environment to the live delivery endpoint.

### Search all content
Perform deep, full-text searches across all content nodes using integrated Elasticsearch data.

## Use Cases

### The Site Audit
A DevOps engineer needs to verify if all 14 regional landing pages are configured correctly. Instead of logging into 14 different sites, they ask their agent to run `list_platform_sites` first, then use `get_site_globals` on each site ID to check for missing required variables.

### The Content Update
A technical marketer needs to add a new 'Sustainability' section. They don't want to mess with the Studio UI, so they ask their agent to use `write_studio_xml` to provision the XML payload and then immediately call `publish_crafter_content` to deploy it live.

### The Data Pull
A content developer needs a list of all article titles related to 'Q1 financial report' across three specific sites. They use their agent to execute a targeted GraphQL payload, retrieving only the needed title fields and nothing else.

### The Cleanup
An architect finds several outdated draft components in the CMS that must be removed before deployment. The agent uses `get_studio_tree` to map the location, and then executes `wipe_studio_xml` to safely delete the identified nodes.

## Benefits

- Stop relying on manual UI navigation. You can now use `get_studio_tree` to inspect the full Git hierarchy of a site without opening any web dashboard.
- Cut down deployment time by using `publish_crafter_content`. This tool automatically runs validation checks and pushes content changes live, bypassing manual workflow triggers.
- Need to know what data is available? Use `execute_graphql_payload` to run raw queries against the delivery schema. You get precise results without needing a developer console.
- Quickly audit your setup by using `list_platform_sites` or `get_site_globals`. These tools let you see which sites are connected and what global rules they use, all from chat.
- Searching for old content is easy. `search_crafter_delivery` performs deep internal array searches that go far beyond standard CMS search boxes.

## How It Works

The bottom line is you manage complex CMS tasks and deployments using conversation, not through clicking menus in a web interface.

1. Subscribe to this MCP and provide your Crafter CMS Base URL and Access Token from the Studio.
2. Your agent uses natural language instructions, like 'List all sites' or 'Execute query for articles in site X,' to call specific tools on this connector.
3. The MCP runs the required operation—whether that’s fetching a list of users, running GraphQL, or publishing content—and returns structured data directly to your AI client.

## Frequently Asked Questions

**How do I list all my active sites using list_platform_sites?**
You ask your agent to run `list_platform_sites`. It returns a precise array of every site connected across the CMS, giving you their unique IDs and context domains.

**Can I create new content pages with write_studio_xml?**
Yes. Running `write_studio_xml` generates brand new XML payloads that fit into your Git boundary. This is how you provision a page or component without opening the Studio.

**What's the difference between GraphQL and searching for content?**
Use `execute_graphql_payload` when you need very specific, structured data (like only titles and dates). Use `search_crafter_delivery` when you just want to find articles containing a keyword across all content nodes.

**Do I have to manually push changes after using get_site_config?**
No. If your goal is deployment, always follow up configuration reads with `publish_crafter_content`. This ensures the system validates and pushes those settings live.

**What does `list_studio_users` show me regarding content access and permissions?**
It retrieves the exact structural details for all studio users. You see which Blueprint constraints are applied, helping you audit who can access specific content nodes.

**When I use `get_studio_tree`, what data structure am I actually extracting?**
You get a safe structural extraction of properties that drive active Git hierarchies. This allows you to trace and visualize nested XML structures within your content repository.

**If I run `wipe_studio_xml`, what is the scope of data removal, and is it recoverable?**
No, this action irreversibly vaporizes explicit App nodes. It drops live database bytes from the CMS; use it only when you are sure content must be completely purged.

**What kind of variables can I retrieve using `get_site_globals`?**
It enumerates all structured rules that export active configuration data. You get access to environment variables tied directly to your frontend SDKs, useful for site auditing.

**Can my agent write new content files to Crafter Studio via Git?**
Yes. Use the 'write_studio_xml' tool. Provide the site name, file path, and raw XML content. The agent will command the backend to write the physical Git boundaries, generating new content nodes or pages directly in your Studio environment.

**How do I publish changes from Studio to the live Delivery Engine?**
Use the 'publish_crafter_content' tool. Provide the site name and the specific object path. Your agent will trigger the automated publication workflow, migrating the changes from your Git-based Studio repo to the live high-performance delivery endpoint.

**Can I perform full-text searches across all site content?**
Absolutely. The 'search_crafter_delivery' tool leverages Crafter's Elasticsearch integration. Your agent can pull explicitly queried words spanning all nodes, returning matches based on the query logic defined in your search engine.