Enhanced MCP server for Directus 12.3 with TypeScript, WebSocket, and full API coverage
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent โ or use 1-click editor setup below.
๐ก Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
MCP server for Directus 12 โ items, collections, files, flows, users, and schema tools. TypeScript, typed throughout.
| Statements | Branches | Functions | Lines |
|---|---|---|---|
Coverage badges are generated from coverage/coverage-summary.json by npm run badges (no external service required). Run npm run test:coverage first.
| Variable | Required | Description |
|---|---|---|
DIRECTUS_URL | Yes | Your Directus instance URL (e.g., http://localhost:8065) |
DIRECTUS_TOKEN | Yes | Static API token with appropriate permissions |
DIRECTUS_PROMPTS_COLLECTION_ENABLED | No | Enable AI prompts collection (true/false) |
DIRECTUS_PROMPTS_COLLECTION | No | Collection name for AI prompts (default: ai_prompts) |
DIRECTUS_RESOURCES_ENABLED | No | Enable resources feature (true/false) |
DIRECTUS_RESOURCES_EXCLUDE_SYSTEM | No | Exclude system collections from resources (true/false) |
NODE_ENV | No | Environment mode (development/production) |
DIRECTUS_TIMEOUT | No | Request timeout in ms (default: 30000) |
DIRECTUS_RETRIES | No | Retry attempts for network errors, 5xx and 429 (default: 3) |
DIRECTUS_RETRY_DELAY | No | Base backoff delay in ms (default: 1000) |
DIRECTUS_MAX_RETRY_DELAY | No | Backoff ceiling in ms (default: 10000) |
DIRECTUS_IMPORT_MAX_FILE_SIZE | No | Client-side import size ceiling in bytes, mirroring the Directus IMPORT_MAX_FILE_SIZE (default: 50 MB) |
LOG_LEVEL | No | DEBUG/INFO/WARN/ERROR (default: INFO). Logs go to stderr; stdout is reserved for MCP |
Set these when the Directus instance uses a private CA or requires a client
certificate. Each of CA/CERT/KEY/PFX accepts either a file path or the
PEM/DER content itself.
| Variable | Description |
|---|---|
DIRECTUS_HTTPS_CA | Certificate authority |
DIRECTUS_HTTPS_CERT | Client certificate |
DIRECTUS_HTTPS_KEY | Client private key |
DIRECTUS_HTTPS_PFX | PKCS#12 bundle (alternative to cert/key) |
DIRECTUS_HTTPS_PASSPHRASE | Passphrase for the key or PFX |
DIRECTUS_HTTPS_REJECT_UNAUTHORIZED | false to accept self-signed certificates |
DIRECTUS_HTTPS_SERVERNAME | SNI server name override |
This server uses a static Directus access token (DIRECTUS_TOKEN) and runs over stdio transport. OAuth is not required, by design:
DIRECTUS_V12_BREAKING_CHANGES.md).Generate the token in Directus under User Settings โ Token (use a dedicated user with least-privilege role for production).
MCP servers do not consume Anthropic API tokens themselves; only the AI client's model calls do. If you use this server inside Claude Code or Claude Desktop with a Claude Max (or Pro) subscription, the model usage is covered by the subscription โ you do not need an Anthropic API key. An API key is only required when driving Claude programmatically via the Claude API (e.g. the remote MCP connector).
Cmd+, (macOS) or Ctrl+, (Windows/Linux)Or if installed locally:
Cmd+, (macOS) or Ctrl+, (Windows/Linux)Or if installed locally:
Cmd+Q or Ctrl+Q)Locate your Claude Desktop config file:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json~/.config/Claude/claude_desktop_config.jsonCreate or edit the config file:
Or if installed locally:
For Claude.ai web interface with MCP support:
Note: Claude.ai MCP support may require a Pro subscription and specific browser extensions.
No reviews yet โ be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/directus-mcp-server)<a href="https://allmcps.com/mcp/directus-mcp-server"><img src="https://allmcps.com/api/badge/directus-mcp-server?style=directory" alt="Directus MCP Server on AllMCPs" /></a>