getItemsLABSCO SUMMARY
Schema tools are what make the content tools usable.
Anything can call createItem. Knowing which fields exist, which are required, and what a relation points at is the part that decides whether the call succeeds — and getCollections, getFields and getRelations are here for exactly that. Two auth paths is a genuine convenience: a static token for an unattended setup, email and password when you want the session to carry your own permissions.
What it is
A server over the Directus REST API. It covers the content operations plus enough of the schema and access surfaces that an assistant can understand a collection before editing anything in it.
What you get
- getItems, getItem, createItem, updateItem and deleteItem cover content in any collection
- getCollections returns all collection schemas; getFields and getRelations explain a collection's shape and how it links to others
- getFiles and uploadFile handle the file library
- login, getUsers, getCurrentUser, getRoles and getPermissions cover identity and access
- getSystemInfo, getActivity and getConfig answer questions about the instance itself and what has been happening in it
- Switching MCP_TRANSPORT to http serves Streamable HTTP at /mcp for multi-user or remote setups, with MCP_PORT and MCP_HOST controlling the binding
Requirements
Node.js and npm, plus a Directus instance. Authenticate either with DIRECTUS_URL and DIRECTUS_ACCESS_TOKEN — a static token created in Directus — or with DIRECTUS_URL, DIRECTUS_EMAIL and DIRECTUS_PASSWORD. Runs over npx for stdio; a container image at ghcr.io/pixelsock/directus-mcp covers the HTTP path.
Setup effort
Build from source — git clone https://github.com/pixelsock/directus-mcp.git
USE CASES
Getting content out of Directus
Query a collection and read one item without opening the admin app.
Writing content an assistant drafted
Create or update the item directly, once the schema tools have confirmed the field names.
Understanding an instance you inherited
Collection schemas and relations describe the data model in one pass.
Checking who can do what
Users, roles and permissions read back together.
Serving several people from one instance
The HTTP transport binds a port and serves /mcp instead of one process per client.
18 tools
Listed in project docs. Your client may show a different list.
getItemcreateItemupdateItemdeleteItemgetCollectionsgetFieldsgetRelationsgetFilesuploadFilelogingetUsersgetCurrentUsergetRolesgetPermissionsgetSystemInfogetActivitygetConfigBEFORE YOU INSTALL
What to know first
Tools you get
18 tools named in the project's documentation.
Requires
- Node.js and npm
- A Directus instance (DIRECTUS_URL)
- Either DIRECTUS_ACCESS_TOKEN (a static access token), or DIRECTUS_EMAIL and DIRECTUS_PASSWORD
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
Server setup
git clone https://github.com/pixelsock/directus-mcp.git
cd directus-mcp
npm install
npm run build
DIRECTUS_URL=<YOUR_DIRECTUS_URL> DIRECTUS_ACCESS_TOKEN=<YOUR_DIRECTUS_ACCESS_TOKEN> MCP_TRANSPORT=http MCP_PORT=3000 node dist/index.jsMCP Clients
Any MCP client — HTTP
{
"mcpServers": {
"directus": {
"url": "http://localhost:3000/mcp"
}
}
}Start the server first with the last step above. You can use DIRECTUS_EMAIL and DIRECTUS_PASSWORD instead of DIRECTUS_ACCESS_TOKEN.
Authenticate with DIRECTUS_ACCESS_TOKEN, or with DIRECTUS_EMAIL and DIRECTUS_PASSWORD instead — you need one or the other, not both.