@docuwriter-ai/mcp-client
v1.2.4
Published
MCP client for DocuWriter.ai - enables AI assistants to generate documentation and search documentation spaces
Maintainers
Readme
DocuWriter.ai MCP Client

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 installFrom npm
npm install -g @docuwriter-ai/mcp-clientFrom 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.mdcwithalwaysApply: true - MCP Config:
.cursor/mcp.json
- AI Rules:
- Claude Desktop:
- AI Rules:
CLAUDE.md(root directory) - MCP Config:
.mcp.json
- AI Rules:
- VS Code:
- MCP Config:
.vscode/mcp.json(no AI rules support)
- MCP Config:
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:
Getting Your API Token
- Log into your DocuWriter.ai account
- Go to your profile/settings
- Navigate to API tokens section
- Create a new token or copy an existing one
- 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 statusreport_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 spacessearch_space_documents
Search for documents within a specific documentation space.
Parameters:
space_id(integer, required): ID of the space to search inquery(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 123Code 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_documentation ⭐ Multi-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 filesource_code(string, required): Source code content
output_language(string, optional): Language for documentation (default: "English")documentation_type(string, optional): Type of documentation to generateadditional_instructions(string, optional): Additional instructionsname(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 DocumentationExample (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 Documentationgenerate_code_tests
Generate comprehensive test suites for source code.
Parameters:
source_code(string, required): The source code to generate tests forfilename(string, required): Name of the file to testtest_type(string, optional): "Unit", "Integration", "Feature", or "All" (default: "Unit")test_framework(string, optional): Testing framework to useadditional_instructions(string, optional): Additional instructionsname(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 Testsgenerate_code_optimization
Generate optimized versions of source code.
Parameters:
source_code(string, required): The source code to optimizefilename(string, required): Name of the file to optimizeoptimization_focus(string, optional): "Performance", "Readability", "Security", "Memory", or "All" (default: "Performance")additional_instructions(string, optional): Additional optimization instructionsname(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 ProcessorSpace 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 intitle(string, required): The title of the documentcontent(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 folderpath(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 documentdocument_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 documentdocument_id(string, required): The ID of the document to updatetitle(string, required): The new title of the documentcontent(string, required): The new content of the documenttype(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 documentdocument_id(string, required): The ID of the document to delete
Response: Returns confirmation with deleted document details
Advanced Workflow Tools
generate_and_add_documentation ⭐ Recommended 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 tofiles(array, required): Array of file objects, each containing:filename(string, required): Name of the filesource_code(string, required): Source code content of the file
title(string, required): Title for the document in the spaceoutput_language(string, optional): Output language for documentationdocumentation_type(string, optional): Type of documentation to generateadditional_instructions(string, optional): Additional instructions for documentation generationname(string, optional): Optional custom name for the generated documentation for better searchabilityparent_id(string, optional): The ID of the parent folderpath(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 DocumentationExample (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 DocumentationProcessing 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
- Optimize File Size: Keep individual files under 500KB for best performance
- Use Multi-File Support: For related files, use the multi-file documentation tool instead of separate requests
- Provide Clear Instructions: Specific additional instructions help the AI work more efficiently
- 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 cursorThis will update the rules with the latest improvements and best practices.
Troubleshooting
Authentication Issues
- Verify your
DOCUWRITER_API_TOKENis 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.jsSupport
- Documentation: DocuWriter.ai Docs
- Issues: GitHub Issues
- Support: DocuWriter.ai Support
License
MIT License - see LICENSE file for details.
