Directus MCP Server
An MCP server to simplify Directus collection management
Overview
Directus MCP Server is a Model Context Protocol (MCP) server implementation for Directus CMS, enabling AI assistants to interact directly with your Directus content management system.
To use the Directus MCP Server, clone the repository, install dependencies, configure your environment variables, build the project, and start the server. You can then connect AI clients to interact with your Directus instance.
- Retrieve, create, update, and delete content from Directus collections. - Upload files and manage collections and fields. - Validate collection types and structures. - Expose Directus functionality as callable tools for AI models.
- Automating content management tasks through AI assistants.
- Integrating AI capabilities into Directus for enhanced user interactions.
- Simplifying the management of collections and fields in Directus.
Add to your AI client
Use these steps to connect Directus MCP Server in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.
Cursor
Add this to your .cursor/mcp.json file in your project root, then restart Cursor.
.cursor/mcp.json
{
"mcpServers": {
"mcp-directus-learnwithcc": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-directus-learnwithcc"
]
}
}
}Claude Desktop
Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
{
"mcpServers": {
"mcp-directus-learnwithcc": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-directus-learnwithcc"
]
}
}
}Claude Code
Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"mcp-directus-learnwithcc": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-directus-learnwithcc"
]
}
}
}VS Code (Copilot)
Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.
.vscode/mcp.json
{
"servers": {
"mcp-directus-learnwithcc": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-directus-learnwithcc"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"mcp-directus-learnwithcc": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-directus-learnwithcc"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"mcp-directus-learnwithcc": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-directus-learnwithcc"
]
}
}
}FAQ
What are the prerequisites for using Directus MCP Server?
You need Node.js version 18 or higher and a running Directus instance with an admin token.
How do I connect AI clients to the MCP server?
You can configure AI clients like Claude or Cursor to connect to the MCP server using the provided URL and settings.
What tools are available in the MCP server?
The MCP server provides tools for item retrieval, creation, updating, deletion, file uploads, and collection management.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":2392,"uuid":"d93aeb4a-5500-4937-a462-0803556fc2b7","name":"mcp-directus","title":"Directus MCP Server","description":"An MCP server to simplify Directus collection management","avatar_url":"https://avatars.githubusercontent.com/u/4337668?v=4","created_at":"2025-03-13T07:09:47.376Z","updated_at":"2025-03-13T07:13:53.541Z","status":"created","author_name":"learnwithcc","author_avatar_url":"https://avatars.githubusercontent.com/u/4337668?v=4","tags":"[]","category":"developer-tools","is_featured":false,"sort":1,"url":"https://github.com/learnwithcc/mcp-directus","target":"_self","content":"$29","summary":"$2a","img_url":null,"type":null,"metadata":"{\"star\":\"2\",\"license\":\"\",\"language\":\"TypeScript\",\"is_official\":false,\"latest_commit_time\":\"2025-03-14 23:22:24\"}","user_uuid":null,"tools":null,"sse_url":null,"sse_provider":null,"sse_params":null,"is_official":false,"server_command":null,"server_params":null,"server_config":null,"allow_call":false,"is_innovation":false,"is_dxt":false,"dxt_manifest":null,"dxt_file_url":null,"is_audit":false},"randomProjects":[],"currentServerKey":"$undefined"}]]}]