The Directus MCP Server enables AI clients to interact with a Directus CMS through the Model Context Protocol (MCP), allowing for content management and administrative tasks.
Collections and Items: Retrieve, create, update, or delete items and collections; get schemas, fields, and relations
Files: Upload and retrieve files from Directus
Users and Permissions: Manage users, roles, and permissions; login to obtain access tokens; get current user information
System: Access health information, activity logs, and configuration details
Enables interaction with Directus CMS API, providing tools for managing collections and items, handling files, user authentication, permissions management, and accessing system information through the Directus platform.
Directus MCP Server
A Node.js server implementing Model Context Protocol (MCP) for Directus CMS. Enable AI Clients to interact with the Directus API through the Model Context Protocol (MCP).
ℹ Prerequisites
▶️ Quick start
Get your Directus API credentials
Go to your Directus instance
Create a static access token or get your email and password
Keep these credentials secure
Add to your AI editor
{ "mcpServers": { "directus": { "command": "npx", "args": ["-y", "@pixelsock/directus-mcp@latest"], "env": { "DIRECTUS_URL": "https://your-directus-instance.com", "DIRECTUS_ACCESS_TOKEN": "YOUR_ACCESS_TOKEN" } } } }Alternatively, you can use email/password authentication:
{ "mcpServers": { "directus": { "command": "npx", "args": ["-y", "@pixelsock/directus-mcp@latest"], "env": { "DIRECTUS_URL": "https://your-directus-instance.com", "DIRECTUS_EMAIL": "your-email@example.com", "DIRECTUS_PASSWORD": "your-password" } } } }For Cursor:
Go to Settings → Cursor Settings → MCP
Click
+ Add New Global MCP Server
Paste configuration
Replace placeholder values with your Directus credentials
Save and restart Cursor
For Claude Desktop:
Open Settings → Developer
Click
Edit Config
Open
claude_desktop_config.json
in a code editor and paste configurationReplace placeholder values with your Directus credentials
Save and restart Claude
❓ Troubleshooting
If you are having issues starting the server in your MCP client e.g. Cursor or Claude Desktop, please try the following.
Ensure you have valid Directus credentials
Verify that your Directus URL is correct and accessible
Check that your access token or email/password credentials are valid
Replace the credentials in your MCP client configuration
Save and restart your MCP client
Ensure you have Node and NPM installed
Run the following commands to confirm you have Node and NPM installed:
Clear your NPM cache
Sometimes clearing your NPM cache can resolve issues with npx
.
🛠️ Available tools
Collections and Items
Files
Users and Permissions
System
🚧 Development mode
If you want to run the server in development mode:
Clone and install:
git clone https://github.com/pixelsock/directus-mcp.git cd directus-mcp npm installAdd your credentials to
.env
:# .env DIRECTUS_URL=https://your-directus-instance.com DIRECTUS_ACCESS_TOKEN=your_token_here # Or use email/password DIRECTUS_EMAIL=your-email@example.com DIRECTUS_PASSWORD=your-passwordStart development server:
npm run dev
📄 Directus Developer resources
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Tools
A Node.js server that enables AI Clients to interact with the Directus CMS API through the Model Context Protocol, allowing for management of collections, items, files, users, and system information.
Related MCP Servers
- AsecurityAlicenseAqualityA comprehensive Model Context Protocol server that provides advanced Node.js development tooling for automating project creation, component generation, package management, and documentation with AI-powered assistance.Last updated -75MIT License
- AsecurityAlicenseAqualityA Model Context Protocol server that enables AI models to interact with both MySQL and MongoDB databases through a standardized interface, supporting comprehensive database operations including queries, schema management, and CRUD operations.Last updated -146MIT License
- -securityFlicense-qualityA comprehensive Model Context Protocol server implementation that enables AI assistants to interact with file systems, databases, GitHub repositories, web resources, and system tools while maintaining security and control.Last updated -331
- -securityFlicense-qualityA Model Context Protocol server that extends AI capabilities by providing file system access and management functionalities to Claude or other AI assistants.Last updated -2096