使用说明
Echoes MCP服务器
模型上下文协议服务器,用于AI与Echoes讲故事平台的集成——Mage图像生成和内容工具。
特性
- Mage图像生成:通过AppSync排队、监视和保存AI生成的图像
- 字数统计:统计markdown章节文件中的单词和文本统计信息
- MCP资源:将法师状态、队列、结果和字符作为MCP资源公开
- 命令行界面:所有操作的完整命令行界面
- 瘦客户端:没有严重的依赖关系——只有GraphQL对AppSync的调用
安装
npm install -g @echoes-io/mcp-server
或者直接使用npx运行:
npx @echoes-io/mcp-server --help
需求
- Node.js 22+
- AppSync API URL和API密钥(用于Mage工具)
配置
创造一个 .env 时间线仓库根目录中的文件:
PUBLISHER_API_URL=https://xxx.appsync-api.eu-west-1.amazonaws.com/graphql
PUBLISHER_API_KEY=da2-xxxxxxxxxxxxxxxxxxxx
从cwd路径自动检测时间线(例如。, /path/to/timeline-eros/ → eros).
MCP客户端配置
{
"mcpServers": {
"publisher": {
"command": "npx",
"args": ["@echoes-io/mcp-server"]
}
}
}
可用工具
| 工具 | 说明 |
|---|---|
words-count |
统计markdown文件中的单词和统计数据 |
mage_queue_add |
排队生成单个图像/视频 |
mage_queue_add_bulk |
排队多代(每行一个提示) |
mage_queue_list |
列出排队和正在处理的作业 |
mage_queue_pause |
暂停排队 |
mage_queue_resume |
恢复队列 |
mage_queue_cancel |
取消排队作业 |
mage_results_list |
列出生成的结果 |
mage_results_save |
将结果保存到本地文件系统 |
mage_results_save_all |
保存指定圆弧的所有未保存结果 |
mage_status |
获取整体系统状态 |
mage_characters_list |
列出带有占位符的已配置字符 |
可用资源
| URI | 描述 |
|---|---|
publisher://mage/status |
法师系统状态 |
publisher://mage/queue |
当前队列 |
publisher://mage/results |
最近的结果 |
publisher://mage/characters |
配置的字符 |
CLI使用情况
# Word count
echoes words-count ./content/arc/ep01/ch001.md
echoes words-count -d ./content/arc/ep01/ch001.md # detailed
# Start MCP server
echoes serve
# Mage commands
echoes mage status
echoes mage characters
echoes mage queue list
echoes mage queue add "[01] Full body of [ALE] at café" -t scene -a ale -e 1
echoes mage queue add-bulk "<prompts>" -t scene -a ale -e 1
echoes mage queue pause
echoes mage queue resume
echoes mage queue cancel <job-id>
echoes mage results list
echoes mage results list --unsaved
echoes mage results save <job-id>
echoes mage results save-all --arcs ale cri
建筑学
Agent (Kiro/Claude) → MCP Server (stdio) → AppSync (GraphQL, API Key) → Lambda/DynamoDB
↑
.env in timeline repo root
MCP服务器是 瘦GraphQL客户端 --它不执行任何生成逻辑。它调用Publisher门户网站使用的相同AppSync突变/查询。
发展
# Install dependencies
npm install
# Run tests
npm test
# Run tests with coverage
npm run test:coverage
# Lint
npm run lint
# Type check
npx tsc --noEmit
# Build
npm run build
技术栈
| 目的 | 工具 |
|---|---|
| 运行时 | Node.js 22+ |
| 语言 | TypeScript |
| MCP SDK | @modelcontextprotocol/SDK |
| CLI | 指挥官 |
| 测试 | Vitest |
| Linting | 生物特征 |
许可证
麻省理工学院
部分 回声 项目——一个多视角的数字叙事平台。