LabscoMCP early access ↗
SkeyelabMCP SERVER

Directus

Builds and fills a Directus schema from the conversation — collections, fields, relations and items, with toolsets deciding how much is exposed.

by Skeyelab ↗CMS & Blog PublishingCommunity

LABSCO 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, default and all

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