Labsco
pixelsock logo

Directus MCP Server

โ˜… 24

from pixelsock

An MCP server for Directus CMS, enabling AI clients to interact with the Directus API.

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedFreeQuick setup

smithery badge

Directus MCP Server

A Node.js server implementing Model Context Protocol (MCP) for Directus CMS. Enable AI Clients to interact with the Directus API through the Model Context Protocol (MCP).

Directus Server MCP server

๐Ÿ› ๏ธ Available tools

Collections and Items

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 collection

Files

getFiles                // Get files from Directus
uploadFile              // Upload a file to Directus

Users and Permissions

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 Directus

System

getSystemInfo           // Get system information from Directus
getActivity             // Get activity logs from Directus
getConfig               // Get current configuration information

๐Ÿšง Development mode

If you want to run the server in development mode:

  1. Clone and install:

    git clone https://github.com/pixelsock/directus-mcp.git
    cd directus-mcp
    npm install
  2. Add your credentials to .env:

    # .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-password
  3. Start development server:

    npm run dev

๐Ÿ“„ Directus Developer resources