directus-mcp-server
v12.7.0MCP server for Directus 12 — items, collections, files, flows, users, and schema tools
Values you need
| Variable | What it is | |
|---|---|---|
DIRECTUS_URL | required | URL of the Directus instance |
DIRECTUS_TOKEN | required secret | Static Directus access token |
npm (npx) discovery passed
Requires Node.js 18+
Run in a terminal
claude mcp add directus-mcp-server -e 'DIRECTUS_TOKEN=<DIRECTUS_TOKEN>' -e 'DIRECTUS_URL=<DIRECTUS_URL>' -- npx -y --package=@staminna/directus-mcp-server@12.7.0 directus-mcpAdd to
claude_desktop_config.json{
"mcpServers": {
"directus-mcp-server": {
"args": [
"-y",
"--package=@staminna/directus-mcp-server@12.7.0",
"directus-mcp"
],
"command": "npx",
"env": {
"DIRECTUS_TOKEN": "<DIRECTUS_TOKEN>",
"DIRECTUS_URL": "<DIRECTUS_URL>"
}
}
}
}Add to
~/.cursor/mcp.json{
"mcpServers": {
"directus-mcp-server": {
"args": [
"-y",
"--package=@staminna/directus-mcp-server@12.7.0",
"directus-mcp"
],
"command": "npx",
"env": {
"DIRECTUS_TOKEN": "<DIRECTUS_TOKEN>",
"DIRECTUS_URL": "<DIRECTUS_URL>"
}
}
}
}Add to
.vscode/mcp.json{
"inputs": [
{
"description": "DIRECTUS_TOKEN",
"id": "directus-token",
"password": true,
"type": "promptString"
},
{
"description": "DIRECTUS_URL",
"id": "directus-url",
"password": true,
"type": "promptString"
}
],
"servers": {
"directus-mcp-server": {
"args": [
"-y",
"--package=@staminna/directus-mcp-server@12.7.0",
"directus-mcp"
],
"command": "npx",
"env": {
"DIRECTUS_TOKEN": "${input:directus-token}",
"DIRECTUS_URL": "${input:directus-url}"
},
"type": "stdio"
}
}
}Add to
~/.codex/config.toml[mcp_servers.directus-mcp-server]
command = "npx"
args = ["-y", "--package=@staminna/directus-mcp-server@12.7.0", "directus-mcp"]
env = { "DIRECTUS_TOKEN" = "<DIRECTUS_TOKEN>", "DIRECTUS_URL" = "<DIRECTUS_URL>" }For AI agents
- Ask the user for: DIRECTUS_URL, DIRECTUS_TOKEN. Never invent or guess these values; secrets go into the client config, not into chat logs.
- Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
- Restart or reload the client so it starts the server.
- Verify: the server should expose these tools: list_collections, get_collection_schema, get_collection_items, create_collection, delete_collection, create_item, update_item, delete_items, ….
- If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.
Machine-readable: install.md · manifest.json