DeepWriter MCP Server

Integrations

  • Supports environment variable configuration through .env files for storing API keys and other configuration settings.

  • Offers a Discord community for contributors to get help and engage with the project.

  • Uses ESLint for code style enforcement and static analysis as part of development guidelines.

DeepWriter MCP 服务器

用于与 DeepWriter API 交互的模型上下文协议 (MCP) 服务器。该服务器通过标准化的 MCP 接口提供用于创建、管理和生成 DeepWriter 项目内容的工具。

特征

  • 项目管理:创建、列出、更新和删除项目
  • 内容生成:使用 DeepWriter 的 AI 为项目生成内容
  • 项目详情:检索有关项目的详细信息
  • MCP 集成:与 Claude 和其他兼容 MCP 的 AI 助手无缝集成
  • 标准 MCP 功能:实现 MCP 协议版本 2025-03-26
  • 传输支持:用于本地进程通信的 Stdio 传输

先决条件

  • Node.js(v17 或更高版本)
  • npm(v6 或更高版本)
  • DeepWriter API 密钥
  • 与 MCP 兼容的客户端(例如 Claude for Desktop)

安装

  1. 克隆存储库:
    git clone https://github.com/yourusername/deepwriter-mcp.git cd deepwriter-mcp
  2. 安装依赖项:
    npm install
  3. 使用您的 DeepWriter API 密钥在根目录中创建一个.env文件:
    DEEPWRITER_API_KEY=your_api_key_here
  4. 构建项目:
    npm run build

用法

启动服务器

启动 MCP 服务器:

node build/index.js

服务器将按照 MCP stdio 传输规范在 stdin 上监听 MCP 请求并在 stdout 上做出响应。

连接到 Claude 桌面版

要将 DeepWriter MCP 服务器与 Claude for Desktop 一起使用:

  1. 打开您的 Claude for Desktop 配置文件:
    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
  2. 添加服务器配置:
    { "mcpServers": { "deepwriter": { "command": "node", "args": ["/ABSOLUTE/PATH/TO/deepwriter-mcp/build/index.js"], "env": { "DEEPWRITER_API_KEY": "your_api_key_here" } } } }
  3. 重新启动 Claude for Desktop 以加载新配置。

MCP 协议支持

该服务器实现了 MCP 协议版本 2025-03-26,具有以下功能:

  • 传输:用于本地进程通信的 Stdio 传输
  • 工具:全面支持所有 DeepWriter API 操作
  • 日志记录:具有可配置级别的结构化日志记录

可用工具

1. 列出项目

列出与您的 DeepWriter 帐户相关的所有项目。

{ "api_key": "your_api_key_here" }
2. 获取项目详细信息

检索有关特定项目的详细信息。

{ "api_key": "your_api_key_here", "project_id": "your_project_id_here" }
3. 创建项目

创建具有指定标题和电子邮件的新项目。

{ "api_key": "your_api_key_here", "title": "Your Project Title", "email": "your_email@example.com" }
4. 更新项目

使用指定的更改更新现有项目。

{ "api_key": "your_api_key_here", "project_id": "your_project_id_here", "updates": { "title": "Updated Project Title", "prompt": "Updated project prompt", "author": "Updated author name", "email": "updated@email.com", "model": "Updated model name", "outline_text": "Updated outline", "style_text": "Updated style guide", "supplemental_info": "Updated additional information", "work_description": "Updated work description", "work_details": "Updated work details", "work_vision": "Updated work vision" } }
5. 生成工作

使用 DeepWriter 的 AI 为项目生成内容。

