Skip to main content
Glama
Degree-AS
by Degree-AS

degree-dynamicweb-mcp

用于 DynamicWeb 10 Admin API 的 MCP(Model Context Protocol)服务器。让 Claude Code 能够完全管理 DynamicWeb 的条目类型、字段、页面、段落和 API 发现,而无需接触 DW Admin UI。

工具

条目类型

工具

描述

dw_itemtype_list

列出所有条目类型

dw_itemtype_get

获取条目类型详情和限制

dw_itemtype_create

一次调用即可创建包含字段、分组和限制的条目类型

dw_itemtype_update_settings

更新设置(名称、类别、图标、可用性等)

dw_itemtype_update_restrictions

更新限制(允许的父级、子级、网站等)

dw_itemtype_delete

删除条目类型

架构维护

部署条目类型 XML 不会触及数据库。在架构同步之前,如果某个字段的列缺失,保存时不会报错,但也不会保留任何数据。

工具

描述

dw_itemtype_health

报告数据库列缺失的字段,以及 XML 不再声明的列

dw_itemtype_sync_schema

重新加载条目类型 XML 并创建缺失的表和列

dw_itemtype_usages

列出使用某条目类型的页面和段落

dw_itemtype_clean_table

破坏性操作。 从条目类型的表中删除孤立行

部署新 XML 后:先运行 dw_itemtype_sync_schema,再运行 dw_itemtype_health。同步端点即使中途中止也会返回“ok”,因此健康检查才能告诉你它是否真的成功——而 /Files/System/Log/items/ActivationWorkflow 中保存着真正的错误。如果某个条目类型的表完全缺失,它根本不会出现在健康报告中。

字段

工具

描述

dw_field_list

列出条目类型上的字段

dw_field_save

添加或更新字段

dw_field_delete

删除字段

dw_field_types

从 DW 实例列出所有可用的编辑器类型(非硬编码)

页面

工具

描述

dw_page_list

列出页面,可按区域或父级筛选

dw_page_get

获取页面及其所有条目字段

dw_page_create

在父级下创建页面

dw_page_set_fields

设置页面上的条目字段值

dw_page_delete

删除页面

dw_area_list

列出所有区域(网站)

段落

工具

描述

dw_paragraph_list

列出页面上的段落

dw_paragraph_get

获取段落及其所有条目字段

dw_paragraph_create

在页面上创建段落

dw_paragraph_set_fields

设置段落上的条目字段值

dw_paragraph_delete

删除段落

dw_page_set_fieldsdw_paragraph_set_fields 会自行验证写入结果。如果字段名不是条目类型所声明的,会报错并列出该类型实际拥有的字段名;保存后,它们会重新读取条目并返回其当前内容。DW 无论是否存储了值都会返回“ok”,因此以前 SystemName 中的拼写错误与成功写入难以区分。

产品

工具

描述

dw_product_list

列出产品,可按分组或搜索筛选

dw_product_get

获取单个产品(完整模型,包括 CustomFields/CategoryFields)。对于不存在的产品返回 {found: false},而不是 API 错误

dw_product_update

更新产品的顶层字段、customFields 和 categoryFields

dw_product_delete

删除一个或多个产品

dw_product_bulk_discount

对某个分组或产品列表中的 DefaultPrice 应用百分比折扣

dw_product_update 接受三个输入映射:

  • fields - 产品顶层字段(Name、DefaultPrice、Stock 等)

  • customFields - 全局产品自定义字段值,以 SystemName 为键

  • categoryFields - 产品类别字段值,以 SystemName 为键

产品架构

管理 PIM 数据模型:产品类别(属性组)和产品字段(属性本身)。

工具

描述

dw_product_field_type_list

列出 15 种产品字段类型(TypeId + 别名)

dw_product_category_list

列出产品类别

dw_product_category_save

创建或更新产品类别

dw_product_category_delete

删除类别(内部处理 DW 的三步工作流)

dw_product_field_list

列出属于某个类别的字段

dw_product_field_save

在类别上创建或更新字段(接受类型别名)

dw_product_field_delete

从单个类别中删除字段

文件

工具

描述

dw_files_list

列出目录中的文件,可按扩展名筛选

dw_files_directories

列出子目录

Delivery API(只读)

工具

描述

dw_content_areas

从 Delivery API 获取区域

dw_content_pages

获取带内容的页面

dw_content_paragraphs

获取带内容的段落

API 发现

工具

描述

dw_api_search

在 Swagger 规范中按关键字搜索端点

