@ebitex/content-mcp

中文文档
1.1.276发布于 2026/11/01Apache-2.0TypeScriptES Module

An MCP server for ebitex Content: build and publish a content model from an AI agent.

原始使用文档
文档目录9 节
  1. Configure it
  2. Mint the key deliberately
  3. The tools
  4. Authoring is half the job
  5. Why it cannot drift
  6. Resources
  7. Embedding it
  8. A note on zod
  9. Licence

@ebitex/content-mcp

An MCP server for ebitex Content. Point an AI agent at it and it can build a content model end to end — Contracts and their fields, Templates, Components, the Experience tree — and publish it.

It runs locally, over stdio, authenticated by a Content management key you mint yourself. Nothing is hosted by ebitex, so your write-capable key never leaves your machine.

Configure it

{
  "mcpServers": {
    "ebitex-content": {
      "command": "npx",
      "args": ["-y", "@ebitex/content-mcp"],
      "env": { "EBITEX_CONTENT_MANAGEMENT_KEY": "frm_live_..." }
    }
  }
}
Variable
EBITEX_CONTENT_MANAGEMENT_KEYRequired. Mint one in Content under Settings → API Keys → Management keys
EBITEX_CONTENT_API_BASEDefaults to https://api.ebitex.io
EBITEX_CONTENT_MCP_READ_ONLYSet to 1 to hide every write tool regardless of the key's scopes
EBITEX_CONTENT_TARGET_MANAGEMENT_KEYA second key, for content_transfer to import into
EBITEX_CONTENT_REALMThe realm key the management key is expected to act in. Startup stops if it does not (a key is bound to one realm; this checks, it does not select). Unset: not checked

Mint the key deliberately

A management key is bound to one organization and one authoring environment, and acts as one role. That binding is the real safety boundary here, and it is the one this server cannot supply for you:

  • Bind it to a non-production authoring environment. This server has no way to tell which of your environments is production — that is your own topology, and a management key deliberately cannot see it. A heuristic would be worse than nothing, because it would be believed.
  • Leave the authoring scope off unless the agent needs to write. Without it, the write tools are not merely refused; they are not offered at all.
  • Give it a role with the access it needs and no more. Branch access rules and workflow gating apply to a key exactly as they do to a person.

On startup the server prints, to stderr, which organization and environment the key reached and which role it acts as. Read it once; if it is not what you expected, stop.

The tools

Ten, shaped around what an agent does rather than around REST routes.

content_whoamiWhere this key is scoped: organization, environment, role, scopes, this server's version, and which tools were withheld and why. Needs no scope, so a key that can do almost nothing can still ask why
content_describeWhat can exist here: every field type with its own settings schema, plus this environment's Contracts and Templates
content_findLocate entities by kind, search or external id, with one paging contract across both listings
content_getRead one entity in full
content_writeCreate or update one entity
content_deleteDelete one, behind an explicit confirmation
content_publishPlan, read the blockers, then publish
content_operation_statusPoll a job
content_transferMove a whole model between environments, atomically. identityMode picks how items are matched: externalId (the default, by natural key), preserve (by id), or fresh (everything new)
content_topologyWhere this environment sits: the delivery environments a publish lands in, and its promotion neighbours. One hop only

Which of them appear depends on your key's scopes: a read-scoped key gets a server with no write tools at all, rather than tools that always fail. content_whoami is the exception and always appears — it reports which tools were withheld and what each would need, so an absent tool is explained rather than merely missing.

Every result also names the organization and environment it was answered in, and an empty one says so explicitly. A key reads and writes exactly one authoring environment, so "no Contracts" always means "none here" — an agent that reads it as "none anywhere" creates duplicates.

Authoring is half the job

This server builds and publishes a content model. The site that renders it reads the Content Delivery API, and that has its own client, @ebitex/content-sdk (or Ebitex.Content.Delivery for .NET). The server's instructions and the ebitex-content://help/rendering-your-site resource tell an agent so before it writes a renderer; if you are briefing an agent yourself, say the same.

Why it cannot drift

The server encodes no knowledge of the content model. It does not know what field types exist, what a Contract may contain, or what makes a document valid. All three are answered at runtime: content_describe returns each field type's own declared schema, and every write is validated by the server that stores it. There is nothing here to fall out of step, because nothing is duplicated.

That also shapes how errors work. A refusal is relayed whole, with its field paths intact and no summarizing, because for an agent the error is the control loop: try, read the error, fix the one field it names, call again.

Resources

Alongside the tools, the server offers the Content documentation as MCP resources — start with ebitex-content://help/agent-authoring, which explains what Contracts, Templates, Presentations, Adapters and the Experience tree are for, and the order to create them in. Then read ebitex-content://help/content-modelling before you decide what the model looks like: it says what belongs in a Contract and what in a Template, which field to use, how to name things, how to build containers such as tabs and accordions, and how to ship a model to others.

Embedding it

import { buildServer, readConfig } from '@ebitex/content-mcp'

const { server, banner } = await buildServer({ config: readConfig() })
console.error(banner) // never stdout — on stdio, that stream is the protocol

A note on zod

This package pins zod to ^3.25.76 rather than ^4, even though @modelcontextprotocol/sdk accepts either. The reason is type identity, not capability: the SDK's schema types are written against whichever zod resolves for it, and a second copy at a different major produces a type mismatch on every tool registration. Pinning to the version the SDK resolves keeps one zod in the tree. This matters at build time only; at runtime the SDK handles both.

Licence

Apache-2.0 — © ebitex software LLC.

Full guide: developers.ebitex.io.

版本与发布记录

@ebitex/content-mcp 共发布 93 个版本,首次发布于 2026/09/12;过去 12 个月发布了 93 个版本。

版本发布日期距今
1.1.276latest2026/11/012 天前
1.1.2742026/10/304 天前
1.1.2722026/10/304 天前
1.1.2712026/10/295 天前
1.1.2692026/10/295 天前
1.1.2682026/10/295 天前

关于 @ebitex/content-mcp 的常见问题

@ebitex/content-mcp 是什么?

ebitex Content的MCP服务器:构建并发布来自AI代理的内容模型。

如何安装 @ebitex/content-mcp?

在项目目录运行 npm install @ebitex/content-mcp,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 ebitex-content-mcp,可以用 npx ebitex-content-mcp 直接运行。

@ebitex/content-mcp 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@ebitex/content-mcp 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@ebitex/content-mcp 可以商用吗?

@ebitex/content-mcp 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@ebitex/content-mcp 还在维护吗?

最新版本 1.1.276 发布于 2026/11/01(2 天前);至今共发布 93 个版本,其中过去 12 个月发布了 93 个;首次发布于 2026/09/12。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。