directus.com
directus.com logo

Directus

Bridges AI tools with Directus headless CMS, enabling content operations through automatically generated tools based on...

Created byApr 22, 2025

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:

Local / Dev Installation

  1. Clone the repo
  1. pnpm install && pnpm build to build the server
  1. Configure Claude AI like above, but pointing it to the dist file instead:

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:

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 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:

Local / Dev Installation

  1. Clone the repo
  1. pnpm install && pnpm build to build the server
  1. Configure Claude AI like above, but pointing it to the dist file instead:

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:

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