# Drupal MCP for AI Agents MCP

> Drupal MCP gives your AI clients full control over headless content management, letting you interact with complex CMS structures and JSON:API endpoints naturally. List nodes, manage taxonomy, handle files, and audit users without touching the admin interface.

## Overview
- **Category:** ship-it
- **Price:** Free
- **Tags:** json-api, node-management, taxonomy, entity-framework, web-development, content-orchestration

## Description

This connection lets you treat your Drupal site like any other data source, managing all its structured content through simple conversation. You can provision new articles or update existing ones by simply telling your agent what needs changing, bypassing traditional forms entirely. Need to see which files are attached to a specific article? Just ask. The system maps out the entire internal structure—nodes, categories, and media assets—and makes it available instantly. Because Vinkius hosts this MCP within its catalog, you connect once from your preferred AI client and get immediate access to Drupal's full content lifecycle management tools.

It’s about getting hands-on control over the backend data layer so developers can test APIs or marketers can update categories without needing administrator credentials.

## Tools

### create_cms_node
Writes a new piece of structured content into the Drupal system.

### wipe_cms_node
Permanently deletes an existing content node, removing it from the live site data.

### get_file_metadata
Retrieves structural details about a specific file stored in Drupal's system.

### get_single_node
Pulls the full content and metadata for one particular article using its unique ID.

### get_taxonomy_term
Extracts all properties associated with a specific category or term mapping.

### list_managed_files
Inspects and lists all managed files available on the site, useful for checking media assets.

### list_content_nodes
Identifies and returns a list of all types of content nodes that exist in the Drupal model.

### list_term_vocabularies
Lists all available sets of structured rules used for categorizing content (taxonomies).

### list_drupal_users
Retrieves a list of every registered user account, along with their roles and access levels.

### patch_cms_node
Safely updates specific segments or values within an existing content node draft.

## Prompt Examples

**Prompt:** 
```
What are the most recent articles on 'Technology' that need an update?
```

**Response:** 
```
**Recent Content Nodes in 'Technology'**

| UUID | Title | Status | Last Modified |
| :--- | :--- | :--- | :--- |
| abc-123 | Drupal MCP Guide v2.0 | Published | 2 hours ago |
| xyz-456 | Next Gen Headless CMS Trends | Draft | Today, 9:15 AM |

*Do you want me to pull the full content for any of these?*
```

**Prompt:** 
```
I need to create a new article about best practices. Can you provision it?
```

**Response:** 
```
**Node Creation Request:**

*   **Title:** Best Practices for Headless Drupal
*   **Body:** [Draft text provided by user]
*   **Categories:** ['Best Practice', 'Developer']

✅ Success! The new node was created with UUID: `d3f-90b`. You can view it in your frontend now.
```

**Prompt:** 
```
List all the files attached to the 'API Basics' guide.
```

**Response:** 
```
**File Metadata for API Basics (UUID: 456)**

*   **Image Asset:** `api_diagram.png` (CDN URI: `/cdn/media/12345.png`) - *Status: Available*
*   **Logo:** `drupal_logo.svg` (CDN URI: `/cdn/media/67890.svg`) - *Status: Deprecated*

You have two assets attached. Which one do you want me to fetch the full dimensions for?
```

## Capabilities

### Provisioning Content Nodes
The agent writes new, structured content into Drupal entities using a JSON payload.

### Deleting Articles and Pages
You can irreversibly remove live content nodes directly from the system.

### Discovering File Assets
The MCP retrieves detailed information about managed files, including their location and metadata.

### Reading Specific Content Records
It fetches the complete details for any specific content node by its unique ID.

### Managing Categories and Terms
The agent extracts or lists structured categories (taxonomy) that define how your content is grouped.

### Listing All Content Structures
It identifies all available types of content nodes within the Drupal model.

### Auditing Site Users
You can retrieve a list of registered user accounts, showing roles and access levels.

## Use Cases

### Updating a product category across multiple articles
A marketer needs to change the primary taxonomy term for 20 old blog posts. Instead of manually opening each post and updating the tag, they ask their agent to update the category mapping across all relevant nodes using `get_taxonomy_term`.

### Debugging a broken content display endpoint
A developer finds an API endpoint failing. They use the MCP to pull a specific node's data (`get_single_node`) and cross-reference it with file metadata using `get_file_metadata` to pinpoint exactly which attachment is causing the failure.

### Generating initial draft content for launch
A team leader needs 10 new articles written quickly. They prompt their agent to create these drafts (`create_cms_node`) using a provided JSON payload, populating the required fields and nodes instantly.

### Reviewing who can edit content
An ops team member needs an immediate audit of site access. They ask the agent to list all users (`list_drupal_users`) so they can verify which accounts have editor rights before a major deployment.

## Benefits

- Update content structure without the admin UI. Use `create_cms_node` or `patch_cms_node` to write new articles or modify existing drafts directly via conversation.
- Audit site users instantly. The `list_drupal_users` tool provides a clean roster of all editors and admins, letting you manage who has access without manual database queries.
- Manage media assets easily. Instead of navigating file directories, use `get_file_metadata` or `list_managed_files` to pull raw CDN URIs for any attachment.
- Control content structure at scale. You can list all available content types using `list_content_nodes`, giving you a complete map of your site's data architecture.
- Maintain organizational integrity. The MCP lets you enumerate categories using `list_term_vocabularies` and pull details for specific terms with `get_taxonomy_term`.

## How It Works

The bottom line is that you interact with Drupal's complex backend data using natural language commands instead of filling out forms or writing boilerplate API calls.

1. Subscribe to this MCP and provide your Drupal Base URL along with the necessary authentication header. Make sure the JSON:API module is active on your site.
2. Connect your AI client (like Cursor or Claude) to Vinkius, giving it access to this content management tool.
3. Start by asking your agent to perform an action, like listing all available categories or creating a new article draft. The system handles the rest.

## Frequently Asked Questions

**How do I manage content nodes in Drupal using the Drupal MCP for AI Agents?**
You can treat content node management like a natural conversation. Instead of going through forms, you ask your agent to create drafts, update existing articles, or modify specific fields directly by referencing the data.

**Can I use Drupal MCP for AI Agents to audit all user accounts?**
Yes. You can request a complete list of registered users and their associated roles. This allows you to verify who has editor access across your entire site structure without accessing the admin panel.

**What if I want to delete an old article? Can Drupal MCP for AI Agents do that?**
The MCP can irreversibly remove content nodes. If you provide the correct unique ID, the agent will vaporize the node from your live site data.

**How does this help with media and file attachments in Drupal?**
You don't have to guess where files are located. The MCP lets you list all managed files and retrieve detailed metadata, giving you the exact CDN URIs for every image or asset.

**Does Drupal MCP for AI Agents handle content categorization?**
Absolutely. You can enumerate all available categories (taxonomies) and get specific details on how content is grouped using this connector, making content organization programmatic.