DeepWriter MCP

Using DeepWriter MCP

The DeepWriter Model Context Protocol (MCP) server allows you to seamlessly integrate DeepWriter's content generation capabilities with Claude and other MCP-compatible AI assistants. This guide will help you set up and use the DeepWriter MCP server.

Prerequisites

Before getting started, ensure you have:

  • Node.js (v17 or higher)

  • npm (v6 or higher)

  • A DeepWriter API key (see Getting Your API Key)

  • An MCP-compatible client (such as Claude for Desktop)

Installation

  1. Clone the repository:

    bashgit clone https://github.com/yourusername/deepwriter-mcp.gitcd deepwriter-mcp
  2. Install dependencies:

    bashnpm install
  3. Create a .env file in the root directory with your DeepWriter API key:

    DEEPWRITER_API_KEY=your_api_key_here
  4. Build the project:

    bashnpm run build

Integration with Claude for Desktop

To connect the DeepWriter MCP server with Claude for Desktop:

  1. Open your Claude for Desktop configuration file:

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

    • Windows: %APPDATA%\Claude\claude_desktop_config.json

  2. Add the server configuration:

  3. Restart Claude for Desktop to load the new configuration.

Using DeepWriter Tools with Claude

Once you've set up the MCP server, you can use DeepWriter's features directly within Claude. Here are some examples:

Listing Your Projects

To see all your DeepWriter projects, ask Claude:

Claude will use the listProjects tool to fetch and display your projects.

Creating a New Project

To create a new project, you can say:

Claude will use the createProject tool to set up your new project.

Getting Project Details

To view details about a specific project:

Claude will retrieve the project information using the getProjectDetails tool.

Updating a Project

To update an existing project:

Claude will use the updateProject tool to modify your project.

Generating Content

To generate content for a project:

Claude will use the generateWork tool to create new content based on your project settings.

Deleting a Project

To delete a project:

Claude will confirm and then use the deleteProject tool to remove the project.

Troubleshooting

Common Issues

  1. API Key Problems:

    • Ensure your DeepWriter API key is correctly set in both the .env file and Claude configuration

    • Verify the API key has not expired (remember, keys are only viewable on creation)

  2. Connection Issues:

    • Check that your MCP server is running before trying to use it with Claude

    • Verify the path to your build directory is correct in the Claude configuration

  3. Tool Execution Errors:

    • Double-check parameter names and formats when making requests

    • Ensure project IDs are valid when referencing existing projects

Debugging

For additional debugging information, run the server with the DEBUG environment variable:

You can also check Claude for Desktop logs at:

  • macOS: ~/Library/Logs/Claude/mcp*.log

  • Windows: %APPDATA%\Claude\logs\mcp*.log

Advanced Usage

Using Environment Variables

Instead of hardcoding your API key in the Claude configuration, you can reference environment variables:

This approach allows you to manage sensitive credentials more securely.

Batch Operations

You can perform batch operations by asking Claude to execute multiple actions in sequence:

Claude will execute these operations in order and provide the results of each.

Next Steps

Last updated