原型 · 预览版:收录官方注册中心里的全部服务器,每 30 分钟同步一次。评价和账户功能将在后续阶段推出。
PopNx MCP为使用 AI 的人准备的 MCP 服务器 · 用大白话讲清楚

Directus MCP Server

作者:staminna版本 12.4.0i★ –i在你的电脑上运行
注册名称io.github.staminna/directus-mcp-server

安装

概览

作者提供的说明(英文原文)

MCP server for Directus 12 — items, collections, files, flows, users, and schema tools

PopNx MCP 的三大支柱

这三项永远不会合并成一个分数:意见、测量和人气是不同的东西。

它能帮你做什么

我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。

  • 连接方式: 在你的电脑上运行
  • 传输方式: stdio
  • 分类: 文档、表格与办公
  • 你需要填写:DIRECTUS_URL, DIRECTUS_TOKEN

安装

选择你使用的 AI 应用,然后复制设置。

安装之前

  • 基础检查:1 项中通过 1 项
  • 在你的电脑上运行,拥有你的用户账户的权限(文件、网络、应用)。
  • 需要你自己填写: DIRECTUS_URL, DIRECTUS_TOKEN

标为机密的值是你账户的钥匙。千万不要分享给别人,也不要粘贴到聊天里。

你需要

  • npm已安装 Node.js(用于 npx 命令)

你用的是哪个应用?

在上方选择你的应用。我们会记住它,下次按钮会显示“安装到 …”。

打开 Claude Desktop → Settings → Developer → Edit Config,把下面的内容粘贴到 claude_desktop_config.json

{
  "mcpServers": {
    "directus": {
      "command": "npx",
      "args": [
        "-y",
        "@staminna/directus-mcp-server"
      ],
      "env": {
        "DIRECTUS_URL": "your-value",
        "DIRECTUS_TOKEN": "your-value"
      }
    }
  }
}

在终端中运行这条命令

claude mcp add directus --env DIRECTUS_URL=your-value --env DIRECTUS_TOKEN=your-value -- npx -y @staminna/directus-mcp-server

运行前请先填写空着的值。

在 Cursor 中打开

或者自己复制设置

粘贴到项目中的 .cursor/mcp.json,或 ~/.cursor/mcp.json

{
  "mcpServers": {
    "directus": {
      "command": "npx",
      "args": [
        "-y",
        "@staminna/directus-mcp-server"
      ],
      "env": {
        "DIRECTUS_URL": "your-value",
        "DIRECTUS_TOKEN": "your-value"
      }
    }
  }
}

浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。

在 VS Code 中打开

或者自己复制设置

粘贴到项目中的 .vscode/mcp.json

{
  "servers": {
    "directus": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@staminna/directus-mcp-server"
      ],
      "env": {
        "DIRECTUS_URL": "your-value",
        "DIRECTUS_TOKEN": "your-value"
      }
    }
  }
}

浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。

这个服务器在你的电脑上运行,而 ChatGPT 只能连接互联网上的服务器。请选择其他应用。

你的选择通过 Cookie 保存在这台设备上,无需账户。

需要你填写的值

  • DIRECTUS_URL 必填 env
    URL of the Directus instance
  • DIRECTUS_TOKEN 机密 必填 env
    Static Directus access token

这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。

它能做什么

它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。

基础检查i

我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月8日

  • ✓ 通过

    作者与仓库一致

    注册名称已通过 GitHub 账户 staminna 验证,该账户拥有此仓库

  • … 尚未检查

    仍在维护

    我们还没有从 GitHub 读取这个仓库

  • … 尚未检查

    有许可证

    我们还没有从 GitHub 读取这个仓库

  • – 不适用

    端点有响应

    它在你的电脑上运行,没有互联网端点

  • – 不适用

    使用 OAuth 登录

    在你的电脑上运行,改用本地设置

  • … 尚未检查

    工具描述中没有隐藏指令

    它在你的电脑上运行;我们只能读取互联网端点的工具列表