dw_api_endpoint_schema

获取端点的请求/响应架构

dw_api_call

对任意 Admin API 端点的原始调用

Related MCP server: TeamDesk MCP Server

设置

1. 获取 DW API 令牌

在 DynamicWeb Admin 中,转到 Settings > Developer > API Keys,创建一个具有完全访问权限的新密钥。

2. 配置你的 AI 客户端

在你的项目中添加到 .mcp.json

{
  "mcpServers": {
    "dynamicweb": {
      "command": "npx",
      "args": ["-y", "@degree-as/dynamicweb-mcp"],
      "env": {
        "DW_BASE_URL": "https://your-dw-instance",
        "DW_API_TOKEN": "your-token"
      }
    }
  }
}

编辑 ~/Library/Application Support/Claude/claude_desktop_config.json(macOS)或 %APPDATA%\Claude\claude_desktop_config.json(Windows):

{
  "mcpServers": {
    "dynamicweb": {
      "command": "npx",
      "args": ["-y", "@degree-as/dynamicweb-mcp"],
      "env": {
        "DW_BASE_URL": "https://your-dw-instance",
        "DW_API_TOKEN": "your-token"
      }
    }
  }
}

添加到 ~/.cursor/mcp.json(全局)或 .cursor/mcp.json(项目):

{
  "mcpServers": {
    "dynamicweb": {
      "command": "npx",
      "args": ["-y", "@degree-as/dynamicweb-mcp"],
      "env": {
        "DW_BASE_URL": "https://your-dw-instance",
        "DW_API_TOKEN": "your-token"
      }
    }
  }
}

.vscode/mcp.json 添加到你的项目(注意:使用 servers,而不是 mcpServers):

{
  "servers": {
    "dynamicweb": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@degree-as/dynamicweb-mcp"],
      "env": {
        "DW_BASE_URL": "https://your-dw-instance",
        "DW_API_TOKEN": "your-token"
      }
    }
  }
}

编辑 ~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "dynamicweb": {
      "command": "npx",
      "args": ["-y", "@degree-as/dynamicweb-mcp"],
      "env": {
        "DW_BASE_URL": "https://your-dw-instance",
        "DW_API_TOKEN": "your-token"
      }
    }
  }
}

通过 Cline 的 MCP 设置界面进行配置,或添加到其配置中:

{
  "mcpServers": {
    "dynamicweb": {
      "command": "npx",
      "args": ["-y", "@degree-as/dynamicweb-mcp"],
      "env": {
        "DW_BASE_URL": "https://your-dw-instance",
        "DW_API_TOKEN": "your-token"
      }
    }
  }
}

添加到 Zed 的 settings.json(注意:使用 context_servers):

{
  "context_servers": {
    "dynamicweb": {
      "source": "custom",
      "command": "npx",
      "args": ["-y", "@degree-as/dynamicweb-mcp"],
      "env": {
        "DW_BASE_URL": "https://your-dw-instance",
        "DW_API_TOKEN": "your-token"
      }
    }
  }
}

添加到 ~/.continue/config.yaml

mcpServers:
  - name: dynamicweb
    command: npx
    args:
      - -y
      - "@degree-as/dynamicweb-mcp"
    env:
      DW_BASE_URL: https://your-dw-instance
      DW_API_TOKEN: your-token

3. 重启你的客户端

当你的 AI 客户端加载时,MCP 服务器会自动启动。

本地开发

如果你想从源代码而不是已发布的包运行:

git clone https://github.com/Degree-AS/degree-dynamicweb-mcp.git
cd degree-dynamicweb-mcp
npm install
npm run build

然后在 .mcp.json 中使用 "command": "node", "args": ["/path/to/degree-dynamicweb-mcp/dist/index.js"]

字段类型别名

