directus-extension-mcp-revisions
v1.0.1
Published
MCP tool for viewing and managing revision history for Directus items
Maintainers
Readme
Directus MCP Revisions Extension
A Model Context Protocol (MCP) tool for viewing and managing revision history in Directus.
Features
- Read Revisions: Query revision history with flexible filtering and pagination
- View Details: Get complete snapshots or just the changes (deltas)
- Revert Changes: Restore items to previous revision states
- Track Changes: See who made changes and when
Installation
From npm (coming soon)
npm install directus-extension-mcp-revisionsLocal Development
- Clone this repository into your Directus
extensionsfolder - Install dependencies:
cd extensions/directus-extension-mcp-revisions npm install - Build the extension:
npm run build - Restart your Directus instance
Usage
This extension adds a revisions tool to your Directus MCP server. It can be accessed through any MCP client connected to your Directus instance.
Available Actions
Read One Revision
Get details about a specific revision:
{
"action": "readOne",
"id": "revision-uuid-123",
"fields": ["id", "collection", "item", "data", "delta", "date_created"]
}List Revisions
Query revisions with filtering and pagination:
{
"action": "read",
"collection": "posts",
"item": "post-uuid-456",
"limit": 20,
"sort": ["-date_created"]
}Revert to Previous State
Restore an item to a previous revision:
{
"action": "revert",
"id": "revision-uuid-123"
}Revision Fields
id: Unique identifier for the revisioncollection: The collection the item belongs toitem: The primary key of the revised itemdata: Complete snapshot of the item at this revisiondelta: Only the fields that changed in this revisionactivity: Activity ID that triggered the revisiondate_created: When the revision was createduser_created: User who made the changes
Requirements
- Directus 10.10.0 or higher
- Collections must have accountability enabled to track revisions
Development
# Build the extension
npm run build
# Watch mode for development
npm run dev
# Validate the extension
npm run validateRelated Extensions
directus-extension-mcp-customization- Core framework for custom MCP toolsdirectus-extension-mcp-activity- View activity log through MCPdirectus-extension-mcp-comments- Manage comments through MCPdirectus-extension-mcp-hello-world- Example custom MCP tooldirectus-extension-mcp-presets- Manage presets/bookmarks through MCP
License
MIT
Author
Joshua Bemenderfer
- Website: https://thederf.com
- Email: [email protected]
