# Directus MCP for AI Agents AI Agent Connect

> Directus MCP lets you manage your headless CMS data using your AI agent. Instead of clicking through a dashboard, you can create content, check schemas, and manage users just by asking your agent to do it. It connects directly to your Directus instance to handle SQL-backed content models with REST and GraphQL. This means you can move from manual data entry to conversational content management in seconds, allowing you to handle bulk updates and schema inspections without leaving your chat interface.

## Overview
- **Category:** loved-by-devs
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_GfUHShsR6dDBscbzwfGCgCgJZgBT5MsQqEXOFrFu/ai-agent-connect
- **Tags:** sql-database, graphql, rest-api, content-management, data-modeling, backend-as-a-service

## Description

Managing content in a headless CMS usually means jumping between tabs, filtering through rows, and manually checking field types. If you're trying to push out a batch of articles or verify a complex data model, that friction adds up. This Connector changes that by giving your AI agent a direct line to your Directus instance. You can talk to your data like a person. Want to see every field in your products collection? Just ask. Need to create twenty new entries from a JSON block? Done. It handles the heavy lifting of CRUD operations, file metadata, and user permissions so you don't have to. Because Vinkius makes it easy to connect these types of tools, you can move from manual data entry to conversational content management in minutes. It's about getting your content live without the overhead of the admin UI.

## Tools

### check_directus_status
Verifies your connection to the Directus instance is active. Use this to troubleshoot your setup quickly.

### create_item
Adds a new record to any collection using a JSON payload. It's the fastest way to bulk-create content.

### delete_item
Removes a specific item from a collection. Use this to clean up old or incorrect data entries.

### get_file
Retrieves specific metadata for an uploaded file. This helps your agent understand what assets are available.

### get_item
Fetches the full details of a single record. Use it to see the current state of a specific piece of content.

### get_me
Retrieves the profile of the currently authenticated user. This is helpful for checking your own permissions.

### list_activity
Shows a log of recent operations performed on the database. It's great for tracking what happened recently.

### list_collections
Lists all the data collections in your instance. Use this to get a bird's-eye view of your content models.

### list_fields
Shows all fields and data types for a specific collection. It helps you understand the schema without leaving your chat.

### list_files
Lists all files currently stored in your Directus instance. Use this to browse your media library.

### list_items
Retrieves a list of records from a chosen collection. This is your primary way to browse content.

### list_roles
Shows all configured roles in your system. Use this to see who has what level of access.

### list_users
Lists every user account and their current status. This helps you manage your team's access levels.

### search_items
Finds specific records based on keywords you provide. It's the easiest way to locate content in large sets.

### update_item
Modifies an existing record's data. Use this to change status, titles, or body text quickly.

### get_collection
Provides specific details about a collection's configuration. Use this to see how a model is set up.

## Prompt Examples

**Prompt:** 
```
Show me the fields for the 'products' collection.
```

**Response:** 
```
Here are the fields for your **products** collection:

| Field Name | Data Type | Description |
| :--- | :--- | :---|
| **id** | UUID | Unique identifier |
| **name** | String | Product title |
| **price** | Decimal | Unit price |
| **stock_count** | Integer | Current inventory |
| **description** | Text | Full product details |
| **category** | Many-to-One | Linked to categories collection |
| **is_active** | Boolean | Visibility toggle |
```

**Prompt:** 
```
Create a new blog post titled 'Summer Sale' with a draft status.
```

**Response:** 
```
Done! I've created that for you.

**New Entry Details:**
- **Title:** Summer Sale
- **Status:** draft
- **ID:** `post_88219`
- **Slug:** `summer-sale`

Would you like me to add a body description or assign it to an author?
```

**Prompt:** 
```
Who was the last person to update the 'settings' collection?
```

**Response:** 
```
Checking the activity logs for the **settings** collection...

**Latest Activity:**
- **User:** `admin_user_01`
- **Action:** Updated `site_maintenance_mode`
- **Timestamp:** 2025-07-10 14:22:01
- **Change:** Set to `false`
```

## Capabilities

### Create and update content items
Add new records or modify existing ones in any collection using natural language.

### Search for specific records
Find content quickly by asking your agent to search for keywords across your data.

### Inspect database schemas
View all fields and data types for any collection to understand your data model instantly.

### Manage user roles
List users and manage permissions to keep your content secure.

### Browse and retrieve files
Access your uploaded assets and see their metadata without leaving your chat.

### View recent activity logs
See a history of recent database operations for debugging or compliance.

## Use Cases

### Bulk content creation
A content lead needs to create 20 new 'Draft' articles. They give the agent a list of titles, and it uses create_item to populate the CMS.

### Schema debugging
A developer is confused about a specific field type. They ask the agent to use list_fields on the orders collection to see the exact data types.

### Rapid audit check
An admin notices a data error and asks the agent to use list_activity to see which user made the last update and when.

### User permission verification
A manager needs to check if a new hire has the right access. They ask the agent to use list_users to verify the editor role status.

## Benefits

- Skip the dashboard: Use list_items and search_items to find exactly what you need without clicking through pages.
- Faster content updates: Use create_item and update_item to push data changes in seconds using natural language.
- Schema clarity: Use list_fields to instantly see data types and field names for any collection.
- Easy audit trails: Use list_activity to see who did what and when, making compliance much simpler.
- Simple user management: Use list_users and list_roles to handle permissions without hunting for settings.
- Media awareness: Use get_file and list_files to let your agent understand your uploaded assets.

## How It Works

The bottom line is you get a conversational interface for your entire Directus database.

1. Get your Static Token from your Directus Data Studio profile.
2. Add the Connector to your client and provide the token.
3. Ask your agent to perform tasks like listing items or creating new content.

## Frequently Asked Questions

**How does the Directus MCP help my content team?**
It lets your team manage content using natural language. Instead of clicking through a complex dashboard, they can ask your agent to create, update, or search for items, which speeds up your publishing workflow.

**Can I use Directus MCP to create new items?**
Yes, you can ask your agent to create new records in any collection. You can even provide a list of data, and the agent will handle the individual creation steps for you.

**Does Directus MCP support searching?**
Yes, your agent can search through your collections using keywords. This makes it much faster to find specific content without having to know the exact ID or filter settings.

**How do I connect Directus MCP to my agent?**
You just need your Directus Static Token from your user profile in the Data Studio. Once you provide that to the Connector, your agent can start interacting with your data.

**Can it manage my users?**
Yes, it can list all users and show their roles. This is great for quickly checking who has access to what without digging into the admin settings.

**Is it safe for my database?**
The Connector respects your existing Directus permissions. Your agent can only perform the actions that your specific Static Token is authorized to do.

**Can I create, update, and delete content items in any collection?**
Yes! Use `create_item` with a collection name and JSON payload to add new items. Use `update_item` with the collection, item ID, and updated fields to modify existing items. Use `delete_item` to remove items. All operations respect the permissions assigned to your Static Token's user role.

**How does Directus authentication work with a Static Token?**
Directus uses a non-expiring Static Token associated with a specific user account. Generate it from your **User Profile** in the Data Studio. The token is sent as a `Bearer` token in the Authorization header. Its permissions match the role assigned to that user — use an admin role for full access or a restricted role for read-only operations.

**Can I audit what changes have been made to my database?**
Yes. The `list_activity` tool retrieves the audit log of recent database operations, showing who made changes, which collections were affected, timestamps, and the type of operation (create, update, delete). Combine with `list_users` and `list_roles` for full accountability tracking.