条目类型字段(dw_field_savedw_itemtype_create

创建字段时,你可以使用简短别名,而不是完整的 .NET 类名:

别名

编辑器

text

TextEditor

longtext

LongTextEditor

richtext

RichTextEditor

richtextlight

RichTextEditorLight

file / image

FileEditor

folder

FolderEditor

media

MediaEditor

link

LinkEditor

itemlink

ItemLinkEditor

itemrelation

ItemRelationListEditor

number

IntegerEditor

decimal

DecimalEditor

date

DateEditor

datetime

DateTimeEditor

checkbox

CheckboxEditor

checkboxlist

CheckboxListEditor

dropdown

DropDownListEditor

radiolist

RadioButtonListEditor

editablelist

EditableListEditor

color

ColorEditor

colorswatch

ColorSwatchEditor

itemtype

ItemTypeEditor

itemtab

ItemTypeTabEditor

user

UserEditor

singleuser

SingleUserEditor

usergroup

SingleUserGroupEditor

geolocation

GeolocationEditor

googlefont

GoogleFontEditor

hidden

HiddenFieldEditor

password

PasswordEditor

任何完整的 .NET 编辑器类名也都可接受。使用 dw_field_types 从你的 DW 实例发现所有可用的编辑器。

可重复列表(itemrelation

itemrelation(ItemRelationListEditor)会创建一个可重复的子条目列表——这是对 FAQ 条目、行、人员等进行建模的通用方式(而不是像 Question1..5 那样固定的编号槽位)。它需要两个额外的参数:

参数

必填

说明

itemRelationType

列表所持有的子项类型的 systemName。请先创建它。

itemSource

条目所在位置。默认 CurrentParagraph(行存储在所有者上)。

先创建子项类型,再创建父项:

// 1) child row
dw_itemtype_create { systemName: "OpeningHoursRow", fields: [
  { name: "Label", systemName: "Label", type: "text" },
  { name: "Value", systemName: "Value", type: "text" },
]}
// 2) parent with the repeatable list
dw_itemtype_create { systemName: "OpeningHours", fields: [
  { name: "Title", systemName: "Title", type: "text" },
  { name: "Rows",  systemName: "Rows",  type: "itemrelation", itemRelationType: "OpeningHoursRow" },
]}

该工具会自动生成所需的 EditorConfiguration + EditorFields(Item type / Item source)以及 Int32 基础类型。

产品字段(dw_product_field_save

产品字段使用不同的系统——来自 FieldTypeAll 的整数 TypeId,而不是编辑器类名:

别名

TypeId

名称

text / text255

1

文本(255)

longtext

2

长文本

checkbox

3

复选框

date

4

日期

datetime

5

日期/时间

number / integer

6

整数

decimal

7

小数

link

8

链接

file

9

文件

text100

10

文本(100)

text50

11

文本(50)

text20

12

文本(20)

text5

13

文本(5)

richtext / editor

14

编辑器

list / dropdown

15

列表

数字 TypeId 也可直接接受。使用 dw_product_field_type_list 从你的 DW 实例获取实时列表。

架构

src/
  index.ts          Entry point - reads config from env, registers tools
  client.ts         DwClient - HTTP client for Admin API, Update API, Delivery API
  utils.ts          Shared Zod helpers (jsonParam, numParam) and response helpers (prop, pascal)
  tools/
    itemTypes.ts    Item type CRUD, fields, restrictions, settings, editor discovery, schema health and sync
    pages.ts        Page and area management
    paragraphs.ts   Paragraph management (uses ParagraphNew + ParagraphSave)
    products.ts     Product CRUD, bulk discount, custom/category field value updates
    productSchema.ts Product categories and product field schema management
    files.ts        File and directory browsing
    delivery.ts     Read-only Delivery API
    discovery.ts    Swagger search, endpoint schema, raw API calls

DW API 接口

DynamicWeb Admin API 有三种调用约定:

  1. Admin APIGET /admin/api/{Endpoint})——使用 URL 参数进行查询

  2. Command APIPOST /admin/api/{Endpoint})——使用 { Model: {...} } 请求体进行变更。删除命令使用扁平请求体(无 Model 包装)。

  3. Update APIPOST /Admin/Api/{Endpoint}?Query.Type={Type})——使用 { QueryData: {...}, model: {...} } 请求体更新现有记录

DwClient 为每种方式提供了专用方法:get()post()command()update()delivery()

开发

npm run dev      # Run with tsx (hot reload)
npm run build    # Compile TypeScript
npm run start    # Run compiled version

更改后,运行 npm run build 并重启 Claude Code 以加载新版本。

A
license - permissive license
A
quality
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

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

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    MCP server for TeamDesk databases, enabling CRUD operations, search, and document generation via natural language.
    3
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    MCP server for Shopify Admin API. Enables product, order, customer, and inventory management via natural language.
    19
    1
    MIT

View all related MCP servers

Related MCP Connectors

  • MCP server for AI access to Swagger by SmartBear.

  • An MCP server that let you interact with Cycloid.io Internal Development Portal and Platform

  • GibsonAI MCP server: manage your databases with natural language

View all MCP Connectors

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/Degree-AS/degree-dynamicweb-mcp'

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