与“文档、表格与办公”中的其他服务器比较i

  • 星标数多于此分类中其他 3541 个服务器的 0%
  • 发布到注册中心的时间比此分类中其他 3541 个服务器的 45% 更新
  • 基础检查结果等于或优于此分类中其他 3541 个服务器的 100%

与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。

常见问题

Directus MCP Server 安全吗?

它在 1 项适用的基础检查中通过了 1 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。

它需要哪些密钥或代码?

你需要填写:DIRECTUS_URL, DIRECTUS_TOKEN

它在我的电脑上运行还是在云端?

它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。

它还在维护吗?

GitHub 仓库最后更新于–,最新版本(12.4.0)于38天前进入注册中心。

哪些应用可以使用它?

支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 Node.js。

有什么可以替代它?

同一分类中有:Agent-Native Calendar, Excel MCP Server, MCP Server for Excel

替代选择

同一分类中其他作者的服务器,按星标数排序。

如何看卡片:★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i

Agent-Native Calendar

作者:BuilderIO

Agent-Native Google Calendar - manage events, sync, and public booking

在云端运行★ 7,620MIT2个月前更新
安装

Excel MCP Server

作者:haris-musa

Create and edit Excel files with AI: charts, PivotTables, formulas. No Excel needed.

在你的电脑上运行★ 4,276MIT7天前更新
安装

MCP Server for Excel

作者:sbroenne

Excel automation for AI - Sheets, Power Query, DAX, VBA, Tables, Ranges and more. Windows only.

在你的电脑上运行★ 847MIT4天前更新
安装

作者的 README

打开 README

按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。

@staminna/directus-mcp-server

MCP server for Directus 12 — items, collections, files, flows, users, and schema tools. TypeScript, typed throughout.

Test Coverage
StatementsBranchesFunctionsLines

Coverage badges are generated from coverage/coverage-summary.json by npm run badges (no external service required). Run npm run test:coverage first.

Features

  • 🔐 Full Authentication - Token-based authentication with Directus
  • 📦 Collection Management - CRUD operations for collections and items
  • 📁 File Operations - Upload, download, and manage files
  • 🔄 Flow Management - Create, update, trigger, and manage Directus Flows
  • 👥 User Management - User CRUD and role management
  • 🔍 Schema Tools - Analyze and validate collection schemas
  • 🩺 Diagnostics - Collection access diagnostics and troubleshooting

Installation

Via npm (Recommended)
npm install -g @staminna/directus-mcp-server
From Source
git clone https://github.com/staminna/mcp-server-claude.git

cd mcp-server-claude npm install npm run build

Environment Variables