{ "api_key": "your_api_key_here", "project_id": "your_project_id_here", "is_default": true // Optional, defaults to true }
6. 删除项目

删除项目。

{ "api_key": "your_api_key_here", "project_id": "your_project_id_here" }

发展

项目结构

deepwriter-mcp/ ├── src/ │ ├── index.ts # Main entry point and MCP server setup │ ├── api/ │ │ └── deepwriterClient.ts # DeepWriter API client │ └── tools/ # MCP tool implementations │ ├── createProject.ts │ ├── deleteProject.ts │ ├── generateWork.ts │ ├── getProjectDetails.ts │ ├── listProjects.ts │ └── updateProject.ts ├── build/ # Compiled JavaScript output ├── test-deepwriter-tools.js # Tool testing script ├── test-mcp-client.js # MCP client testing script └── tsconfig.json # TypeScript configuration

建筑

npm run build

这会将 TypeScript 代码编译为build目录中的 JavaScript。

测试

您可以使用提供的测试脚本在本地测试 MCP 服务器:

node test-mcp-client.js

或者

node test-deepwriter-tools.js

TypeScript 配置

该项目使用 TypeScript、ES 模块和 Node16 模块解析。关键 TypeScript 设置:

{ "compilerOptions": { "target": "ES2022", "module": "Node16", "moduleResolution": "Node16", "outDir": "./build", "strict": true } }

故障排除

常见问题

  1. API 密钥问题
    • 确保您的 DeepWriter API 密钥在.env文件中正确设置
    • 检查 API 密钥是否在工具参数中正确传递
    • 验证 API 密钥是否具有必要的权限
  2. 连接问题
    • 确保 DeepWriter API 可以通过你的网络访问
    • 检查任何可能阻止连接的防火墙或代理设置
    • 验证网络连接是否稳定
  3. MCP 协议问题
    • 确保您使用的是兼容的 MCP 客户端
    • 检查 stdio 传输是否正确配置
    • 验证客户端是否支持协议版本 2025-03-26
  4. 参数命名
    • 服务器支持 snake_case ( project_id ) 和 camelCase ( projectId ) 参数名称
    • 所有参数区分大小写
    • 必需参数不能为空或未定义

调试

要获得详细日志,请使用 DEBUG 环境变量运行服务器:

DEBUG=deepwriter-mcp:* node build/index.js

您还可以在以下位置检查 Claude for Desktop 日志:

  • macOS: ~/Library/Logs/Claude/mcp*.log
  • Windows: %APPDATA%\Claude\logs\mcp*.log

贡献

欢迎社区贡献力量!您可以通过以下方式提供帮助:

提交问题

  1. 错误报告
    • 使用 GitHub 问题跟踪器
    • 包含重现错误的详细步骤
    • 提供您的环境详细信息(Node.js 版本、操作系统等)
    • 包含相关日志和错误消息
    • 使用提供的错误报告模板
  2. 功能请求
    • 使用带有“增强”标签的 GitHub 问题跟踪器
    • 清晰地描述该功能及其用例
    • 解释它如何使项目受益
    • 使用提供的功能请求模板
  3. 安全问题
    • 对于安全漏洞,请不要创建公共问题
    • 请发送电子邮件至 security@deepwriter.com
    • 我们将与您合作解决该漏洞
    • 我们遵循负责任的披露惯例

拉取请求

  1. 开始之前
    • 检查现有问题和 PR,以避免重复工作
    • 对于重大变更,请先开 issue 讨论
    • 阅读我们的编码标准和 MCP 实施指南
  2. 开发过程
    • 分叉存储库
    • main创建新分支
    • 遵循我们的编码风格和约定
    • 添加新功能测试
    • 根据需要更新文档
  3. 公共关系要求
    • 包括清晰的变更描述
    • 链接相关问题
    • 添加或更新测试
    • 更新文档
    • 遵循提交消息约定
    • 签署贡献者许可协议(CLA)
  4. 代码审查
    • 所有 PR 至少需要一次审核
    • 解决评论反馈
    • 保持 PR 的重点和规模合理
    • 对问题和评论做出回应

开发指南

  1. 代码风格
    • 遵循 TypeScript 最佳实践
    • 将 ESLint 与我们的配置结合使用
    • 使用 Prettier 格式化代码
    • 遵循MCP协议规范
  2. 测试
    • 为新功能编写单元测试
    • 保持或提高测试覆盖率
    • 测试 MCP 协议合规性
    • 使用多个 Node.js 版本进行测试
  3. 文档
    • 更新 README.md 以了解面向用户的更改
    • 为新代码添加 JSDoc 注释
    • 更新 API 文档
    • 包括新功能的示例
  4. 提交消息
    • 遵循常规提交格式
    • 适当时参考问题
    • 保持提交的集中性和原子性
    • 使用清晰的描述性信息

获取帮助

  • 加入我们的 Discord 社区
  • 检查文档
  • 在 GitHub 讨论中提问
  • 参加我们每月的贡献者电话会议

安全

  • 服务器在处理之前验证所有输入
  • API 密钥永远不会记录或暴露在错误消息中
  • stdio 传输提供进程隔离
  • 所有外部 API 调用均使用 HTTPS
  • 输入验证可防止注入攻击

执照

麻省理工学院

You must be authenticated.

A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

通过标准化的模型上下文协议接口为 DeepWriter 项目提供创建、管理和生成内容的工具。

  1. 特征
    1. 先决条件
      1. 安装
        1. 用法
          1. 启动服务器
          2. 连接到 Claude 桌面版
          3. MCP 协议支持
          4. 可用工具
        2. 发展
          1. 项目结构
          2. 建筑
          3. 测试
          4. TypeScript 配置
        3. 故障排除
          1. 常见问题
          2. 调试
        4. 贡献
          1. 提交问题
          2. 拉取请求
          3. 开发指南
          4. 获取帮助
        5. 安全
          1. 执照

            Related MCP Servers

            • A
              security
              A
              license
              A
              quality
              A Model Context Protocol server that provides tools for code modification and generation via Large Language Models, allowing users to create, modify, rewrite, and delete files using structured XML instructions.
              Last updated -
              12
              Python
              MIT License
              • Linux
              • Apple
            • A
              security
              A
              license
              A
              quality
              A powerful Model Context Protocol framework that extends Cursor IDE with tools for web content retrieval, PDF processing, and Word document parsing.
              Last updated -
              8
              8
              Python
              MIT License
              • Linux
              • Apple
            • A
              security
              A
              license
              A
              quality
              A Model Context Protocol server that enables AI assistants to interact with Confluence content, supporting operations like retrieving, searching, creating, and updating pages and spaces.
              Last updated -
              9
              3
              TypeScript
              MIT License
            • A
              security
              A
              license
              A
              quality
              A Model Context Protocol server that enables AI assistants to create, read, edit, and format Microsoft Word documents through standardized tools and resources.
              Last updated -
              16
              88
              Python
              MIT License
              • Apple

            View all related MCP servers

            ID: 70lk04lzkt