mcp-ikaos-story
mcp-ikaos-story
用于通过 Codex 或 Claude Code 创建和修改 iKAOS Story 原型内容的 Stdio MCP 服务器。
该 MCP 与经过身份验证的 iKAOS Story API 通信。用户无需克隆 ikaos-content-studio-v2026 或配置本地仓库路径。Story 内容/布局 JSON 存储在 Supabase 中,而固定的工作流文档和源元数据在 API 后端保持只读。
边界
get_story_context返回当前内容修订版和权威的docsLink。save_story_content仅写入content_data;源数据、文档、Story 身份和生产元数据无法更改。每次内容写入都需要精确的当前修订版。过期的编辑会返回冲突,而不是覆盖较新的内容。
图像生成不在范围内。设计人员可以通过 df-sheet 存储上传、替换、整理和删除提供的图像文件。
不会向 MCP 用户分发 Supabase 服务密钥。
Related MCP server: Intern MCP
安装
npm install
npm run build配置 Story API:
export IKAOS_STORY_API_URL=https://your-ikaos-preview.vercel.app
export IKAOS_STORY_API_TOKEN=your-project-scoped-api-token
export IKAOS_STORY_PREVIEW_URL=https://your-ikaos-preview.vercel.app图像工具还需要:
export DF_SHEET_URL=https://your-df-sheet.vercel.app
export DF_SHEET_PROJECT_ID=your-project-uuid
export DF_SHEET_ACCESS_TOKEN=your-df-login-review-access-tokenIKAOS_STORY_PREVIEW_URL 是可选的,默认为 http://localhost:3000。DF_SHEET_ACCESS_TOKEN 目前是一个短期的 df-login 审查访问令牌。切勿提交任何令牌。
Codex
codex mcp add ikaos-story \
--env IKAOS_STORY_API_URL=https://your-ikaos-preview.vercel.app \
--env IKAOS_STORY_API_TOKEN=your-project-scoped-api-token \
--env IKAOS_STORY_PREVIEW_URL=https://your-ikaos-preview.vercel.app \
-- node /absolute/path/to/mcp-ikaos-story/dist/src/index.js当需要图像工具时,将三个 DF_SHEET_* 环境变量值添加到同一命令中。使用 codex mcp list 或 /mcp 进行验证。
Claude Code
claude mcp add --transport stdio \
--env IKAOS_STORY_API_URL=https://your-ikaos-preview.vercel.app \
--env IKAOS_STORY_API_TOKEN=your-project-scoped-api-token \
--env IKAOS_STORY_PREVIEW_URL=https://your-ikaos-preview.vercel.app \
ikaos-story -- node /absolute/path/to/mcp-ikaos-story/dist/src/index.js当需要图像工具时,添加三个 DF_SHEET_* 环境变量值。使用 claude mcp list 或 /mcp 进行验证。
工具
工具 | 作用 |
| 列出基于 Supabase 的 Story 状态、内容修订版、预览路由和文档链接。 |
| 读取身份、权威文档链接、当前内容 JSON 和修订版。 |
| 通过 API 读取固定的工作流、语义、Quote、目录或生产者规则。 |
| 使用乐观修订保护创建或修改内容/布局 JSON。 |
| 验证当前 Story 身份和必需的内容数组。 |
| 列出 Story 槽位和可选视口的已存储图像。 |
| 上传本地 PNG/JPG/WebP 文件,最大 20MB。 |
| 更改标签/顺序,或安全地替换文件。 |
| 在范围验证后永久删除 Story 图像。 |
内容工作流
调用
get_story_context。打开
docsLink,并使用get_story_rules阅读所需的固定规则。仅修改返回的
currentData.data内容/布局对象。使用未更改的 Story ID 和
currentData.revision调用save_story_content。仅当 Story 尚无内容时才使用null。调用
validate_story,然后在 390px 和 1280px 下检查返回的预览 URL。
如果另一个客户端先保存了,请获取最新的上下文并有意合并。未经审查较新的内容,不要使用替换后的修订版重试。
图像工作流
从 Story 内容中选择一个有效的
imagePromptPackages[].inputBrief.slotId。使用本地图像的绝对路径调用
upload_story_image。在 Story 内容中使用返回的
imageUrl,并使用save_story_content保存。调用
update_story_image更改元数据或替换文件。替换会先上传,并且仅在上传成功后才删除旧文件。仅在确认图像 ID 后调用
delete_story_image。删除会移除 R2 对象,并且无法通过此 MCP 恢复。
对于单个响应式源,请省略 viewport。当使用单独的移动端或桌面端文件时,请将完全相同的 viewport 对象传递给 list、update 和 delete。
Available Tools
7 toolsget_story_contextA
Read one Story identity, authoritative document receipt, current data, revision, and preview URL.
Inputs: story_id (required).
get_story_rulesA
Read one immutable Story workflow, semantic, Quote, catalog, or producer rule file.
Inputs: rule (required).
list_storiesA
List iKAOS Story IDs and their read-only delivery status.
Inputs: status.
save_story_contentA
Create or modify Story content/layout JSON with optimistic revision protection. Fixed docs and source metadata cannot be changed.
Inputs: content (required), story_id (required), expected_revision (required).
update_story_imageB
Replace an Asset Hub image file using the scoped image ID returned by upload_story_image.
Inputs: slot_id (required), image_id (required), story_id (required), image_path (required), +1 more.
upload_story_imageC
Upload a local PNG, JPG, JPEG, or WebP file to Asset Hub after verifying the Story image slot.
Inputs: slot_id (required), story_id (required), image_path (required), viewport.
validate_storyC
Validate the current Supabase Story content structure and identity.
Inputs: story_id (required), mode.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Each tool targets a distinct resource or action: listing vs. single-story context, reading rules vs. content, saving vs. validating, and uploading vs. updating images. Even the two image tools are clearly separated by their roles in the upload/replace workflow.
All tool names follow a consistent verb_noun snake_case pattern, such as list_stories, get_story_context, save_story_content, and validate_story. No mixed casings or stylistic deviations appear.
Seven tools is a well-scoped set for a story management server. Each tool covers a meaningful part of the workflow without redundancy or excessive granularity.
The set covers listing, reading, creating/updating content, validating, and managing images, which handles the core story lifecycle. The main gap is the absence of an explicit delete operation for stories or images, though this may be intentional given the immutable/revision-oriented design.
Maintenance
Related MCP Connectors
Remote MCP server for AIStoryHub: stories, chapters, story bible, Voiceprints, AI generation.
Ovanek MCP: Model Context Protocol server for Ovanek platform tools; writes are dry-run by default.
MCP server for StyleKit styles, tokens, recipes, lint and repair over stdio or HTTP.
OAuth-protected, read-only-by-default MCP server for provenance-labeled QuillCaddie project memory.
Related MCP Servers
FlicenseNot gradedqualityCmaintenanceRead-oriented MCP server for Taranis AI, exposing the list_stories tool over stdio or Streamable HTTP for desktop AI assistants and developer tools.1-- AlicenseNot gradedqualityFmaintenanceLocal stdio MCP server for working on Intern-hosted sites through guarded Git checkouts. It enables authentication, site preparation, testing, validation, and publishing via coding harnesses like Codex and Claude Code.37 npmMIT
- AlicenseAqualityBmaintenanceEnables MCP clients to start new Codex conversations and continue existing threads, exposing codex and codex-reply tools over stdio via the Codex app-server protocol.2MIT
- AlicenseAqualityBmaintenanceEnables agents and scripts to drive a social publishing account through remote or local MCP tools: drafting, scheduling, approving and publishing posts, running durable background jobs with file attachments, and reading or editing Brand Memory, assets, and standing agents. Hosts can connect over OAuth with no API key, or run the stdio variant with a key for local disk tools.651MIT