list_collectionsLABSCO SUMMARY
Toolsets are how you make this safe.
This server can drop a collection and everything in it, so the useful discipline is to run more than one entry with different MCP_TOOLSETS — the README's own example registers a schema-only server and a content-only server side by side. Schema, flow and dashboard tools stay hidden unless you name them, which is a sensible default: an assistant working on content never sees the tools that can restructure the database.
What it is
An MCP server for Directus covering both halves of the product: schema management — collections, fields and relations — and content management with full CRUD and querying on items. It is built on the official @directus/sdk with Zod validation on the tool arguments.
What you get
- Collection management —
list_collections,get_collection,create_collection(which creates a real database table, not just a folder),update_collection,delete_collection - Field management with type, interface and schema options —
list_fields,create_field,update_field,delete_field - Relations between collections —
list_relations,create_relation,delete_relation - Item querying with the whole Directus query surface: fields, filter, search, sort, limit, offset, page, aggregate, groupBy and deep relational queries —
query_items,get_item - Item writes, single and bulk —
create_item,update_item,delete_item,bulk_create_items,bulk_update_items,bulk_delete_items - Toolsets that decide what the client ever sees:
collections,fields,relations,content,schema,flow,dashboards,defaultandall
Requirements
A Directus instance and credentials in the environment: DIRECTUS_URL plus either a static DIRECTUS_TOKEN — recommended for production — or DIRECTUS_EMAIL and DIRECTUS_PASSWORD. Install it from npm as @skeyelab/directus-mcp-server (2.2.0), the scoped package this repository publishes. The README's own npx example uses the unscoped name directus-mcp-server, which on npm belongs to an unrelated publisher — use the scoped name. MCP_TOOLSETS is a comma-separated list; leave it unset and you get the default toolset — collections, fields, relations and content — while schema, flow and dashboards must be asked for by name. Invalid names are ignored with a warning, and if all of them are invalid the server falls back to default.
Setup effort
One command plus a key — npx -y @skeyelab/directus-mcp-server, then supply credentials
USE CASES
Building a content model by describing it
Create the collection with its initial fields in one call instead of clicking through the admin app.
Querying content with filters and relations
Ask for the items you want with filter, sort and deep relational fields in a single call.
Loading a batch of records
Create or update many items at once rather than one call per row.
Keeping an assistant to content only
Register a server whose toolset is content, so schema tools are not exposed to it at all.
Linking two collections
Create the relation and the field that carries it, then check it with the relation list.
20 tools
Listed in project docs. Your client may show a different list.
get_collectioncreate_collectionupdate_collectiondelete_collectionlist_fieldscreate_fieldupdate_fielddelete_fieldlist_relationscreate_relationdelete_relationquery_itemsget_itemcreate_itemupdate_itemdelete_itembulk_create_itemsbulk_update_itemsbulk_delete_itemsBEFORE YOU INSTALL
What to know first
Tools you get
20 tools named in the project's documentation.
Requires
- npx on PATH
- Node.js 18+
- DIRECTUS_TOKEN in your environment
INSTALLATION
Connect your client
Server setup
npx -y @skeyelab/directus-mcp-serverMCP Clients
Claude Desktop, Cline
{
"mcpServers": {
"directus": {
"command": "npx",
"args": [
"-y",
"@skeyelab/directus-mcp-server"
],
"env": {
"DIRECTUS_URL": "<YOUR_DIRECTUS_URL>",
"DIRECTUS_TOKEN": "<YOUR_DIRECTUS_TOKEN>",
"MCP_TOOLSETS": "default"
}
}
}
}Any MCP client — two servers
{
"mcpServers": {
"directus-schema": {
"command": "npx",
"args": [
"-y",
"@skeyelab/directus-mcp-server"
],
"env": {
"DIRECTUS_URL": "<YOUR_DIRECTUS_URL>",
"DIRECTUS_TOKEN": "<YOUR_DIRECTUS_TOKEN>",
"MCP_TOOLSETS": "schema"
}
},
"directus-content": {
"command": "npx",
"args": [
"-y",
"@skeyelab/directus-mcp-server"
],
"env": {
"DIRECTUS_URL": "<YOUR_DIRECTUS_URL>",
"DIRECTUS_TOKEN": "<YOUR_DIRECTUS_TOKEN>",
"MCP_TOOLSETS": "content"
}
}
}
}