Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT and other tools is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AI Fire in da houseCheck it out free

directus-mcp-server

MCP.Pizza Chef: rijkvanzanten

The directus-mcp-server is a Model Context Protocol server that connects AI tools to your Directus API, enabling secure and seamless interaction with your Directus instance. Built for NodeJS v22.12+, it allows AI models to query and manipulate Directus data on your behalf, facilitating AI-enhanced workflows with your data management system.

Use This MCP server To

Enable AI tools to query Directus data via API Allow AI to update or manage Directus content programmatically Integrate Directus data into AI-driven workflows Securely expose Directus API to LLMs for real-time data access Automate content retrieval and updates in Directus using AI Facilitate AI-powered data exploration within Directus

README

Warning

This was an experimental MCP server to test the waters and see what it would allow us to do. We've since released an official Directus MCP server over on https://github.com/directus/mcp šŸ™‚


Directus Model Context Protocol (MCP) Server

MCP server for use with Directus. Allows your AI tools to connect to and use your Directus API on your behalf.

This is an experiment by yours truly (@rijkvanzanten). Any and all PRs are more than welcome :)

Installation

This MCP server is built to work with NodeJS v22.12 or newer.

Global Installation (Recommended)

npm install -g @rijk/directus-mcp-server

Then configure Claude AI to use the npm package as remote server:

{
	"mcpServers": {
		"directus": {
			"command": "directus-mcp-server",
			"env": {
				"DIRECTUS_URL": "<your Directus instance URL>",
				"DIRECTUS_TOKEN": "<your Directus user token>"
			}
		}
	}
}

Local / Dev Installation

  1. Clone the repo
  2. pnpm install && pnpm build to build the server
  3. Configure Claude AI like above, but pointing it to the dist file instead:
{
	"mcpServers": {
		"directus": {
			"command": "node",
			"args": ["/path/to/directus-mcp-server/dist/index.js"]
		}
	}
}

Tools

Read Items

The read-items tool allows you to read items from any Directus collection by providing the collection name as a parameter.

Parameters:

  • collection: (required) The name of the collection to read from
  • fields: (optional) Array of field names to return
  • sort: (optional) Field to sort by (prefix with - for descending order)
  • limit: (optional) Maximum number of items to return

Example:

{
  "collection": "articles",
  "fields": ["id", "title", "date_published"],
  "sort": "-date_published",
  "limit": 10
}

Read Current User

Get information about the current user. Effectively the /users/me endpoint.

Read Collections

Return what collections/fields are available in the system. Use this tool first to discover available collections before using the read-items tool.

License

MIT

directus-mcp-server FAQ

How do I install the directus-mcp-server?
Install globally via npm with 'npm install -g @rijk/directus-mcp-server' or clone and build locally using pnpm.
What Node.js version is required?
Node.js version 22.12 or newer is required to run the directus-mcp-server.
How do I configure the server to connect to my Directus instance?
Set environment variables DIRECTUS_URL and DIRECTUS_TOKEN with your Directus instance URL and user token respectively.
Can this server be used with multiple AI providers?
Yes, it is compatible with any MCP client including Claude AI, OpenAI, and Gemini by configuring the MCP server accordingly.
Is the directus-mcp-server secure?
Security depends on your Directus token permissions and environment setup; the server acts as a secure bridge for AI to access your Directus API.
Can I contribute to the directus-mcp-server project?
Yes, contributions and pull requests are welcome on the GitHub repository.
Does the server support real-time updates from Directus?
The server facilitates API access but real-time push updates depend on Directus API capabilities and client implementation.
How do I run the server in development mode?
Clone the repo, run 'pnpm install && pnpm build', then start the server pointing to the built dist file.