npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@docuwriter-ai/mcp-client

v1.2.4

Published

MCP client for DocuWriter.ai - enables AI assistants to generate documentation and search documentation spaces

Readme

DocuWriter.ai MCP Client

DocuWriter.ai Logo

A Model Context Protocol (MCP) client that enables AI assistants like Cursor, Claude, and ChatGPT to interact with DocuWriter.ai for documentation generation and space management.

Features

  • User Management: Get user information and authentication status
  • Space Management: List and search documentation spaces
  • Document Search: Search within specific documentation spaces
  • Code Generation: Generate documentation, tests, and optimizations for source code
  • Multi-File Documentation: Generate comprehensive documentation for multiple source files with token validation
  • Complete CRUD Operations: Create, read, update, and delete documents in spaces

Installation

🚀 One-Command Setup (Recommended)

Install the MCP client AND AI assistant rules in one command from your project folder:

[!IMPORTANT] Run these commands from your project's root directory where you want the AI rules to be installed.

# Navigate to your project directory first
cd /path/to/your/project

# Install for Cursor
npx @docuwriter-ai/mcp-client install cursor

# Install for Claude Desktop  
npx @docuwriter-ai/mcp-client install claude

# Install for VS Code
npx @docuwriter-ai/mcp-client install vscode

# Install for all environments
npx @docuwriter-ai/mcp-client install all

# Interactive installation (prompts you to choose)
npx @docuwriter-ai/mcp-client install

From npm

npm install -g @docuwriter-ai/mcp-client

From source

git clone https://github.com/DocuWriter-ai/mcp-client.git
cd mcp-client
npm install
npm link

🤖 What This Installs

Environment-Specific AI Rules & MCP Configuration:

  • Cursor:
    • AI Rules: .cursor/rules/docuwriter-mcp.mdc with alwaysApply: true
    • MCP Config: .cursor/mcp.json
  • Claude Desktop:
    • AI Rules: CLAUDE.md (root directory)
    • MCP Config: .mcp.json
  • VS Code:
    • MCP Config: .vscode/mcp.json (no AI rules support)

Smart AI Guidance:

  • When and how to use DocuWriter.ai MCP tools effectively
  • Best practices for code documentation workflows
  • Smart tool selection for different scenarios
  • Error handling and optimization strategies
  • Complete workflow examples

Benefits:

  • 🎯 Smarter tool usage - AI knows which tool to use for specific tasks
  • 🔄 Complete workflows - AI can handle end-to-end documentation processes
  • 🛡️ Error prevention - Built-in best practices prevent common issues
  • 📈 Better results - Optimized prompts and strategies for higher quality output
  • Always applies - Rules are automatically applied to all conversations

Quick Install

Add DocuWriter.ai MCP server to Cursor:

Install MCP Server

Getting Your API Token

  1. Log into your DocuWriter.ai account
  2. Go to your profile/settings
  3. Navigate to API tokens section
  4. Create a new token or copy an existing one
  5. When installing the MCP server, Cursor will automatically prompt you to enter your API token in the Environment Variables section

Configuration

Environment Variables

  • DOCUWRITER_API_TOKEN (required): Your DocuWriter.ai API token

Automatic MCP Configuration

The installer automatically writes MCP server configurations to the appropriate files for each environment. The configuration uses npx --yes @docuwriter-ai/mcp-client@latest which ensures the latest version is always fetched:

Important: The MCP configuration automatically updates to the latest version when the server starts, thanks to the @latest version specifier. However, if you want to update the AI rules (Cursor rules, Claude guidelines), you need to re-run the install command.

Cursor (.cursor/mcp.json):

{
  "mcpServers": {
    "docuwriter": {
      "command": "npx",
      "args": ["--yes", "@docuwriter-ai/mcp-client@latest", "start"],
      "env": {
        "DOCUWRITER_API_TOKEN": "your_token_here"
      }
    }
  }
}

Claude Desktop (.mcp.json):

{
  "mcpServers": {
    "docuwriter": {
      "command": "npx",
      "args": ["--yes", "@docuwriter-ai/mcp-client@latest", "start"],
      "env": {
        "DOCUWRITER_API_TOKEN": "your_token_here"
      }
    }
  }
}

VS Code (.vscode/mcp.json):

