Directus MCP Server
Directus MCP-Server
Ein Node.js-Server, der das Model Context Protocol (MCP) für Directus CMS implementiert. Ermöglichen Sie KI-Clients die Interaktion mit der Directus-API über das Model Context Protocol (MCP).
ℹ Voraussetzungen
Related MCP server: Node Omnibus MCP Server
▶️ Schnellstart
Holen Sie sich Ihre Directus-API-Zugangsdaten
Gehen Sie zu Ihrer Directus-Instanz
Erstellen Sie ein statisches Zugriffstoken oder verwenden Sie Ihre E-Mail-Adresse und Ihr Passwort
Bewahren Sie diese Zugangsdaten sicher auf
Zu Ihrem KI-Editor hinzufügen
{ "mcpServers": { "directus": { "command": "npx", "args": ["-y", "@pixelsock/directus-mcp@latest"], "env": { "DIRECTUS_URL": "https://your-directus-instance.com", "DIRECTUS_ACCESS_TOKEN": "YOUR_ACCESS_TOKEN" } } } }Alternativ können Sie die E-Mail/Passwort-Authentifizierung verwenden:
{ "mcpServers": { "directus": { "command": "npx", "args": ["-y", "@pixelsock/directus-mcp@latest"], "env": { "DIRECTUS_URL": "https://your-directus-instance.com", "DIRECTUS_EMAIL": "your-email@example.com", "DIRECTUS_PASSWORD": "your-password" } } } }Für Cursor:
Gehen Sie zu Settings → Cursor Settings → MCP
Klicken Sie auf
+ Add New Global MCP ServerFügen Sie die Konfiguration ein
Ersetzen Sie die Platzhalterwerte durch Ihre Directus-Zugangsdaten
Speichern und starten Sie Cursor neu
Für Claude Desktop:
Öffnen Sie Settings → Developer
Klicken Sie auf
Edit ConfigÖffnen Sie
claude_desktop_config.jsonin einem Code-Editor und fügen Sie die Konfiguration einErsetzen Sie die Platzhalterwerte durch Ihre Directus-Zugangsdaten
Speichern und starten Sie Claude neu
❓ Fehlerbehebung
Wenn Sie Probleme beim Starten des Servers in Ihrem MCP-Client haben (z. B. Cursor oder Claude Desktop), versuchen Sie bitte Folgendes.
Stellen Sie sicher, dass Sie gültige Directus-Zugangsdaten haben
Überprüfen Sie, ob Ihre Directus-URL korrekt und erreichbar ist
Überprüfen Sie, ob Ihr Zugriffstoken oder Ihre E-Mail/Passwort-Zugangsdaten gültig sind
Ersetzen Sie die Zugangsdaten in Ihrer MCP-Client-Konfiguration
Speichern und starten Sie Ihren MCP-Client neu
Stellen Sie sicher, dass Node und NPM installiert sind
Führen Sie die folgenden Befehle aus, um zu bestätigen, dass Node und NPM installiert sind:
node -v
npm -vLeeren Sie Ihren NPM-Cache
Manchmal kann das Leeren Ihres NPM-Caches Probleme mit npx lösen.
npm cache clean --force🛠️ Verfügbare Tools
Sammlungen und Elemente
getItems // Get items from a collection
getItem // Get a single item from a collection by ID
createItem // Create a new item in a collection
updateItem // Update an existing item in a collection
deleteItem // Delete an item from a collection
getCollections // Get all collection schemas
getFields // Get fields for a collection
getRelations // Get relations for a collectionDateien
getFiles // Get files from Directus
uploadFile // Upload a file to DirectusBenutzer und Berechtigungen
login // Login to Directus and get an access token
getUsers // Get users from Directus
getCurrentUser // Get the current user info
getRoles // Get roles from Directus
getPermissions // Get permissions from DirectusSystem
getSystemInfo // Get system information from Directus
getActivity // Get activity logs from Directus
getConfig // Get current configuration information🚧 Entwicklungsmodus
Wenn Sie den Server im Entwicklungsmodus ausführen möchten:
Klonen und installieren:
git clone https://github.com/pixelsock/directus-mcp.git cd directus-mcp npm installFügen Sie Ihre Zugangsdaten zu
.envhinzu:# .env DIRECTUS_URL=https://your-directus-instance.com DIRECTUS_ACCESS_TOKEN=your_token_here # Or use email/password DIRECTUS_EMAIL=your-email@example.com DIRECTUS_PASSWORD=your-passwordStarten Sie den Entwicklungsserver:
npm run dev
🌐 HTTP-Transport (Multi-User / Remote-Bereitstellungen)
Standardmäßig verwendet der Server den stdio-Transport, der ideal für lokale KI-Editoren für einzelne Benutzer (Cursor, Claude Desktop usw.) ist.
Für Multi-User- oder Remote-Umgebungen können Sie zum Streamable HTTP-Transport wechseln, indem Sie die Umgebungsvariable MCP_TRANSPORT festlegen.
Konfiguration
Umgebungsvariable | Standard | Beschreibung |
|
| Transportmodus: |
|
| TCP-Port, auf dem der HTTP-Server lauscht |
|
| Host/Schnittstelle zum Binden. Verwenden Sie |
Sie können auch --transport=http als CLI-Argument übergeben, anstatt die Umgebungsvariable festzulegen.
Ausführen des HTTP-Servers
# Via environment variable
MCP_TRANSPORT=http MCP_PORT=3000 MCP_HOST=0.0.0.0 node dist/index.js
# Via CLI argument
node dist/index.js --transport=httpDocker-Beispiel
docker run -p 3000:3000 \
-e DIRECTUS_URL=https://your-directus-instance.com \
-e DIRECTUS_ACCESS_TOKEN=your_token_here \
-e MCP_TRANSPORT=http \
-e MCP_HOST=0.0.0.0 \
ghcr.io/pixelsock/directus-mcpVerbinden eines MCP-Clients mit dem HTTP-Server
Sobald der Server läuft, konfigurieren Sie Ihren MCP-Client für die Verbindung mit:
http://<host>:<port>/mcpZum Beispiel mit einem Client, der den Streamable HTTP-Transport unterstützt:
{
"mcpServers": {
"directus": {
"url": "http://localhost:3000/mcp"
}
}
}📄 Directus-Entwicklerressourcen
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityCmaintenanceA Model Context Protocol server that enables AI assistants to interact with Strapi CMS instances through a standardized interface, supporting content types and REST API operations.57976MIT
- AlicenseBqualityFmaintenanceA comprehensive Model Context Protocol server that provides advanced Node.js development tooling for automating project creation, component generation, package management, and documentation with AI-powered assistance.79MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that allows AI tools to connect to and interact with your Directus API, enabling automated access to collections, items, and user data.2027MIT
- AlicenseNot gradedqualityDmaintenanceAn extension that implements the Model Context Protocol for Directus, enabling AI tools and LLMs to interact with Directus content through natural language for content editing, data analysis, and asset management.98MIT
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A Model Context Protocol server for Wix AI tools
Remote MCP server for The Colony — a social network for AI agents (posts, DMs, search, marketplace).
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/pixelsock/directus-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server