Directus Content MCP Server

Directus Content MCP Server

mcp-directus-2•bydirectus

An MCP server that lets LLMs interact with a Directus instance's content, data, files, fields, and automation flows.

License: MIT•Runtime: Awaiting documentation review•Category: databases storage

WHAT IT DOES

  • •Provides tools to read collections and items, create, update, and delete items in Directus collections.
  • •Offers file tools to read file metadata or raw content, import files from URLs, and update file metadata.
  • •Supports reading and modifying field definitions, and reading and triggering automation flows.
  • •Includes comment tools and a markdown tool for converting between markdown and HTML for WYSIWYG fields.

BEST FOR

  • •Content editors building custom pages, writing blog posts, updating content, and organizing assets inside a Directus project.
  • •Data analysts querying collections, generating reports, analyzing trends, and extracting insights from Directus data using natural language.

ABOUT MCP-DIRECTUS-2

Directus Content MCP Server is cataloged as an MCP server attributed to directus. An MCP server that lets LLMs interact with a Directus instance's content, data, files, fields, and automation flows. It is categorized under databases storage. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT. Check the source repository's current license and terms before using, modifying or distributing this software.

Capability inspector

Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.

Tools (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Resources (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Prompts (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for Directus Content MCP Server are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

Does the MCP server avoid destructive actions?

It intentionally limits destructive actions that would cause bad outcomes like data loss from deleting fields or collections.

Can the default system prompt be customized or disabled?

Yes, the default system prompt can be overwritten with the MCP_SYSTEM_PROMPT variable or disabled by setting MCP_SYSTEM_PROMPT_ENABLED to false.

Does the server support dynamic prompts stored in a Directus collection?

Yes, it supports dynamic prompts stored in a Directus collection, configurable through environment variables for the collection name and its fields.

Upstream README

View this exact version on GitHub

readme.md · 472ce5b8dd3d · Fetched 2026-11-13 09:08:17 UTC

Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.

Showing the last retrieved documentation snapshot; check the source for current changes.

Directus Content MCP Server

The Model Context Protocol (MCP) is a standard for helping AI tools and LLMs talk to applications and services like Directus.

The Directus Content MCP Server is an interface for Directus users to interact with their data in LLMs. Some good use cases are:

  • Content Editors: build custom pages, write blog posts, update content, organize assets and more inside your Directus project.
  • Data Analysts: query collections, generate reports, analyze trends, and extract insights from your Directus data using natural language.

It intentionally limits destructive actions that would result in really bad outcomes like data loss from deleting fields or deleting collections.

We plan to provide more tools for developers who are working with local / development Directus projects in future releases and potentially as a separate package to help further prevent data loss.

Installation

Prerequisites

  • An existing Directus project

If you don't have an existing Directus project, you can get started with a free trial on Directus Cloud at https://directus.cloud/register

OR

You can spin up a sample Directus instance locally with the following terminal command.

npx directus-template-cli@latest init

Step 1. Get Directus Credentials

You can use email and password or generate a static token to connect the MCP to your Directus instance.

To get a static access token:

  1. Login to your Directus instnace
  2. Go to the User Directory and choose your own user profile
  3. Scroll down to the Token field
  4. Generate token and copy it
  5. Save the user (do NOT forget to save because you’ll get an error that shows Invalid token!)

Step 2. Configure the MCP in your AI Tool

Claude Desktop

  1. Open Claude Desktop and navigate to Settings.

  2. Under the Developer tab, click Edit Config to open the configuration file.

  3. Add the following configuration:

    {
    	"mcpServers": {
    		"directus": {
    			"command": "npx",
    			"args": ["@directus/content-mcp@latest"],
    			"env": {
    				"DIRECTUS_URL": "https://your-directus-url.com",
    				"DIRECTUS_TOKEN": "your-directus-token>"
    			}
    		}
    	}
    }
    

    or if you're using email and password

    {
    	"mcpServers": {
    		"directus": {
    			"command": "npx",
    			"args": ["@directus/content-mcp@latest"],
    			"env": {
    				"DIRECTUS_URL": "https://your-directus-url.com",
    				"DIRECTUS_USER_EMAIL": "john@example.com",
    				"DIRECTUS_USER_PASSWORD": "your-password"
    			}
    		}
    	}
    }
    

    Make sure you replace the placeholder values with your URL and credentials.

  4. Save the configuration file and restart Claude desktop.

  5. From the new chat screen, you should see an icon appear with the Directus MCP server.

Cursor

  1. Open Cursor and create a .cursor directory in your project root if it doesn't exist.

  2. Create a .cursor/mcp.json file if it doesn't exist and open it.

  3. Add the following configuration:

    {
    	"mcpServers": {
    		"directus": {
    			"command": "npx",
    			"args": ["@directus/content-mcp@latest"],
    			"env": {
    				"DIRECTUS_URL": "https://your-directus-url.com",
    				"DIRECTUS_TOKEN": "your-directus-token>"
    			}
    		}
    	}
    }
    

    or if you're using email and password

    {
    	"mcpServers": {
    		"directus": {
    			"command": "npx",
    			"args": ["@directus/content-mcp@latest"],
    			"env": {
    				"DIRECTUS_URL": "https://your-directus-url.com",
    				"DIRECTUS_USER_EMAIL": "john@example.com",
    				"DIRECTUS_USER_PASSWORD": "your-password"
    			}
    		}
    	}
    }
    

    Make sure you replace the placeholder values with your URL and credentials.

  4. Save the configuration file.

  5. Open Cursor and navigate to Settings/MCP. You should see a green active status after the server is successfully connected.

Tools

The MCP Server provides the following tools to interact with your Directus instance:

ToolDescriptionUse Cases
system-promptProvides context to the LLM assistant about its roleStart of a session to understand the system context
users-meGet current user informationUnderstanding permissions, personalizing responses
read-collectionsRetrieve the schema of all collectionsExploring database structure, understanding relationships
read-itemsFetch items from any collectionRetrieving content, searching for data, displaying information
create-itemCreate new items in collectionsAdding new content, records, or entries
update-itemModify existing itemsEditing content, updating statuses, correcting information
delete-itemRemove items from collectionsCleaning up outdated content
read-filesAccess file metadata or raw contentFinding images, documents, or media assets
import-fileImport files from URLsAdding external media to your Directus instance
update-filesUpdate file metadataOrganizing media, adding descriptions, tagging
read-fieldsGet field definitions for collectionsUnderstanding data structure, field types and validation
read-fieldGet specific field informationDetailed field configuration
create-fieldAdd new fields to collectionsExtending data models
update-fieldModify existing fieldsChanging field configuration, interface options
read-flowsList available automation flowsFinding automation opportunities
trigger-flowExecute automation flowsBulk operations, publishing, status changes
read-commentsView comments on itemsRetrieving feedback, viewing discussion threads
upsert-commentAdd or update commentsProviding feedback, documenting decisions
markdown-toolConvert between markdown and HTMLContent formatting for WYSIWYG fields
get-promptsList available promptsDiscovering pre-configured prompt templates
get-promptExecute a stored promptUsing prompt templates for consistent AI interactions

System Prompt

The MCP server comes with a system prompt that helps encourage the right tool use and provides guiderails for the LLM. You can overwrite the default system prompt in your env configuration by setting the MCP_SYSTEM_PROMPT variable.

You can also disable the system prompt entirely if desired.

Just set MCP_SYSTEM_PROMPT_ENABLED to false

Prompt Configuration

The MCP server supports dynamic prompts stored in a Directus collection. Prompts are not widely supported across MCP Clients, but Claude Desktop does have support for them.

You can configure the following:

  • DIRECTUS_PROMPTS_COLLECTION_ENABLED: Set to "true" to enable prompt functionality
  • DIRECTUS_PROMPTS_COLLECTION: The name of the collection containing prompts
  • DIRECTUS_PROMPTS_NAME_FIELD: Field name for the prompt name (default: "name")
  • DIRECTUS_PROMPTS_DESCRIPTION_FIELD: Field name for the prompt description (default: "description")
  • DIRECTUS_PROMPTS_SYSTEM_PROMPT_FIELD: Field name for the system prompt text (default: "system_prompt")
  • DIRECTUS_PROMPTS_MESSAGES_FIELD: Field name for the messages array (default: "messages")

Mustache Templating

Both system prompts and message content support mustache templating using the {{ variable_name }} syntax:

  1. Define variables in your prompts using double curly braces: Hello, {{ name }}!
  2. When calling a prompt, provide values for the variables in the arguments parameter
  3. The MCP server will automatically replace all variables with their provided values

Local / Dev Installation

  1. Clone the repo
  2. pnpm install && pnpm build to build the server
  3. Configure Claude Desktop or Cursor like above, but pointing it to the dist file instead:
  4. Use pnpm dev to watch for changes and rebuild the server
{
	"mcpServers": {
		"directus": {
			"command": "node",
			"args": ["/path/to/directus-mcp-server/dist/index.js"]
		}
	}
}

Sample Claude Desktop Config for local dev with full settings

{
	"mcpServers": {
		"directus": {
			"command": "node",
			"args": [
				"/path/to/directus-mcp-server/dist/index.js"
			],
			"env": {
				"DIRECTUS_URL": "DIRECTUS_URL",
				"DIRECTUS_TOKEN": "DIRECTUS_TOKEN",
				"MCP_SYSTEM_PROMPT_ENABLED": "true",
				"MCP_SYSTEM_PROMPT": "You're a content editor working at Directus.\nYou're a master at copywriting and creating messaging that resonates with technical audiences.\nYou'll be given details about a Directus instance and the schema within it. You'll be asked to update content and other helpful tasks. **Rules** \n - If you're updating HTML / WYSWIG fields inside the CMS - DO NOT ADD extra styling, classes, or markup outside the standard HTML elements. If you're not 95% sure what values should go into a certain field, stop and ask the user. Before deleting anything, confirm with the user and prompt them for an explicit DELETE confirmation via text.",
				"DIRECTUS_PROMPTS_COLLECTION_ENABLED": "true",
				"DIRECTUS_PROMPTS_COLLECTION": "ai_prompts"
			}
		}
	}
}

Example Configurations

Basic Configuration with Token

{
	"mcpServers": {
		"directus": {
			"command": "npx",
			"args": ["@directus/content-mcp@latest"],
			"env": {
				"DIRECTUS_URL": "https://your-directus-instance.com",
				"DIRECTUS_TOKEN": "your_directus_token"
			}
		}
	}
}

Configuration with Email/Password Authentication

{
	"mcpServers": {
		"directus": {
			"command": "npx",
			"args": ["@directus/content-mcp@latest"],
			"env": {
				"DIRECTUS_URL": "https://your-directus-instance.com",
				"DIRECTUS_USER_EMAIL": "user@example.com",
				"DIRECTUS_USER_PASSWORD": "your_password"
			}
		}
	}
}

Advanced Configuration with Custom System Prompt and Tool Restrictions

{
	"mcpServers": {
		"directus": {
			"command": "npx",
			"args": ["@directus/content-mcp@latest"],
			"env": {
				"DIRECTUS_URL": "https://your-directus-instance.com",
				"DIRECTUS_TOKEN": "your_directus_token",
				"DISABLE_TOOLS": ["delete-item", "update-field"],
				"MCP_SYSTEM_PROMPT_ENABLED": "true",
				"MCP_SYSTEM_PROMPT": "You are an assistant specialized in managing content for our marketing website.",
				"DIRECTUS_PROMPTS_COLLECTION_ENABLED": "true",
				"DIRECTUS_PROMPTS_COLLECTION": "ai_prompts",
				"DIRECTUS_PROMPTS_NAME_FIELD": "name",
				"DIRECTUS_PROMPTS_DESCRIPTION_FIELD": "description",
				"DIRECTUS_PROMPTS_SYSTEM_PROMPT_FIELD": "system_prompt",
				"DIRECTUS_PROMPTS_MESSAGES_FIELD": "messages"
			}
		}
	}
}

❤️ Contributing

We love to see community contributions, but please open an issue first to discuss proposed changes before submitting any PRs.

🙏 Thanks To

This started as an experiment by the dude, the legend, the @rijkvanzanten 🙌

License

MIT

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for Directus Content MCP Server from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/mcp-directus-2)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

Downloads and pulls

Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.

No reviewed package or image identity; download statistics are not listed yet.

Related databases storage MCP Servers

Alternative and complementary servers in the same category

View all in databases storage →
AIStor MCP server
mcp-server-aistor•minio

This is a Model Context Protocol (MCP) server for interacting with AIStor object stores.

Repository stats unavailable
Databases & Storage
InfluxDB v2 MCP Server
influxdb-mcp-server•idoru

A Model Context Protocol (MCP) server that exposes access to an InfluxDB v2 instance using the InfluxDB OSS API v2.

Repository stats unavailable
Databases & Storage