{
  "servers": {
    "docuwriter": {
      "command": "npx",
      "args": ["--yes", "@docuwriter-ai/mcp-client@latest", "start"],
      "env": {
        "DOCUWRITER_API_TOKEN": "your_token_here"
      }
    }
  }
}

Note: The installer preserves existing MCP configurations and adds DocuWriter.ai alongside them.

Available Tools

User & Space Management

get_user_info

Get current user information from DocuWriter.ai.

Parameters: None

Example:

Use get_user_info to check my account status

report_feedback

Report feedback from the user on what would make DocuWriter.ai better.

Parameters:

  • feedback (string, required): Detailed feedback from the user on what would make DocuWriter.ai better (minimum 10 characters)

Example:

Report feedback: "The MCP integration is great but I'd love to see support for more IDEs"

list_spaces

List all documentation spaces for the authenticated user.

Parameters: None

Example:

Show me all my documentation spaces

search_space_documents

Search for documents within a specific documentation space.

Parameters:

  • space_id (integer, required): ID of the space to search in
  • query (string, required): Search query (minimum 2 characters)
  • page (integer, optional): Page number for pagination (default: 1)
  • per_page (integer, optional): Number of results per page (default: 20, max: 100)
  • highlight (boolean, optional): Whether to highlight search terms (default: true)

Example:

Search for "authentication" in space 123

Code Generation Tools

⚠️ Processing time notice: All generation tools use advanced AI models and typically take time to complete, depending on code complexity and file size. Please be patient during processing.

generate_code_documentationMulti-File Support

Generate comprehensive documentation for source code files.

Parameters:

  • files (array, required): Array of file objects, each containing:

    • filename (string, required): Name of the file
    • source_code (string, required): Source code content
  • output_language (string, optional): Language for documentation (default: "English")

  • documentation_type (string, optional): Type of documentation to generate

  • additional_instructions (string, optional): Additional instructions

  • name (string, optional): Name for the generated documentation

Features:

  • Multi-File Support: Process multiple files in a single request
  • Smart Context: Analyzes relationships between files for comprehensive documentation

Example (Single File):

Generate documentation for this React component:
files: [{"filename": "UserProfile.jsx", "source_code": "[paste your code here]"}]
name: User Profile Component Documentation

Example (Multiple Files):

Generate documentation for this API:
files: [
  {"filename": "UserController.php", "source_code": "[controller code]"},
  {"filename": "UserModel.php", "source_code": "[model code]"},
  {"filename": "UserService.php", "source_code": "[service code]"}
]
documentation_type: API Documentation

generate_code_tests

Generate comprehensive test suites for source code.

Parameters:

  • source_code (string, required): The source code to generate tests for
  • filename (string, required): Name of the file to test
  • test_type (string, optional): "Unit", "Integration", "Feature", or "All" (default: "Unit")
  • test_framework (string, optional): Testing framework to use
  • additional_instructions (string, optional): Additional instructions
  • name (string, optional): Name for the generated tests

Example:

Generate unit tests for this function:
source_code: "[paste your code here]"
filename: calculator.js
test_framework: Jest
name: Calculator Function Tests

generate_code_optimization

Generate optimized versions of source code.

Parameters:

  • source_code (string, required): The source code to optimize
  • filename (string, required): Name of the file to optimize
  • optimization_focus (string, optional): "Performance", "Readability", "Security", "Memory", or "All" (default: "Performance")
  • additional_instructions (string, optional): Additional optimization instructions
  • name (string, optional): Name for the optimized code

Example:

Optimize this code for performance:
source_code: "[paste your code here]"
filename: data-processor.py
optimization_focus: Performance
name: Optimized Data Processor

Space Document Management (CRUD Operations)

create_space_document

Create a new document in a DocuWriter.ai space.

Parameters:

  • space_id (string, required): The ID of the space to create the document in
  • title (string, required): The title of the document
  • content (string, required): The content of the document (markdown or plain text)
  • type (string, optional): Content type - "blank" (default) or "markdown"
  • parent_id (string, optional): The ID of the parent folder
  • path (string, optional): Folder path for the document (e.g., "docs/api") - creates folders if they don't exist

Example:

Create a new document in space 123 with title "API Guide" and content "# API Guide\n\nThis is a comprehensive guide..."

