Skip to main content
Glama

da-mcp

75% Vibe_Coded

一个用于文档创作(DA)的远程模型上下文协议(MCP)服务器。该服务器为 Claude 或 ChatGPT 等 LLM 助手提供对 DA 管理操作的直接访问。

功能特性

  • 10 个 DA 管理工具:用于管理 DA 仓库的完整工具集

  • 远程访问:可部署在 Cloudflare Workers 上,具有全球边缘分发能力

  • Streamable HTTP:适用于远程服务器的现代 MCP 传输协议

  • 令牌透传:通过 Authorization 请求头传递 DA API 令牌的简单认证方式

  • 生产就绪:错误处理、日志记录、CORS 支持和健康检查

  • TypeScript:完全类型化的代码库,确保可靠性和可维护性

Related MCP server: Core Content Services MCP Server

架构

┌─────────────────┐
│   MCP Client    │
│ (Claude/Cursor) │
└────────┬────────┘
         │ Streamable HTTP
         │ + DA Token
         ↓
┌─────────────────────────┐
│  DA MCP                 │
│  ┌──────────────────┐   │
│  │   MCP Server     │   │
│  │   (10 Tools)     │   │
│  └──────────────────┘   │
└───────────┬─────────────┘
            │ HTTPS + Token
            ↓
┌─────────────────────────┐
│  DA Admin API           │
│  (admin.da.live)        │
└─────────────────────────┘

项目结构

src/
├── index.ts              # Cloudflare Worker entry point
├── mcp/
│   ├── server.ts         # MCP server initialization
│   ├── tools.ts          # Tool definitions (schemas)
│   └── handlers.ts       # Tool implementation handlers
└── da-admin/
    ├── client.ts         # DA Admin API client
    └── types.ts          # TypeScript types

可用工具

工具

描述

da_list_sources

列出仓库中的源和目录

da_get_source

获取特定源文件的内容

da_create_source

创建新的源文件

da_update_source

更新现有的源文件

da_delete_source

删除源文件

da_copy_content

在位置之间复制内容

da_move_content

在位置之间移动内容

da_get_versions

获取文件的版本历史

da_create_version

创建文件的快照版本

da_get_version

获取文件特定版本的内容

da_lookup_media

查找媒体引用

da_lookup_fragment

查找片段引用

前提条件

  • Node.js 18+ 和 npm

  • Cloudflare 账户(免费套餐即可)

  • 已安装 Wrangler CLI(npm install -g wrangler

  • DA Admin API 令牌

安装

  1. 克隆并安装依赖:

git clone <repository-url>
cd da-mcp
npm install
  1. 配置 Wrangler:

如有需要,编辑 wrangler.toml 以自定义部署设置。

开发

本地开发

在本地运行服务器并支持热重载:

npm run dev

服务器将在 http://localhost:8787 上可用。

测试端点

  • 健康检查: http://localhost:8787/health

  • MCP 端点: http://localhost:8787/mcp

使用 MCP Inspector 进行测试

  1. 启动本地服务器:npm run dev

  2. 打开 MCP Inspector

  3. 配置连接:

    • 类型:Streamable HTTP

    • URL:http://localhost:8787/mcp

    • 请求头:Authorization: Bearer YOUR_DA_TOKEN

部署

部署到 Cloudflare Workers

# Deploy to production
npm run deploy

# Or deploy to development environment
wrangler deploy --env development

公共 URL

部署后,您的 MCP 服务器可通过以下地址访问:

客户端配置

Claude Desktop

添加到 ~/Library/Application Support/Claude/claude_desktop_config.json(macOS)或等效位置:

{
  "mcpServers": {
    "da-live-admin": {
      "type": "streamable-http",
      "url": "https://da-mcp.adobeaem.workers.dev/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_DA_USER_IMS_TOKEN"
      }
    }
  }
}

VS Code / Cursor

添加到 .vscode/mcp.json 或 Cursor 设置中:

{
  "mcpServers": {
    "da-admin-mcp-direct": {
      "url": "https://da-mcp.adobeaem.workers.dev/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_DA_USER_IMS_TOKEN"
      }
    },
    "da-prod-mcp": {
      "url": "https://mcp.adobeaemcloud.com/adobe/mcp/da"
    }
  }
}

认证

服务器使用简单的令牌透传认证:

  1. 客户端在 Authorization 请求头中发送 DA Admin API 令牌

  2. 服务器提取令牌并将其传递给 DA Admin API

  3. 所有对 DA Admin API 的请求都使用此令牌

Authorization 请求头格式:

Authorization: Bearer YOUR_DA_USER_IMS_TOKEN

或简写为:

Authorization: YOUR_DA_USER_IMS_TOKEN

注意: 如果您通过 API 路由器的公共(已认证)URL 访问 API,IMS(Adobe Identity Management Service)登录将由 AEM API 路由器自动处理。在这种情况下,您无需Authorization 请求头中提供 DA Admin API 令牌——IMS 登录流程将为您提供认证。

使用示例

配置完成后,您可以要求您的 AI 助手执行 DA 操作:

Claude, can you list all the sources in the adobe/my-docs repository?
Please get the content of docs/index.md from the adobe/my-docs repository.
Create a new file at docs/new-page.md with some markdown content.

API 端点

GET /health

返回服务器状态的健康检查端点。

响应:

{
  "status": "healthy",
  "service": "da-mcp",
  "version": "1.0.0",
  "environment": "production",
  "timestamp": "2025-01-07T12:00:00.000Z"
}

POST /mcp

用于工具执行的 MCP 协议端点。需要带有 DA Admin API 令牌的 Authorization 请求头。

错误处理

所有工具都包含全面的错误处理:

  • 401 未授权:DA Admin 令牌缺失或无效

  • 404 未找到:无效的端点

  • 408 超时:请求耗时超过 30 秒

  • 500 内部错误:带有详细信息的服务器端错误

错误经过格式化,便于 LLM 客户端理解。

日志记录

服务器将重要事件和错误记录到 Cloudflare Workers 日志中:

# View logs in real-time
wrangler tail

# View logs for specific environment
wrangler tail --env production

监控

监控您部署的 Worker:

  1. Cloudflare Dashboard:查看调用、错误和性能

  2. Wrangler Tail:实时日志(wrangler tail

  3. 健康检查端点:定期在 /health 进行健康检查

贡献

欢迎贡献!请:

  1. Fork 仓库

  2. 创建功能分支

  3. 进行更改并附带测试

  4. 提交 Pull Request

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

No tool schema history has been recorded yet.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/adobe-rnd/da-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server