Skip to main content
Glama

Contentstack MCP 服务器

铁匠徽章

该模型上下文协议 (MCP) 服务器与 Contentstack 的内容管理 API 集成,使 Claude 等 AI 助手能够通过标准化协议与您的 Contentstack CMS 进行交互。

**注意:**这是 Contentstack MCP Server 的早期版本。请参阅路线图,了解即将推出的改进和计划中的功能。

目录

Related MCP server: mcp-clickup

特征

可用资源

  • content-types :列出所有内容类型(URI: contentstack://content-types )

  • content-type :通过 UID 获取内容类型(URI: contentstack://content-type/{uid} )

  • entries :按内容类型获取条目(URI: contentstack://entries/{content_type_uid} )

  • entry :获取特定条目(URI: contentstack://entry/{content_type_uid}/{entry_uid} )

  • assets :列出所有资产(URI: contentstack://assets )

内容类型管理

  • 创建、更新和删除内容类型

  • 定义模式、选项、字段规则和分类法

  • 管理全局字段

入境管理

  • 创建、更新和删除条目

  • 跨环境发布和取消发布条目

  • 具有过滤、分页和排序选项的查询条目

全球现场管理

  • 创建和更新全局字段以供跨内容类型重用

  • 使用分页选项检索全局字段

内容工作流程

  • 引导内容创建工作流程

  • 内容分析和见解

  • 移民规划援助

安装

先决条件

  • Node.js(v16.0.0 或更高版本)

  • Contentstack 帐户

  • API 凭证(API 密钥和管理令牌)

NPM 安装

使用此 MCP 服务器的最简单方法是通过 NPM:

# Install globally
npm install -g @drossman/contentstack-mcp

# Or use directly via npx
npx @drossman/contentstack-mcp

手动安装

  1. 克隆存储库:

    git clone https://github.com/darekrossman/contentstack-mcp.git
    cd contentstack-mcp
  2. 安装依赖项:

    npm install
  3. 设置环境变量:

    cp .env.example .env

    使用您的 Contentstack 凭证编辑.env文件:

    CONTENTSTACK_API_KEY=your_api_key_here
    CONTENTSTACK_MANAGEMENT_TOKEN=your_management_token_here
    # Optional: Specify branch if using branches
    CONTENTSTACK_BRANCH=your_branch_name
  4. 构建并启动服务器:

    npm run build
    npm start

通过 Smithery CLI 安装

您还可以使用Smithery CLI安装此 MCP 服务器:

npx @smithery/cli install contentstack-mcp --client claude

有关更多详细信息和高级用法,请参阅Smithery CLI 文档。

发展

开发设置

对于开发,您可以使用:

npm run dev

这将使用ts-node启动服务器,以加快开发周期。

代码质量

该项目使用Biome.js进行代码检查和格式化。它提供了一致的代码风格,并有助于及早发现潜在问题。

可用命令

  • Lint 代码:

    npm run lint
  • Lint 和 Fix :

    npm run lint:fix
  • 格式代码:

    npm run format
  • 格式化和修复:

    npm run format:fix

配置

验证

该服务器需要使用 Contentstack 的 API 进行身份验证:

管理令牌(必需) :

  • 具有预定义权限的堆栈级令牌

  • 通过CONTENTSTACK_MANAGEMENT_TOKEN环境变量设置

  • 从 Contentstack 仪表板生成:设置 > 令牌 > 管理令牌

API 密钥(必需) :

  • 用于身份验证的堆栈 API 密钥

  • 通过CONTENTSTACK_API_KEY环境变量设置

分支机构支持

如果您的 Contentstack 帐户使用分支,您可以指定一个分支:

CONTENTSTACK_BRANCH=develop

与人工智能助手集成

克劳德桌面版

要将此服务器与 Claude for Desktop 一起使用:

  1. 编辑 Claude for Desktop 配置文件:

    • Mac: ~/Library/Application Support/Claude/claude_desktop_config.json

    • Windows: %APPDATA%\Claude\claude_desktop_config.json

  2. 将此服务器添加到mcpServers部分:

    {
      "mcpServers": {
        "contentstack": {
          "command": "npx",
          "args": ["-y", "@drossman/contentstack-mcp"],
          "env": {
            "CONTENTSTACK_API_KEY": "your_api_key_here",
            "CONTENTSTACK_MANAGEMENT_TOKEN": "your_management_token_here"
          }
        }
      }
    }
  3. 重启 Claude 桌面版

光标

要将此服务器与 Cursor 一起使用,请添加 Contentstack MCP 服务器配置:

{
   "mcpServers": {
      "contentstack": {
      "command": "npx",
      "args": ["-y", "@drossman/contentstack-mcp"],
      "env": {
         "CONTENTSTACK_API_KEY": "your_api_key_here",
         "CONTENTSTACK_MANAGEMENT_TOKEN": "your_management_token_here",
      }
      }
   }
}

使用 Smithery 安装

您还可以使用您选择的客户端通过Smithery CLI安装此 MCP 服务器:

npx -y @smithery/cli install @drossman/contentstack-mcp --client claude

可用的客户端包括:

  • 克劳德

  • 克莱恩

  • 风帆冲浪

  • roocode

  • 机智

  • 恩康沃

  • 光标

  • vscode

  • vscode-insiders

  • 博尔泰

  • 亚马逊基岩

  • 亚马逊

有关更多详细信息和高级用法,请参阅Smithery CLI 文档。

路线图

  • [ ]增强 AI 上下文理解:改进复杂查询的上下文配置

  • [ ]高级查询和过滤:支持按多个条件和自定义字段进行过滤

  • [ ]工作流和发布自动化:启用 AI 驱动的内容工作流操作

  • [ ]资产管理增强功能:添加直接资产操作功能

  • [ ]批量操作支持:实现条目和资产的批量操作

  • [ ]改进的错误处理和 AI 反馈:优化 AI 使用的错误消息

  • [ ]用户特定的上下文和权限:根据用户权限定制操作

  • [ ]自定义工具的可扩展性:创建扩展框架

  • [ ]实时事件处理:为反应式 AI 行为添加 webhook 支持

  • [ ]全面的文档:制定详细的 AI 交互指南

喊出来

特别感谢Ivo Toby 。这个项目及其作者深受他在该领域工作的启发。

执照

麻省理工学院


**免责声明:**本项目与 Contentstack 没有任何关联,亦未获得其认可或支持。它是一个独立的开源项目,旨在与 Contentstack API 配合使用。

Available Tools

15 tools
create_content_typeC

Creates a new content type with the specified schema, options, field rules, and taxonomies.

Inputs: schema (required), title (required), uid (required), field_rules, +2 more.

create_entryC

Creates a new entry for a specified content type.

Inputs: content_type_uid (required), entry (required).

create_global_fieldC

Creates a new global field with the specified title, UID, and schema.

Inputs: schema (required), title (required), uid (required).

delete_content_typeC

Deletes a content type identified by its UID.

Inputs: uid (required).

delete_entryC

Deletes an entry identified by its UID and content type UID.

Inputs: content_type_uid (required), entry_uid (required).

get_all_content_typesC

Retrieves a list of all content types, with options for pagination and including additional details like global field schema and counts.

Inputs: include_branch_info, include_count, include_global_field_schema, include_reference_content_type_uid, +2 more.

get_all_global_fieldsC

Retrieves a list of all global fields, with options for pagination and including branch information.

Inputs: include_branch_info, include_count, limit, skip.

get_content_typeB

Retrieves a specific content type by its UID, optionally including the global field schema.

Inputs: uid (required), include_global_field_schema.

get_entriesC

Retrieves entries for a specified content type, with extensive options for filtering, sorting, pagination, and including related data.

Inputs: content_type_uid (required), asc, desc, except, +13 more.

get_entryA

Retrieves a specific entry by its content type UID and entry UID, with options for locale and including references.

Inputs: content_type_uid (required), entry_uid (required), include_reference_content_type_uid, include_references, +1 more.

publish_entryC

Publishes an entry to a specified environment and locale.

Inputs: content_type_uid (required), entry_uid (required), environment (required), locale.

unpublish_entryC

Unpublishes an entry from a specified environment and locale.

Inputs: content_type_uid (required), entry_uid (required), environment (required), locale.

update_content_typeC

Updates an existing content type identified by its UID. Allows modification of title, schema, options, and field rules.

Inputs: uid (required), field_rules, options, schema, +1 more.

update_entryC

Updates an existing entry identified by its UID and content type UID.

Inputs: content_type_uid (required), entry (required), entry_uid (required).

update_global_fieldB

Updates an existing global field identified by its UID. Allows modification of title and schema.

Inputs: uid (required), schema, title.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 15 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose targeting specific resources (content types, entries, global fields) and actions (create, get, update, delete, publish/unpublish). There is no overlap or ambiguity; for example, get_all_content_types vs. get_content_type are clearly differentiated by scope.

    Naming Consistency5/5

    All tools follow a consistent verb_noun pattern with underscores (e.g., create_content_type, get_entries, update_global_field). The naming is predictable and uniform across all 15 tools, making it easy for agents to understand and use them.

    Tool Count5/5

    With 15 tools, this server is well-scoped for content management operations. Each tool earns its place by covering essential CRUD and lifecycle actions for content types, entries, and global fields, without being overly bloated or sparse.

    Completeness5/5

    The tool surface provides complete CRUD and lifecycle coverage for the content management domain. It includes create, get, update, and delete for all core resources (content types, entries, global fields), plus publishing/unpublishing for entries, with no obvious gaps that would hinder agent workflows.

    Related MCP Connectors

    Related MCP Servers