{"_id":"@emit/xhs-cover-mcp-server","_rev":"4-7125f98e323ff9a4e86098a7451096d3","name":"@emit/xhs-cover-mcp-server","dist-tags":{"latest":"1.0.4"},"versions":{"1.0.0":{"name":"@emit/xhs-cover-mcp-server","version":"1.0.0","_id":"@emit/xhs-cover-mcp-server@1.0.0","maintainers":[{"name":"emit","email":"xwchris.zhang@gmail.com"}],"bin":{"xhs-cover-mcp":"dist/index.js"},"dist":{"shasum":"6d2de7013b338bd724e5b5f82e5e580cea31f8a1","tarball":"https://registry.npmjs.org/@emit/xhs-cover-mcp-server/-/xhs-cover-mcp-server-1.0.0.tgz","fileCount":15,"integrity":"sha512-A5Vdtw7BCfqoJSLyGy6ECc2dGk+YMpgywDOfTb0PVl67zbZ7/rmtVFK2kx+5Y7xQmY2LQVvDRlzljLqZiBEl4A==","signatures":[{"sig":"MEYCIQC9wUL5jGr4tL7Sz/Zv6oj3KmnniETE8Xg2Me+/N764WwIhAKtiCSrk1ob7AAMMdOo4K5xyjtxJTWcwml771q7emxme","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":14265},"main":"./src/index.ts","type":"module","gitHead":"988464bccaf8d1330940dc66e01b683c136b3ee3","scripts":{"dev":"wrangler dev","build":"tsc","start":"node dist/index.js","deploy":"wrangler deploy"},"_npmUser":{"name":"emit","email":"xwchris.zhang@gmail.com"},"_npmVersion":"10.9.4","directories":{},"_nodeVersion":"22.22.0","dependencies":{"@xhs-cover/client":"*","@xhs-cover/shared":"*","@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"wrangler":"^3.0.0","typescript":"^5.3.0","@types/node":"^22.0.0","@cloudflare/workers-types":"^4.20240117.0"},"_npmOperationalInternal":{"tmp":"tmp/xhs-cover-mcp-server_1.0.0_1772630702985_0.6475098098369259","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@emit/xhs-cover-mcp-server","version":"1.0.2","keywords":["xiaohongshu","cover","mcp","ai","claude"],"_id":"@emit/xhs-cover-mcp-server@1.0.2","maintainers":[{"name":"emit","email":"xwchris.zhang@gmail.com"}],"homepage":"https://github.com/xwchris/xiaohongshu-cover#readme","bugs":{"url":"https://github.com/xwchris/xiaohongshu-cover/issues"},"bin":{"xhs-cover-mcp":"dist/index.js"},"dist":{"shasum":"424d2c26de3b525549157e4aab7ba14e62a0d2c1","tarball":"https://registry.npmjs.org/@emit/xhs-cover-mcp-server/-/xhs-cover-mcp-server-1.0.2.tgz","fileCount":26,"integrity":"sha512-C2uJMwTh/suWpglDgd3YxRDDBiAoHvQ6PFg+eu+DXBh5SRJ+gwTjChtQ01QCzOdnUFmVpPbZw0g5ynDqsBKsJw==","signatures":[{"sig":"MEUCIQCQauS7P5d2uKUoDpTt2MMtnsBPLi2JhoNl9jTs0MdRIQIgTeb4NZ+5BMBEd06o/KQIzznp5JhwufmRh9zM/PwyJfA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":33877},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"f1d12d6fe9e0d583674e6178bad9385db3fe156e","scripts":{"build":"tsc","start":"node dist/index.js"},"_npmUser":{"name":"emit","email":"xwchris.zhang@gmail.com"},"repository":{"url":"git+https://github.com/xwchris/xiaohongshu-cover.git","type":"git"},"_npmVersion":"10.9.4","directories":{},"_nodeVersion":"22.22.0","dependencies":{"@supabase/supabase-js":"^2.39.0","@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/xhs-cover-mcp-server_1.0.2_1772634426793_0.06740626658031301","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@emit/xhs-cover-mcp-server","version":"1.0.3","keywords":["xiaohongshu","cover","mcp","ai","claude"],"_id":"@emit/xhs-cover-mcp-server@1.0.3","maintainers":[{"name":"emit","email":"xwchris.zhang@gmail.com"}],"homepage":"https://github.com/xwchris/xiaohongshu-cover#readme","bugs":{"url":"https://github.com/xwchris/xiaohongshu-cover/issues"},"bin":{"xhs-cover-mcp":"dist/index.js"},"dist":{"shasum":"2e6269f7bf13e88a279937538ee973f4ae054d4d","tarball":"https://registry.npmjs.org/@emit/xhs-cover-mcp-server/-/xhs-cover-mcp-server-1.0.3.tgz","fileCount":26,"integrity":"sha512-srsCrNNcuHMTgmiB9OiDjqBJAjdKLxulYYclMOvlbzep/lpnnFmDVfTfsEV3YacRjXcxYsJb7sI3dooZcbsRdA==","signatures":[{"sig":"MEUCIQD5wFYPoRfYTpCAvknX2JiGJc0hdIqnfhjWwSBrfnbeAQIgO68VG9BVDFZjy/7bVnjrMrk48LK38f72lt8pYsunMfU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":33845},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"fc584bf10f5bc2625d8c51e9de491f69d7b2205c","scripts":{"build":"tsc","start":"node dist/index.js"},"_npmUser":{"name":"emit","email":"xwchris.zhang@gmail.com"},"repository":{"url":"git+https://github.com/xwchris/xiaohongshu-cover.git","type":"git"},"_npmVersion":"10.9.4","directories":{},"_nodeVersion":"22.22.0","dependencies":{"@supabase/supabase-js":"^2.39.0","@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/xhs-cover-mcp-server_1.0.3_1772762338449_0.8271883204714339","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@emit/xhs-cover-mcp-server","version":"1.0.4","description":"MCP Server for generating Xiaohongshu-style cover images with AI. Works with Claude, Cursor, Windsurf, and other MCP-compatible tools.","type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","bin":{"xhs-cover-mcp":"dist/index.js"},"scripts":{"build":"tsc","start":"node dist/index.js"},"dependencies":{"@modelcontextprotocol/sdk":"^1.0.0","@supabase/supabase-js":"^2.39.0"},"devDependencies":{"@types/node":"^22.0.0","typescript":"^5.3.0"},"keywords":["xiaohongshu","xhs","red","cover","thumbnail","mcp","mcp-server","model-context-protocol","ai","claude","cursor","windsurf","image-generation","social-media","content-creation","chinese"],"author":{"name":"xwchris"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/xwchris/xiaohongshu-cover.git","directory":"packages/mcp-server"},"bugs":{"url":"https://github.com/xwchris/xiaohongshu-cover/issues"},"homepage":"https://xhscover.cn","engines":{"node":">=18.0.0"},"_id":"@emit/xhs-cover-mcp-server@1.0.4","gitHead":"0300fcb1b0a8a2ad0d2ece73e3993ce2e3f953ef","_nodeVersion":"22.22.0","_npmVersion":"10.9.4","dist":{"integrity":"sha512-+egcypsxK6goVP1OG1bw4J6toHnllMhE1ZNjjWZ6aZI1zCNDDGGuZm866M03jWC20DeBQ0yE9il1S3i6P1wcrg==","shasum":"be98f42591b1873753a2c33365456aeffe54d3fd","tarball":"https://registry.npmjs.org/@emit/xhs-cover-mcp-server/-/xhs-cover-mcp-server-1.0.4.tgz","fileCount":18,"unpackedSize":26979,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQD/HqQKdDPzsdA6Hz9/FfVao7kFnBMYpFRtNgLc9d71AwIhAJaE8td57Hrql+5aIG02HXB4OijSi59ToCUiDNoYMRyD"}]},"_npmUser":{"name":"emit","email":"xwchris.zhang@gmail.com"},"directories":{},"maintainers":[{"name":"emit","email":"xwchris.zhang@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/xhs-cover-mcp-server_1.0.4_1773327930887_0.5811129499706804"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-04T13:25:02.898Z","modified":"2026-03-12T15:05:31.140Z","1.0.0":"2026-03-04T13:25:03.185Z","1.0.2":"2026-03-04T14:27:06.946Z","1.0.3":"2026-03-06T01:58:58.579Z","1.0.4":"2026-03-12T15:05:31.022Z"},"bugs":{"url":"https://github.com/xwchris/xiaohongshu-cover/issues"},"homepage":"https://xhscover.cn","keywords":["xiaohongshu","xhs","red","cover","thumbnail","mcp","mcp-server","model-context-protocol","ai","claude","cursor","windsurf","image-generation","social-media","content-creation","chinese"],"repository":{"type":"git","url":"git+https://github.com/xwchris/xiaohongshu-cover.git","directory":"packages/mcp-server"},"maintainers":[{"name":"emit","email":"xwchris.zhang@gmail.com"}],"readme":"# @emit/xhs-cover-mcp-server\n\n<p align=\"center\">\n  <strong>小红书封面生成器 MCP Server</strong><br>\n  让 AI 助手为你生成精美的小红书风格封面图\n</p>\n\n<p align=\"center\">\n  <a href=\"#安装\">安装</a> •\n  <a href=\"#快速开始\">快速开始</a> •\n  <a href=\"#工具说明\">工具说明</a> •\n  <a href=\"#配置\">配置</a> •\n  <a href=\"#常见问题\">常见问题</a>\n</p>\n\n---\n\n## 简介\n\n这是一个 [Model Context Protocol (MCP)](https://modelcontextprotocol.io) 服务器，让 Claude、Cursor、Windsurf 等 AI 工具能够直接生成小红书风格的封面图片。\n\n**一句话概括：** 告诉 AI 你想要什么文案，它帮你生成一张精美的封面图。\n\n## 安装\n\n### 方式一：npm 全局安装\n\n```bash\nnpm install -g @emit/xhs-cover-mcp-server\n```\n\n### 方式二：npx 直接运行\n\n无需安装，直接使用：\n\n```bash\nnpx @emit/xhs-cover-mcp-server\n```\n\n### 方式三：使用 OpenClaw Skill\n\n如果你是 [OpenClaw](https://openclaw.ai) 用户，可以直接安装我们的 Skill：\n\n```bash\n# 在 OpenClaw 中安装\nclawhub install xhs-cover\n```\n\n详见 [xhs-cover-skill](https://github.com/xwchris/xhs-cover-skill)\n\n## 快速开始\n\n### 1. 获取 API Key\n\n使用前需要获取 API Key：\n\n1. 访问 [xhscover.cn](https://xhscover.cn) 注册账号\n2. 在控制台获取你的 API Key\n3. 新用户赠送 10 credits（可免费生成 10 张封面）\n\n### 2. 配置 MCP 客户端\n\n#### Claude Desktop\n\n编辑 Claude Desktop 配置文件：\n\n- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`\n- **Windows**: `%APPDATA%\\Claude\\claude_desktop_config.json`\n\n添加配置：\n\n```json\n{\n  \"mcpServers\": {\n    \"xiaohongshu-cover\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@emit/xhs-cover-mcp-server\"],\n      \"env\": {\n        \"XHS_COVER_API_URL\": \"https://xhs-cover-api.xwchris.workers.dev\",\n        \"XHS_COVER_API_KEY\": \"your-api-key-here\"\n      }\n    }\n  }\n}\n```\n\n#### Cursor\n\n在项目根目录创建 `.cursor/mcp.json`：\n\n```json\n{\n  \"mcpServers\": {\n    \"xiaohongshu-cover\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@emit/xhs-cover-mcp-server\"],\n      \"env\": {\n        \"XHS_COVER_API_URL\": \"https://xhs-cover-api.xwchris.workers.dev\",\n        \"XHS_COVER_API_KEY\": \"your-api-key-here\"\n      }\n    }\n  }\n}\n```\n\n#### Windsurf\n\n编辑 Windsurf 配置文件：\n\n- **macOS**: `~/Library/Application Support/Windsurf/windsurf_config.json`\n- **Windows**: `%APPDATA%\\Windsurf\\windsurf_config.json`\n\n配置同 Claude Desktop。\n\n### 3. 开始使用\n\n重启你的 AI 工具后，直接对话即可：\n\n```\n你：帮我生成一张小红书封面，文案是\"5个习惯让你越来越自律\"\n\nClaude：我来帮你生成这张封面...\n✅ 封面生成成功！\n\n图片 URL: https://...\n消耗 credit: 1\n```\n\n## 工具说明\n\n这个 MCP Server 提供三个工具：\n\n### `xhs_generate_cover` - 生成封面\n\n生成小红书风格的封面图片。\n\n**参数：**\n\n| 参数 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `text` | string | ✅ | 封面文案内容 |\n| `aspectRatio` | string | ❌ | 宽高比，默认 `3:4` |\n\n**支持的宽高比：**\n\n- `3:4` — 小红书标准竖版（推荐）\n- `9:16` — 竖版故事/Reels\n- `1:1` — 正方形\n- `4:3` — 横版\n- `16:9` — 宽屏\n- `2:3` — 竖版\n- `4:5` / `5:4` — 其他比例\n\n**示例：**\n\n```\n生成一张封面：文案\"今日份好心情\"，比例 1:1\n```\n\n### `xhs_get_credits` - 查询余额\n\n查看当前账户的 credit 余额和使用情况。\n\n**参数：** 无\n\n**示例：**\n\n```\n帮我查一下封面生成的 credit 余额\n```\n\n### `xhs_get_history` - 查看历史\n\n获取最近的封面生成记录。\n\n**参数：**\n\n| 参数 | 类型 | 必填 | 说明 |\n|------|------|------|------|\n| `limit` | number | ❌ | 返回记录数，默认 10 |\n\n**示例：**\n\n```\n帮我看看最近生成了哪些封面\n```\n\n## 配置\n\n### 环境变量\n\n| 变量名 | 必填 | 说明 |\n|--------|------|------|\n| `XHS_COVER_API_URL` | ✅ | API 服务地址 |\n| `XHS_COVER_API_KEY` | ✅ | 你的 API Key |\n\n> **提示：** 也支持 `XHS_API_URL` 和 `XHS_API_KEY` 作为别名。\n\n### 本地开发\n\n如果你想在本地运行 API 服务，可以参考 [xhs-cover-skill](https://github.com/xwchris/xhs-cover-skill) 中的说明。\n\n## 常见问题\n\n### Q: 生成的图片文字不清晰怎么办？\n\nAI 图片生成的文字渲染有时不稳定，建议：\n1. 尝试重新生成\n2. 缩短文案长度\n3. 使用更常见的字体风格\n\n### Q: 支持自定义风格吗？\n\n当前版本统一使用小红书清新风格。后续版本会支持：\n- 风格模板选择\n- 参考图片上传\n- 批量生成\n\n### Q: Credits 会过期吗？\n\n不会！购买的 Credits 永久有效，用完为止。\n\n### Q: 如何获取更多 Credits？\n\n访问 [xhscover.cn](https://xhscover.cn) 控制台进行充值，支持多种套餐：\n\n| 套餐 | Credits | 价格 | 单价 |\n|------|---------|------|------|\n| 体验包 | 100 | ¥6 | ¥0.06/张 |\n| 基础包 | 500 | ¥28 | ¥0.056/张 |\n| 标准包 | 1000 | ¥48 | ¥0.048/张 |\n| 大礼包 | 2000 | ¥88 | ¥0.044/张 |\n\n### Q: 支持哪些 AI 工具？\n\n理论上支持所有 MCP 协议的工具，已测试：\n- ✅ Claude Desktop\n- ✅ Cursor\n- ✅ Windsurf\n- ✅ Continue\n- ✅ OpenClaw\n\n### Q: 可以在代码中直接调用吗？\n\n可以！使用我们的 REST API 或客户端 SDK：\n\n```bash\n# REST API\ncurl -X POST https://xhs-cover-api.xwchris.workers.dev/api/v1/generate \\\n  -H \"X-API-Key: your-api-key\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"text\": \"你的文案\"}'\n```\n\n详见 [xhs-cover-skill](https://github.com/xwchris/xhs-cover-skill) 文档。\n\n## 技术细节\n\n### 系统要求\n\n- Node.js >= 18.0.0\n- npm 或 npx\n\n### 依赖\n\n- `@modelcontextprotocol/sdk` — MCP 协议实现\n- `@supabase/supabase-js` — 数据库客户端\n\n### 架构\n\n```\nMCP Client (Claude/Cursor)\n        ↓\n    MCP Server (本包)\n        ↓\n    REST API (Cloudflare Workers)\n        ↓\n    Gemini AI Model\n        ↓\n    图片存储 (Cloudflare R2)\n```\n\n## 相关链接\n\n- 🌐 网站: [xhscover.cn](https://xhscover.cn)\n- 🔌 OpenClaw Skill: [xhs-cover-skill](https://github.com/xwchris/xhs-cover-skill)\n- 💬 社区: [Discord](https://discord.com/invite/clawd)\n\n## License\n\nMIT © 2026\n\n---\n\n<p align=\"center\">\n  用 AI 解放你的创意 🎨\n</p>\n","readmeFilename":"README.md","description":"MCP Server for generating Xiaohongshu-style cover images with AI. Works with Claude, Cursor, Windsurf, and other MCP-compatible tools.","author":{"name":"xwchris"},"license":"MIT"}