# Hygraph MCP for AI Agents AI Agent Connect

> Hygraph MCP lets you manage your headless CMS content and schema directly through your AI client. Instead of jumping back and forth between the Hygraph dashboard and your code, you can use natural language to query data, update draft content, inspect content models, and manage media assets. It turns your AI into a content operator.

## Overview
- **Category:** developer-tools
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_E2kDf3rmUJJgcNZKXaOKQyqaD4p2MZcV1xyGfKJa/ai-agent-connect
- **Tags:** graphql, content-modeling, api-first, schema-management, structured-content, federated-content

## Description

Hygraph MCP lets you manage your headless CMS content and schema directly through your AI client. Managing a headless CMS usually involves a lot of context switching. You're often stuck in a dashboard trying to find the right content ID or wrestling with complex GraphQL queries in your IDE to see what's actually available. This Connector changes that by letting your AI agent do the heavy lifting for you. You can ask your agent to pull specific content for a page, update a draft's status, or even audit your entire schema to see how different models relate. It's like having a content architect who knows your data structure inside out, ready to make changes on command. Whether you're a developer trying to verify fields or an editor pushing content live, this connection makes the process feel like a conversation rather than a series of manual clicks. You'll find it's one of the most effective ways to keep your content workflow moving without the friction of traditional CMS management. By hosting this through Vinkius, you get a reliable bridge that lets your agent handle the nitty-gritty details of your Hygraph project while you focus on building the actual experience.

## Tools

### create_cms_document
Create a new content entry in your project. It handles the validation logic for your Dynamic Models automatically.

### wipe_cms_document
Permanently delete specific content arrays. Use this to clear out data and reset states quickly.

### list_project_locales
See all active translation spaces. It helps you identify which content stages are mapped to specific languages.

### list_media_assets
List all attached media assets and their rules. Use this to get cloud URLs and handles for your frontend.

### publish_cms_document
Move content from a draft stage to a live state. It handles the structural extraction needed for a live shift.

### execute_graphql_mutation
Run a mutation to update or write data to your schema. It provisions the JSON payload needed for direct writes.

### execute_graphql_query
Fetch data from your Hygraph project using pure GraphQL. It identifies the bounded routing spaces for your content.

### update_cms_document
Change existing values in your content records. It safely substitutes draft values within your global boundaries.

### get_model_fields
Inspect the internal configuration of a specific content model. It's great for seeing exactly how fields are mapped.

### list_schema_introspection
Discover all models hosted in your project. It retrieves the full schema structure so your agent knows what's available.

## Prompt Examples

**Prompt:** 
```
What content models do I have in my project?
```

**Response:** 
```
I've performed a schema introspection for your Hygraph project. Here are the models I found:

| Model Name | Description |
| :--- | :--- |
| **BlogPost** | Main content for articles |
| **Author** | Profiles for content creators |
| **Product** | E-commerce items |
| **Review** | Customer feedback entries |

Which one would you like to inspect further?
```

**Prompt:** 
```
Show me the fields for the 'Product' model.
```

**Response:** 
```
The **Product** model includes the following fields:

*   **title** (String)
*   **price** (Float)
*   **description** (RichText)
*   **stock_count** (Integer)
*   **image** (Asset)
*   **category** (Relation to Category)

Would you like me to create a new product draft for you?
```

**Prompt:** 
```
Update the status of the 'Summer Sale' post to published.
```

**Response:** 
```
I've updated the status for the **Summer Sale** content entry. It has been successfully moved from the **Draft** stage to **Published**. You should see it live on the site shortly.
```

## Capabilities

### Query any content
Fetch specific data from your CMS using natural language instead of writing manual GraphQL queries.

### Inspect content models
See all your content models and their fields to understand your data structure instantly.

### Create and update documents
Add new content entries or modify existing draft values through your AI client.

### Publish content live
Move content from draft to published status with a simple command.

### Manage media assets
List your media library and grab cloud URLs for your frontend components.

### Check translation spaces
Identify which content stages are mapped to your different internationalization rules.

### Delete old content
Remove specific content nodes to keep your repository clean and optimized.

## Use Cases

### Schema Auditing
A content architect needs to know if the 'Product' model has a 'Discount' field. They ask the agent to inspect the model fields.

### Bulk Content Updates
An editor wants to update the status of 10 draft posts. They tell the agent to update the documents to 'Published'.

### Frontend Data Fetching
A developer needs to see the structure of the last 5 blog posts. They ask the agent to run a GraphQL query.

### Media Management
A designer needs the URL for a specific hero image. They ask the agent to list the media assets and find the link.

## Benefits

- Stop copy-pasting IDs by using `list_schema_introspection` to let your agent understand your content models instantly.
- Speed up content publishing by using `publish_cms_document` to move drafts to live status without manual dashboard clicks.
- Simplify data fetching by using `execute_graphql_query` to get exactly what you need without writing complex queries from scratch.
- Audit your content structure across multiple languages using `list_project_locales` to ensure localization consistency.
- Manage your media library efficiently with `list_media_assets` to grab cloud URLs and handles for your frontend components.
- Keep your content repository clean by using `wipe_cms_document` to remove old nodes and keep your project optimized.

## How It Works

The bottom line is you get a conversational interface for your entire Hygraph content lifecycle.

1. Subscribe to the Hygraph MCP in Vinkius.
2. Provide your Hygraph API Endpoint and Auth Token.
3. Command your agent to fetch, update, or audit your content.

## Frequently Asked Questions

**Can I use the Hygraph MCP to update my website content?**
Yes, you can use it to update drafts and push them live. The AI agent can modify specific document fields for you without you needing to log into the dashboard.

**Does the Hygraph MCP support multiple languages?**
Yes, it can list your translation spaces and locales. This helps you verify which content stages are mapped to specific internationalization rules.

**Can my AI agent find media URLs using the Hygraph MCP?**
Yes, it can enumerate your media assets and provide the cloud URLs. This makes it easy to get the correct links for your frontend components.

**How does the Hygraph MCP help with schema management?**
It lets your agent inspect your models and fields automatically. You can ask questions about your data structure to get instant answers about how your content is organized.

**Can I delete old content with the Hygraph MCP?**
Yes, you can use it to irreversibly remove specific content nodes. This is a great way to keep your content repository clean and optimized.

**Is the Hygraph MCP good for frontend developers?**
It's great for checking content models and GraphQL structures without leaving your IDE. It saves you from having to keep the Hygraph Playground open in a separate tab.

**Can I test complex GraphQL queries through my agent?**
Yes. Use the `execute_graphql_query` tool to run any valid GraphQL query block. Your agent will return the nested document results, making it an ideal way to verify content fetching without using the Hygraph Playground.

**How do I publish a draft document using my agent?**
The `publish_cms_document` tool allows your agent to shift a document's stage from DRAFT to PUBLISHED. You just need to provide the Model Name and the Target UUID to make the content live on your frontend.

**Can I see all available fields for a specific content model?**
Absolutely. Use the `get_model_fields` tool with the name of your Model (e.g., 'Post' or 'Product'). Your agent will perform a schema introspection and list all fields, types, and scalar parameters defined in that model.