VariableRequiredDescription
DIRECTUS_URLYesYour Directus instance URL (e.g., http://localhost:8065)
DIRECTUS_TOKENYesStatic API token with appropriate permissions
DIRECTUS_PROMPTS_COLLECTION_ENABLEDNoEnable AI prompts collection (true/false)
DIRECTUS_PROMPTS_COLLECTIONNoCollection name for AI prompts (default: ai_prompts)
DIRECTUS_RESOURCES_ENABLEDNoEnable resources feature (true/false)
DIRECTUS_RESOURCES_EXCLUDE_SYSTEMNoExclude system collections from resources (true/false)
NODE_ENVNoEnvironment mode (development/production)
DIRECTUS_TIMEOUTNoRequest timeout in ms (default: 30000)
DIRECTUS_RETRIESNoRetry attempts for network errors, 5xx and 429 (default: 3)
DIRECTUS_RETRY_DELAYNoBase backoff delay in ms (default: 1000)
DIRECTUS_MAX_RETRY_DELAYNoBackoff ceiling in ms (default: 10000)
DIRECTUS_IMPORT_MAX_FILE_SIZENoClient-side import size ceiling in bytes, mirroring the Directus IMPORT_MAX_FILE_SIZE (default: 50 MB)
LOG_LEVELNoDEBUG/INFO/WARN/ERROR (default: INFO). Logs go to stderr; stdout is reserved for MCP
TLS / client certificates

Set these when the Directus instance uses a private CA or requires a client certificate. Each of CA/CERT/KEY/PFX accepts either a file path or the PEM/DER content itself.

VariableDescription
DIRECTUS_HTTPS_CACertificate authority
DIRECTUS_HTTPS_CERTClient certificate
DIRECTUS_HTTPS_KEYClient private key
DIRECTUS_HTTPS_PFXPKCS#12 bundle (alternative to cert/key)
DIRECTUS_HTTPS_PASSPHRASEPassphrase for the key or PFX
DIRECTUS_HTTPS_REJECT_UNAUTHORIZEDfalse to accept self-signed certificates
DIRECTUS_HTTPS_SERVERNAMESNI server name override

Authentication — no OAuth required

This server uses a static Directus access token (DIRECTUS_TOKEN) and runs over stdio transport. OAuth is *not* required, by design:

  • The MCP specification only defines OAuth 2.1 authorization for HTTP-based transports. For stdio servers the spec says implementations *"SHOULD NOT"* use it and should instead retrieve credentials from the environment — exactly what this server does.
  • Directus 12 fully supports static access tokens. The OAuth 2.1 support Directus added (mid-2026) applies to its own built-in *remote* MCP endpoint and is optional; there are no breaking changes to token authentication in Directus 12 (see DIRECTUS_V12_BREAKING_CHANGES.md).
  • OAuth only becomes relevant if you expose an MCP server remotely over HTTP (Streamable HTTP/SSE). As a local stdio subprocess of Claude Desktop, Claude Code, Cursor, etc., this server needs only the env token.

Generate the token in Directus under User Settings → Token (use a dedicated user with least-privilege role for production).

Using with a Claude subscription (Max/Pro) — no API key needed

MCP servers do not consume Anthropic API tokens themselves; only the AI client's model calls do. If you use this server inside Claude Code or Claude Desktop with a Claude Max (or Pro) subscription, the model usage is covered by the subscription — you do not need an Anthropic API key. An API key is only required when driving Claude programmatically via the Claude API (e.g. the remote MCP connector).


IDE Configuration

🟣 Cursor
  1. Open Cursor Settings: Cmd+, (macOS) or Ctrl+, (Windows/Linux)
  2. Search for "MCP" or navigate to Features → MCP Servers
  3. Click "Edit in settings.json"
  4. Add the following configuration:
{

"mcpServers": { "directus": { "command": "npx", "args": [ "-y", "@staminna/directus-mcp-server" ], "env": { "DIRECTUS_URL": "http://localhost:8065", "DIRECTUS_TOKEN": "your-directus-token-here" } } } }

Or if installed locally:

{

"mcpServers": { "directus": { "command": "node", "args": [ "/path/to/mcp-server-claude/dist/index.js" ], "env": { "DIRECTUS_URL": "http://localhost:8065", "DIRECTUS_TOKEN": "your-directus-token-here" } } } }

  1. Save the file and restart Cursor

🌊 Windsurf
  1. Open Windsurf Settings: Cmd+, (macOS) or Ctrl+, (Windows/Linux)
  2. Search for "MCP Servers"
  3. Click "Edit in settings.json"
  4. Add the following configuration:
{

"mcpServers": { "directus": { "command": "npx", "args": [ "-y", "@staminna/directus-mcp-server" ], "env": { "DIRECTUS_URL": "http://localhost:8065", "DIRECTUS_TOKEN": "your-directus-token-here", "DIRECTUS_PROMPTS_COLLECTION_ENABLED": "true", "DIRECTUS_PROMPTS_COLLECTION": "ai_prompts", "DIRECTUS_RESOURCES_ENABLED": "true", "DIRECTUS_RESOURCES_EXCLUDE_SYSTEM": "true", "NODE_ENV": "production" } } } }

Or if installed locally:

{

"mcpServers": { "directus": { "command": "node", "args": [ "/path/to/mcp-server-claude/dist/index.js" ], "env": { "DIRECTUS_URL": "http://localhost:8065", "DIRECTUS_TOKEN": "your-directus-token-here" } } } }

  1. Save the file
  2. Quit Windsurf completely (Cmd+Q or Ctrl+Q)
  3. Reopen Windsurf and wait ~10 seconds for MCP to initialize

🤖 Claude Desktop
  1. Locate your Claude Desktop config file:
  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json
  1. Create or edit the config file:
{

"mcpServers": { "directus": { "command": "npx", "args": [ "-y", "@staminna/directus-mcp-server" ], "env": { "DIRECTUS_URL": "http://localhost:8065", "DIRECTUS_TOKEN": "your-directus-token-here" } } } }

Or if installed locally:

{

"mcpServers": { "directus": { "command": "node", "args": [ "/path/to/mcp-server-claude/dist/index.js" ], "env": { "DIRECTUS_URL": "http://localhost:8065", "DIRECTUS_TOKEN": "your-directus-token-here" } } } }

  1. Save the file and restart Claude Desktop

🔮 Claude.ai (Web with MCP)

For Claude.ai web interface with MCP support:

  1. Navigate to Claude.ai settings
  2. Find the MCP configuration section
  3. Add a new MCP server with:
{

"name": "directus", "command": "npx", "args": ["-y", "@staminna/directus-mcp-server"], "env": { "DIRECTUS_URL": "http://localhost:8065", "DIRECTUS_TOKEN": "your-directus-token-here" } }

Note: Claude.ai MCP support may require a Pro subscription and specific browser extensions.


Available Tools

Collection Management
ToolDescription
list_collectionsList all collections; folders and inactive collections (Directus 12.4) are marked
get_collection_schemaGet schema for a specific collection
get_collection_itemsGet items from a collection with filtering
create_collectionCreate a new collection
delete_collectionDelete a collection (requires confirm)
create_itemCreate a new item in a collection
update_itemUpdate an existing item, optionally into a draft version
delete_itemsDelete items by ids or by query (see note below)
bulk_operationsExecute bulk create, update, delete
Schema & Fields
ToolDescription
create_fieldCreate a new field in a collection
update_fieldUpdate an existing field
delete_fieldDelete a field from a collection
create_relationshipCreate relationships (O2O, O2M, M2O, M2M, M2A)
analyze_collection_schemaAnalyze schema with relationship mapping
validate_collection_schemaValidate schema and relationships
analyze_relationshipsAnalyze relationships across collections
get_schema_snapshotRead a full or partial snapshot of the data model
diff_schemaCompare a snapshot against the live schema (merge or mirror). Directus drops request bodies over ~96 KB, so pass a partial snapshot from get_schema_snapshot with include_collections on any sizeable data model — see DIRECTUS_V12_BREAKING_CHANGES.md
apply_schemaApply a diff (requires confirm)
Flow Management
ToolDescription
get_flowsGet all flows, optionally by folder (Directus 12.4)
get_flowGet a specific flow by ID
create_flowCreate a new automation flow, optionally inside a folder
update_flowUpdate an existing flow
delete_flowDelete a flow
trigger_flowManually trigger a flow
get_operationsGet flow operations
User Management
ToolDescription
get_usersGet all users with filtering
get_userGet a specific user by ID
File Management
ToolDescription
get_filesGet files with filtering and pagination
import_dataImport CSV/JSON into one collection, or several at once
Diagnostics
ToolDescription
diagnose_collection_accessDiagnose collection access issues
refresh_collection_cacheRefresh collection cache
validate_collection_creation

只显示了开头部分;其余内容请在仓库中阅读

问 PopNx