degree-dynamicweb-mcp
degree-dynamicweb-mcp
用于 DynamicWeb 10 Admin API 的 MCP(Model Context Protocol)服务器。让 Claude Code 能够完全管理 DynamicWeb 的条目类型、字段、页面、段落和 API 发现,而无需接触 DW Admin UI。
工具
条目类型
工具 | 描述 |
| 列出所有条目类型 |
| 获取条目类型详情和限制 |
| 一次调用即可创建包含字段、分组和限制的条目类型 |
| 更新设置(名称、类别、图标、可用性等) |
| 更新限制(允许的父级、子级、网站等) |
| 删除条目类型 |
架构维护
部署条目类型 XML 不会触及数据库。在架构同步之前,如果某个字段的列缺失,保存时不会报错,但也不会保留任何数据。
工具 | 描述 |
| 报告数据库列缺失的字段,以及 XML 不再声明的列 |
| 重新加载条目类型 XML 并创建缺失的表和列 |
| 列出使用某条目类型的页面和段落 |
| 破坏性操作。 从条目类型的表中删除孤立行 |
部署新 XML 后:先运行 dw_itemtype_sync_schema,再运行 dw_itemtype_health。同步端点即使中途中止也会返回“ok”,因此健康检查才能告诉你它是否真的成功——而 /Files/System/Log/items/ActivationWorkflow 中保存着真正的错误。如果某个条目类型的表完全缺失,它根本不会出现在健康报告中。
字段
工具 | 描述 |
| 列出条目类型上的字段 |
| 添加或更新字段 |
| 删除字段 |
| 从 DW 实例列出所有可用的编辑器类型(非硬编码) |
页面
工具 | 描述 |
| 列出页面,可按区域或父级筛选 |
| 获取页面及其所有条目字段 |
| 在父级下创建页面 |
| 设置页面上的条目字段值 |
| 删除页面 |
| 列出所有区域(网站) |
段落
工具 | 描述 |
| 列出页面上的段落 |
| 获取段落及其所有条目字段 |
| 在页面上创建段落 |
| 设置段落上的条目字段值 |
| 删除段落 |
dw_page_set_fields 和 dw_paragraph_set_fields 会自行验证写入结果。如果字段名不是条目类型所声明的,会报错并列出该类型实际拥有的字段名;保存后,它们会重新读取条目并返回其当前内容。DW 无论是否存储了值都会返回“ok”,因此以前 SystemName 中的拼写错误与成功写入难以区分。
产品
工具 | 描述 |
| 列出产品,可按分组或搜索筛选 |
| 获取单个产品(完整模型,包括 CustomFields/CategoryFields)。对于不存在的产品返回 |
| 更新产品的顶层字段、customFields 和 categoryFields |
| 删除一个或多个产品 |
| 对某个分组或产品列表中的 DefaultPrice 应用百分比折扣 |
dw_product_update 接受三个输入映射:
fields- 产品顶层字段(Name、DefaultPrice、Stock 等)customFields- 全局产品自定义字段值,以 SystemName 为键categoryFields- 产品类别字段值,以 SystemName 为键
产品架构
管理 PIM 数据模型:产品类别(属性组)和产品字段(属性本身)。
工具 | 描述 |
| 列出 15 种产品字段类型(TypeId + 别名) |
| 列出产品类别 |
| 创建或更新产品类别 |
| 删除类别(内部处理 DW 的三步工作流) |
| 列出属于某个类别的字段 |
| 在类别上创建或更新字段(接受类型别名) |
| 从单个类别中删除字段 |
文件
工具 | 描述 |
| 列出目录中的文件,可按扩展名筛选 |
| 列出子目录 |
Delivery API(只读)
工具 | 描述 |
| 从 Delivery API 获取区域 |
| 获取带内容的页面 |
| 获取带内容的段落 |
API 发现
工具 | 描述 |
| 在 Swagger 规范中按关键字搜索端点 |
| 获取端点的请求/响应架构 |
| 对任意 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-token3. 重启你的客户端
当你的 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_save、dw_itemtype_create)
创建字段时,你可以使用简短别名,而不是完整的 .NET 类名:
别名 | 编辑器 |
| TextEditor |
| LongTextEditor |
| RichTextEditor |
| RichTextEditorLight |
| FileEditor |
| FolderEditor |
| MediaEditor |
| LinkEditor |
| ItemLinkEditor |
| ItemRelationListEditor |
| IntegerEditor |
| DecimalEditor |
| DateEditor |
| DateTimeEditor |
| CheckboxEditor |
| CheckboxListEditor |
| DropDownListEditor |
| RadioButtonListEditor |
| EditableListEditor |
| ColorEditor |
| ColorSwatchEditor |
| ItemTypeEditor |
| ItemTypeTabEditor |
| UserEditor |
| SingleUserEditor |
| SingleUserGroupEditor |
| GeolocationEditor |
| GoogleFontEditor |
| HiddenFieldEditor |
| PasswordEditor |
任何完整的 .NET 编辑器类名也都可接受。使用 dw_field_types 从你的 DW 实例发现所有可用的编辑器。
可重复列表(itemrelation)
itemrelation(ItemRelationListEditor)会创建一个可重复的子条目列表——这是对 FAQ 条目、行、人员等进行建模的通用方式(而不是像 Question1..5 那样固定的编号槽位)。它需要两个额外的参数:
参数 | 必填 | 说明 |
| 是 | 列表所持有的子项类型的 systemName。请先创建它。 |
| 否 | 条目所在位置。默认 |
先创建子项类型,再创建父项:
// 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 | 名称 |
| 1 | 文本(255) |
| 2 | 长文本 |
| 3 | 复选框 |
| 4 | 日期 |
| 5 | 日期/时间 |
| 6 | 整数 |
| 7 | 小数 |
| 8 | 链接 |
| 9 | 文件 |
| 10 | 文本(100) |
| 11 | 文本(50) |
| 12 | 文本(20) |
| 13 | 文本(5) |
| 14 | 编辑器 |
| 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 callsDW API 接口
DynamicWeb Admin API 有三种调用约定:
Admin API(
GET /admin/api/{Endpoint})——使用 URL 参数进行查询Command API(
POST /admin/api/{Endpoint})——使用{ Model: {...} }请求体进行变更。删除命令使用扁平请求体(无 Model 包装)。Update API(
POST /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 以加载新版本。
Maintenance
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
- AlicenseAqualityBmaintenanceMCP server for Drupal sites via JSON:API, enabling CRUD operations on nodes, taxonomy terms, and users using natural language.8MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for TeamDesk databases, enabling CRUD operations, search, and document generation via natural language.3MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for Shopify Admin API. Enables product, order, customer, and inventory management via natural language.191MIT
- AlicenseAqualityCmaintenanceMCP server for Microsoft Dynamics 365 Business Central that enables AI assistants to query and manage Business Central data via full CRUD operations.630MIT
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
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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