AI

Overview

Connect AI assistants directly to your Directus instance. Let Claude, ChatGPT, and other AI tools read and write your content without manual copy-pasting.

AI assistants can now directly access your Directus content using the Model Context Protocol (MCP). Instead of copying data back and forth, your AI tools connect directly to your Directus instance.

MCP is currently in Beta and requires Directus v11.12 +. For older versions, use the Local MCP alternative.

Is this for you?

  • Content editors: Migrate content from Google Docs, organize individual files, and manage content with AI assistance.
  • Developers: Rapidly prototype data models, create collections, and build automation workflows.
  • Teams: Dramatically speed up content operations while maintaining brand consistency.

Get started with the Directus MCP Server

Quick Setup

Enable MCP and connect your AI tools in under 5 minutes.

See What's Possible

Real examples of AI-powered content workflows that save hours of manual work.

Available Tools

Complete reference of MCP tools and their capabilities.

Custom Prompts

Create reusable prompt templates for consistent AI interactions.

Security Guide

Essential security practices for using MCP safely with your Directus data.

Troubleshooting

Common issues and solutions when setting up and using the Directus MCP server.

Local Alternative

Node.js-based MCP server for advanced setups and older Directus versions.


What you can do with the Directus MCP Server?

For Content Editors

Use LLMs and AI to create and manage content.

  • Import blog posts from Google Docs with proper field mapping
  • Build landing pages using page builder components and relationships
  • Add metadata to individual images (alt text, descriptions, tags)
  • Organize files into logical folder structures
  • Create content entries with proper relationships to authors, categories, etc.

For Developers

Rapidly prototype data models and build automation using natural language.

  • Create collections with proper field types and validation rules
  • Set up complex relationships (M2O, O2M, M2M, M2A) between collections
  • Generate automation flows triggered by database events
  • Build approval workflows with custom operations
  • Prototype entire data models through conversation

How it works

  1. Enable MCP in Directus Settings → AI
  2. Create access token for your MCP user (we recommend creating a dedicated user for MCP operations)
  3. Connect your AI tool to the Directus MCP server
  4. Use AI to create, edit, and manage your content

Your AI assistant operates through your existing Directus permissions - no middleware or data copying required.


Security built-in

  • Uses your existing Directus permissions
  • Complete audit trail of all changes
  • Global delete protection (disabled by default)
Security: For production deployments, review our comprehensive Security Guide covering threat mitigation, compliance requirements, and enterprise security controls.

Supported clients


Real-world examples

Content Creation

Can you convert this blog post over to Directus for me - with all the proper fields?
I'll help you convert this blog post to Directus! First, let me get the system prompt to understand the role better, then I'll examine the current schema to see what collections exist.
Called system-prompt
Called schema
Perfect! I can see you have a posts collection already. Let me examine its schema to understand the current structure:
Called schema
Great! Your posts collection has all the essential fields for blog content. Now I'll create this blog post in your Directus instance. The structure looks perfect for this content - I'll populate the title, slug, content, excerpt, and tags fields.
Called itemsCreated blog post
Perfect! I've successfully created your blog post in Directus with:
  • Title: "Why Content Workflows Suck (And What to Do About It)"
  • Status: Set to "draft" for review
  • Content: Full markdown content with proper formatting
  • Tags: Added relevant tags including "content management", "workflow", "CMS"
The post is now available in your Directus admin. Would you like me to set the status to "published" or make any other adjustments?

Asset Organization

I just uploaded a product photo but forgot to add alt text. Can you analyze this image and add proper metadata?
I'll analyze the image and add appropriate metadata. Let me retrieve the image first:
Called assetsRetrieved image data
I can see it's a photo of a red leather handbag with gold hardware on a white background. Let me update the file metadata:
Called filesUpdated file metadata
Done! I've updated your image with:
  • Title: "Red Leather Handbag with Gold Hardware"
  • Alt Text: "Red leather handbag with gold chain strap on white background"
  • Description: "Premium red leather handbag with gold-tone hardware for product catalog"
  • Tags: Added "handbag", "leather", "red", "gold-hardware"
The file metadata has been updated. Would you like me to organize it into a specific folder as well?

Data Modeling

Help me build a custom CRM inside my Directus instance. Organizations and contacts with many-to-many, deals with relations to both, activities for tracking emails/calls, deal stages collection.
I'll help you build a custom CRM! Let me start by understanding your current setup and then create the collections with proper relationships.
Called system-prompt
Called schema
Perfect! Clean instance. I'll create your CRM collections step by step:
Called collectionsCreated organizations collection
Called collectionsCreated contacts collection
Called collectionsCreated deal_stages collection
Collections created! Now creating deals with proper relationships:
Called collectionsCreated deals collection
Called collectionsCreated activities collection
Called collectionsCreated M2M junction table
CRM is ready! Your collections:
  • Organizations & Contacts (M2M via junction table)
  • Deals → Organizations, Contacts, Deal Stages, Users (owner)
  • Activities → Organizations, Contacts, Deals (emails, calls, tasks)
  • Deal Stages for pipeline management
All owners linked to directus_users. Ready to start managing your sales pipeline!

Get once-a-month release notes & real‑world code tips...no fluff. 🐰