Token导航 LogoToken导航TokenDH.com
Directus Extension MCP Comments logo
AI代理未说明官方级别未说明来源级核验

Directus Extension MCP Comments

MCP Server

Directus MCP评论扩展,为MCP界面添加评论工具,支持AI代理对Directus项目进行增删改查操作。

工具数

1

提示词数

0

GitHub Stars

0

资源数

0
AI代理TypeScript本地部署

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

JoshTheDerf

提供方

JoshTheDerf

最后核验

2026/5/17 20:21

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

详细介绍

Directus MCP评论扩展

Directus扩展,用于添加 comments 工具连接到MCP(模型上下文协议)接口,允许AI代理创建、读取、更新和删除Directus项目上的注释。

特性

  • 创建 对任何收藏中的任何项目的评论
  • 阅读 按集合和项目过滤的评论
  • 更新 现有评论
  • 删除 评论
  • 与Directus用户系统和权限完全集成
  • 自动时间戳跟踪

先决条件

此扩展需要 directus-extension-mcp-customization 要安装和启用的扩展。

安装

通过npm安装:

npm install directus-extension-mcp-comments

或手动:

  1. 安装依赖项:
npm install
  1. 构建扩展:
npm run build
  1. 服务器启动时,Directus将自动加载扩展。

用法

comments 该工具支持四种操作:

创建评论

{
  "action": "create",
  "collection": "posts",
  "item": "abc-123",
  "comment": "This is a great post!"
}

阅读评论

阅读收藏的所有评论:

{
  "action": "read",
  "collection": "posts",
  "limit": 10
}

阅读特定项目的评论:

{
  "action": "read",
  "collection": "posts",
  "item": "abc-123",
  "limit": 10
}

更新评论

{
  "action": "update",
  "id": "comment-id-123",
  "comment": "Updated comment text"
}

删除评论

{
  "action": "delete",
  "id": "comment-id-123"
}

技术细节

建筑

此扩展使用Directus挂钩系统来:

  1. 注册 comments 通过MCP工具列表中的工具 mcp.tools.list 过滤器
  2. 通过以下方式处理工具执行 comments.mcp.tools.call 过滤型事件
  3. 从以下方面接受用户责任 meta 自定义扩展传递的参数
  4. 使用 CommentsService 对具有权限意识的操作进行适当的问责

筛选器事件处理程序

emitter.onFilter("comments.mcp.tools.call", async (toolCall, meta) => {
  // Extract accountability from meta parameter
  const { accountability } = meta;

  // Get input arguments from toolCall
  const input = commentInputSchema.parse(toolCall.arguments);

  // Create service with accountability for proper permissions
  const commentsService = new CommentsService({
    schema: await getSchema(),
    accountability,  // Ensures user context and permissions
  });

  // Perform operations with permission enforcement
  // ...
});

发展

开发观察模式:

npm run dev

验证扩展名:

npm run validate

许可证

麻省理工学院

目录标签

目录标签

AI代理TypeScript本地部署评论管理Directus扩展MCP工具

接入字段

传输方式(transport,传输协议)

未说明

鉴权方式(authType,认证方式)

none

工具数量(toolCount,工具数)

1

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

未说明none部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

仍需确认:installCommand

来源信息

继续浏览同类 MCP