get_space_document

Retrieve a specific document from a space.

Parameters:

  • space_id (string, required): The ID of the space containing the document
  • document_id (string, required): The ID of the document to retrieve

Response: Returns both markdown content and raw Editor.js format

update_space_document

Update an existing document in a space.

Parameters:

  • space_id (string, required): The ID of the space containing the document
  • document_id (string, required): The ID of the document to update
  • title (string, required): The new title of the document
  • content (string, required): The new content of the document
  • type (string, optional): Content type - "blank" or "markdown"
  • parent_id (string, optional): The ID of the parent folder (null to move to root)

delete_space_document

Delete a document from a space.

Parameters:

  • space_id (string, required): The ID of the space containing the document
  • document_id (string, required): The ID of the document to delete

Response: Returns confirmation with deleted document details

Advanced Workflow Tools

generate_and_add_documentationRecommended Workflow

Generate documentation using DocuWriter.ai AI and automatically add it to a space.

Parameters:

  • space_id (string, required): The ID of the space to add the documentation to
  • files (array, required): Array of file objects, each containing:
    • filename (string, required): Name of the file
    • source_code (string, required): Source code content of the file
  • title (string, required): Title for the document in the space
  • output_language (string, optional): Output language for documentation
  • documentation_type (string, optional): Type of documentation to generate
  • additional_instructions (string, optional): Additional instructions for documentation generation
  • name (string, optional): Optional custom name for the generated documentation for better searchability
  • parent_id (string, optional): The ID of the parent folder
  • path (string, optional): Folder path for the document

Workflow: This tool handles the complete process from generation to space addition automatically.

Example (Single File):

Generate documentation for my API code and add it to my project space:
files: [{"filename": "UserController.php", "source_code": "[paste your code here]"}]
title: User Controller Documentation

Example (Multiple Files):

Generate documentation for my API and add it to my project space:
files: [
  {"filename": "UserController.php", "source_code": "[controller code]"},
  {"filename": "UserModel.php", "source_code": "[model code]"},
  {"filename": "UserService.php", "source_code": "[service code]"}
]
title: User API Documentation

Processing Times & Best Practices

Generation Tool Performance

All DocuWriter.ai generation tools use advanced AI models to analyze and process your code. Here's what to expect:

| Tool | Typical Processing Time | Factors Affecting Speed | |------|------------------------|------------------------| | Code Documentation | 30 sec - 2 min | File size, code complexity, number of files | | Test Generation | 30 sec - 2 min | Code complexity, test coverage requirements | | Code Optimization | 30 sec - 2 min | Code size, optimization focus (performance/readability) | | Language Conversion | 30 sec - 2 min | Source language, target language, code complexity |

Best Practices for Faster Processing

  1. Optimize File Size: Keep individual files under 500KB for best performance
  2. Use Multi-File Support: For related files, use the multi-file documentation tool instead of separate requests
  3. Provide Clear Instructions: Specific additional instructions help the AI work more efficiently
  4. Batch Similar Requests: Group related generation tasks together

What Happens During Processing

  • Code Analysis: AI analyzes your code structure, dependencies, and patterns
  • Context Understanding: Builds comprehensive understanding of your codebase
  • Generation: Creates high-quality, contextual output based on analysis
  • Quality Assurance: Ensures output meets your specified requirements

Handling Long Processing Times

  • Don't Interrupt: Let the process complete to avoid partial results
  • Check File Size: Large files (>1MB) may take longer to process
  • Monitor Progress: The MCP client will show progress updates during generation
  • Contact Support: If processing consistently takes >3 minutes, contact support

🔄 Updating

MCP Server Updates

The MCP server automatically updates to the latest version thanks to the @latest version specifier in the configuration. No manual action required!

AI Rules Updates

To get the latest AI assistant rules (Cursor rules, Claude guidelines), re-run the install command:

npx @docuwriter-ai/mcp-client install cursor

This will update the rules with the latest improvements and best practices.

Troubleshooting

Authentication Issues

  • Verify your DOCUWRITER_API_TOKEN is correct
  • Check that your token has the necessary permissions
  • Ensure you're not hitting rate limits

Testing with MCP Inspector

npx @modelcontextprotocol/inspector src/index.js

Support

License

MIT License - see LICENSE file for details.