Claude的草案级集成
官方集成以供使用 Drafty.com(可译为“风度网”或根据具体语境意译为其他名称,但直接保留原名“Drafty.com”在中文中也是可接受的,表示这是一个网站的名称) 使用Claude Desktop和Claude Code。
利用人工智能辅助撰写并发布博客文章。
包含内容
🖥️ MCP 服务器(Claude 桌面版)
在Claude桌面版中原生出现的博客文章管理工具。
特点:
- 创建、列出和更新博客文章
- 管理帖子可见性(公开、未列出、私密)
- 添加标签并整理内容
- 全部来自Claude Desktop内部
快速入门:
npm install -g @drafty/mcp-server⌨️ 代理技能(克劳德代码)
类型 /drafty 在Claude代码中激活博客文章工作流。
特点:
- 借助AI撰写博客草稿
- 直接从Claude代码发布
- 管理现有帖子
- 创建私人笔记和草稿
快速入门:
git clone https://github.com/shellen/drafty-claude-integrations
cd drafty-claude-integrations
# Claude Code will discover skill/ automatically👉 完整代理技能文档
先决条件
两个集成都需要:
- Drafty Pro 账户
- API密钥 来自您的Drafty设置
获取您的API密钥
- 访问 https://www.drafty.com/dash
- 点击 设置 → 高级 → 开发者工具
- 复制您的API密钥(以
drafty_)
免费用户: API密钥是仅限Pro版的功能。OAuth集成对于免费用户可通过 ChatGPT(GPT系列模型)。
安装
Claude Desktop(MCP服务器)
选项1:通过npm安装(推荐)
npm install -g @drafty/mcp-server然后配置Claude桌面版:
macOS: 编辑 ~/Library/Application Support/Claude/claude_desktop_config.json Windows: 编辑 %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"drafty": {
"command": "drafty-mcp-server",
"env": {
"DRAFTY_API_KEY": "your_api_key_here"
}
}
}
}重启 Claude 桌面应用,并寻找 🔨 锤子图标。
选项2:从源代码安装
git clone https://github.com/shellen/drafty-claude-integrations
cd drafty-claude-integrations/mcp-server
npm install
npm run build然后配置为绝对路径到 dist/index.js。
克劳德·科德(特工技能)
选项1:克隆整个仓库
git clone https://github.com/shellen/drafty-claude-integrations
cd drafty-claude-integrations
# Claude Code will discover skill/ directory选项2:仅为技能创建符号链接
git clone https://github.com/shellen/drafty-claude-integrations
ln -s "$(pwd)/drafty-claude-integrations/skill" ~/.config/claude/skills/drafty设置您的API密钥:
export DRAFTY_API_KEY="your_api_key_here"在Claude代码中,输入类型 /drafty 来激活这个技能。
使用示例
创建一篇博客文章(MCP服务器)
在Claude Desktop中:
You: Write a blog post about building REST APIs in Node.js
Claude: I'll help you create a comprehensive blog post about building REST APIs...
[Uses create_post tool]
✅ Post published at https://drafty.com/@yourname/building-rest-apis创建一篇博客文章(代理技能)
在《克劳德密码》中:
You: /drafty write a post about TypeScript best practices
Claude: I'll draft a blog post about TypeScript best practices and publish it to Drafty...
[Creates post via API]
✅ Published: TypeScript Best Practices
🔗 https://drafty.com/@yourname/typescript-best-practices列出您的帖子
You: Show me my recent blog posts
Claude: [Lists posts with titles, URLs, and publication dates]更新一篇帖子
You: Update my latest post to fix a typo in the title
Claude: [Finds most recent post and updates it]
✅ Post updatedAPI 参考文档
两个集成都使用相同的Drafty API:
创建帖子
POST /api/integrations/posts
Headers: X-Drafty-API-Key: your_key
Body: {
"title": "string",
"content": "markdown string",
"visibility": "public|unlisted|private",
"tags": ["string"]
}列出帖子
GET /api/integrations/posts?limit=10
Headers: X-Drafty-API-Key: your_key更新帖子
PATCH /api/integrations/posts/{postId}
Headers: X-Drafty-API-Key: your_key
Body: {
"title": "string",
"content": "markdown string",
"visibility": "public|unlisted|private",
"tags": ["string"]
}网页集成
寻找基于网络的集成方案?
故障排除
“无效的API密钥”错误
- 确认您拥有一个Drafty Pro账户
- 检查您的API密钥是否以以下内容开头
drafty_ - 确保键中没有多余空格
- 请尝试在设置中重新生成您的API密钥
MCP 服务器未显示在 Claude 桌面版中
- 检查
claude_desktop_config.json是有效的JSON - 验证API密钥是否已设置
env部分;章节 - 完全重启Claude桌面版
- 检查日志:
~/Library/Logs/Claude/mcp*.log(macOS)
代理技能未激活
- 确保技能目录位于Claude Code的路径中
- 检查
DRAFTY_API_KEY环境变量已设置 - 验证
SKILL.md具有正确的YAML前置信息(或:元数据) - 重启Claude代码
速率限制
- 免费试用:每小时10条帖子
- 专业用户:更高的限制(或上限)
- 如果达到限制,请等待并重试
贡献
发现了一个错误或者想贡献一份力量?
- 为这个仓库创建分支
- 创建一个特性分支
- 提交拉取请求
支持
- 漏风问题support@drafty.com(翻译为中文表达习惯可保持原样,因为这是电子邮件地址,无需翻译,但若要说明其用途,可以说:“这是Drafty的客服邮箱:support@drafty.com”)
- MCP问题:
- MCP协议https://github.com/anthropics/mcp/issues 的中文翻译是:“GitHub 上 anthropics/mcp 项目的 Issues 页面”
许可证
麻省理工学院(MIT)
链接
- Drafty.com(可译为“草稿网”或根据具体语境调整,但“Drafty”一词本身带有“草稿、草案”之意,因此“草稿网”是一个较为直白的翻译)
- 不完善的文档
- MCP 文档
- 代理技能指南
- Anthropic Claude(注:此处“Anthropic”为公司名,可译为“安萨里特”或保留原名,根据上下文选择;“Claude”为该公司的AI模型名,可直接译为“克劳德”)
______________________________________________________________________
为Drafty社区倾心打造
