directus/mcp — dự án mã nguồn mở — đang có 86 sao GitHub. The Directus Content MCP Server is an interface for Directus users to interact with their data in LLMs.
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
The Model Context Protocol (MCP) is a standard for helping AI tools and
LLMs talk to applications and services like Directus.
The Directus Content MCP Server is an interface for Directus users to interact with their data in LLMs. Some good use
cases are:
Content Editors: build custom pages, write blog posts, update content, organize assets and more inside your
Directus project.
Data Analysts: query collections, generate reports, analyze trends, and extract insights from your Directus data
using natural language.
It intentionally limits destructive actions that would result in really bad outcomes like data loss from deleting fields
or deleting collections.
We plan to provide more tools for developers who are working with local / development Directus projects in future
releases and potentially as a separate package to help further prevent data loss.
Installation
Prerequisites
An existing Directus project
If you don't have an existing Directus project, you can get started with a free trial on
Directus Cloud at https://directus.cloud/register
OR
You can spin up a sample Directus instance locally with the following terminal command.
npx directus-template-cli@latest init
Step 1. Get Directus Credentials
You can use email and password or generate a static token to connect the MCP to your Directus instance.
To get a static access token:
Login to your Directus instnace
Go to the User Directory and choose your own user profile
Scroll down to the Token field
Generate token and copy it
Save the user (do NOT forget to save because you’ll get an error that shows Invalid token!)
Step 2. Configure the MCP in your AI Tool
Claude Desktop
Open Claude Desktop and navigate to Settings.
Under the Developer tab, click Edit Config to open the configuration file.
Retrieving content, searching for data, displaying information
create-item
Create new items in collections
Adding new content, records, or entries
update-item
Modify existing items
Editing content, updating statuses, correcting information
delete-item
Remove items from collections
Cleaning up outdated content
read-files
Access file metadata or raw content
Finding images, documents, or media assets
import-file
Import files from URLs
Adding external media to your Directus instance
update-files
Update file metadata
Organizing media, adding descriptions, tagging
read-fields
Get field definitions for collections
Understanding data structure, field types and validation
read-field
Get specific field information
Detailed field configuration
create-field
Add new fields to collections
Extending data models
update-field
Modify existing fields
Changing field configuration, interface options
read-flows
List available automation flows
Finding automation opportunities
trigger-flow
Execute automation flows
Bulk operations, publishing, status changes
read-comments
View comments on items
Retrieving feedback, viewing discussion threads
upsert-comment
Add or update comments
Providing feedback, documenting decisions
markdown-tool
Convert between markdown and HTML
Content formatting for WYSIWYG fields
get-prompts
List available prompts
Discovering pre-configured prompt templates
get-prompt
Execute a stored prompt
Using prompt templates for consistent AI interactions
System Prompt
The MCP server comes with a system prompt that helps encourage the right tool use and provides guiderails for the LLM.
You can overwrite the default system prompt in your env configuration by setting the MCP_SYSTEM_PROMPT variable.
You can also disable the system prompt entirely if desired.
Just set MCP_SYSTEM_PROMPT_ENABLED to false
Prompt Configuration
The MCP server supports dynamic prompts stored in a Directus collection. Prompts are not widely supported across MCP
Clients, but Claude Desktop does have support for them.
You can configure the following:
DIRECTUS_PROMPTS_COLLECTION_ENABLED: Set to "true" to enable prompt functionality
DIRECTUS_PROMPTS_COLLECTION: The name of the collection containing prompts
DIRECTUS_PROMPTS_NAME_FIELD: Field name for the prompt name (default: "name")
DIRECTUS_PROMPTS_DESCRIPTION_FIELD: Field name for the prompt description (default: "description")
DIRECTUS_PROMPTS_SYSTEM_PROMPT_FIELD: Field name for the system prompt text (default: "system_prompt")
DIRECTUS_PROMPTS_MESSAGES_FIELD: Field name for the messages array (default: "messages")
Mustache Templating
Both system prompts and message content support mustache templating using the {{ variable_name }} syntax:
Define variables in your prompts using double curly braces: Hello, {{ name }}!
When calling a prompt, provide values for the variables in the arguments parameter
The MCP server will automatically replace all variables with their provided values
Local / Dev Installation
Clone the repo
pnpm install && pnpm build to build the server
Configure Claude Desktop or Cursor like above, but pointing it to the dist file instead:
Use pnpm dev to watch for changes and rebuild the server
Sample Claude Desktop Config for local dev with full settings
{
"mcpServers": {
"directus": {
"command": "node",
"args": [
"/path/to/directus-mcp-server/dist/index.js"
],
"env": {
"DIRECTUS_URL": "DIRECTUS_URL",
"DIRECTUS_TOKEN": "DIRECTUS_TOKEN",
"MCP_SYSTEM_PROMPT_ENABLED": "true",
"MCP_SYSTEM_PROMPT": "You're a content editor working at Directus.\nYou're a master at copywriting and creating messaging that resonates with technical audiences.\nYou'll be given details about a Directus instance and the schema within it. You'll be asked to update content and other helpful tasks. **Rules** \n - If you're updating HTML / WYSWIG fields inside the CMS - DO NOT ADD extra styling, classes, or markup outside the standard HTML elements. If you're not 95% sure what values should go into a certain field, stop and ask the user. Before deleting anything, confirm with the user and prompt them for an explicit DELETE confirmation via text.",
"DIRECTUS_PROMPTS_COLLECTION_ENABLED": "true",
"DIRECTUS_PROMPTS_COLLECTION": "ai_prompts"
}
}
}
}
Có — directus/mcp phát hành theo license MIT, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/directus/mcp.
directus/mcp có website riêng không?
TopGit chưa ghi nhận URL trang chủ cho directus/mcp. Phần README ở tab phía trên thường có link demo, hoặc xem mô tả GitHub của repo.
directus/mcp dùng license gì?
directus/mcp phát hành theo license MIT. Nên mở file LICENSE trên GitHub để xác nhận — license metadata đôi khi lệch với thực tế dự án.
directus/mcp là gì?
directus/mcp (directus/mcp) là dự án TypeScript trên GitHub. Theo mô tả gốc: The Directus Content MCP Server is an interface for Directus users to interact with their data in LLMs.
Đọc thêm về directus/mcp ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/directus/mcp là nguồn chính thức.
Đọc đầy đủ README ở tab phía trên.
Chưa chắc mcp có hợp với bạn?
Để ChatGPT, Claude hoặc Perplexity tìm hiểu giúp — bấm bên dưới và xem AI nói gì về mcp.