# docs-mcp
**Version:** 1.0.0
**Date:** 2025-10-08
**Maintainer:** willh
## Overview
docs-mcp is a Model Context Protocol (MCP) server that provides AI assistants with structured documentation generation capabilities. It offers access to professional documentation templates based on the POWER framework (Purpose, Output, Work, Examples, Requirements) and prompt engineering frameworks.
This server enables AI assistants to:
- Access standardized documentation templates for README, Architecture, API, Components, and Schema docs
- Retrieve prompt framework documentation (POWER, COSTAR, Five S, CRISPE)
- Generate consistent, professional documentation across projects
## Prerequisites
- Python 3.10 or higher
- MCP-compatible AI client (Claude Desktop, Claude Code CLI, etc.)
- pip package manager
## Installation
### Quick Install
```bash
# Install using Claude MCP CLI
claude mcp add docs-mcp python "C:\Users\willh\.mcp-servers\docs-mcp\server.py"
```
### Manual Installation
1. Clone or download the docs-mcp server to your MCP servers directory:
```bash
cd C:\Users\willh\.mcp-servers
```
2. Ensure the server structure includes:
```
docs-mcp/
├── server.py
├── templates/
│ └── power/
│ ├── readme.txt
│ ├── architecture.txt
│ ├── api.txt
│ ├── components.txt
│ └── schema.txt
└── frameworks/
└── [framework documentation files]
```
3. Add to your MCP configuration (`claude_desktop_config.json` or similar):
```json
{
"mcpServers": {
"docs-mcp": {
"command": "python",
"args": ["C:\Users\willh\.mcp-servers\docs-mcp\server.py"]
}
}
}
```
## Available Tools
### 1. list_templates
Lists all available POWER framework documentation templates.
**Usage:**
```
list_templates()
```
**Returns:**
- readme
- architecture
- api
- components
- schema
### 2. get_template
Retrieves the full content of a specific documentation template.
**Usage:**
```
get_template(template_name="readme")
```
**Parameters:**
- `template_name` (required): One of: `readme`, `architecture`, `api`, `components`, `schema`
**Returns:** The complete template content with POWER framework structure
### 3. list_frameworks
Lists available prompt framework documentation files.
**Usage:**
```
list_frameworks()
```
**Returns:** List of framework documentation files with sizes
## Template Structure
All templates follow the **POWER Framework**:
- **P**urpose: Define the document's objective
- **O**utput: Specify required format and structure
- **W**ork: Outline the process and what to analyze
- **E**xamples: Provide concrete samples
- **R**equirements: List mandatory elements
Each template includes:
- `framework`: POWER
- `purpose`: Document objective
- `output`: Required format with headers/footers
- `work`: Analysis steps (scan, analyze, document)
- `examples`: Practical usage samples
- `requirements`: Must-have elements
- `save_as`: Default filename
- `store_as`: Storage reference name
## Usage Examples
### Example 1: Generate a README
```python
# List available templates
templates = list_templates()
# Get README template
template = get_template(template_name="readme")
# Use template to generate README.md for your project
# The template guides structure and content requirements
```
### Example 2: Architecture Documentation
```python
# Get architecture template
arch_template = get_template(template_name="architecture")
# Follow the template structure to document:
# - System overview
# - Component relationships
# - Data flow diagrams
# - Technology stack
```
### Example 3: API Documentation
```python
# Get API template
api_template = get_template(template_name="api")
# Document endpoints following template:
# - Authentication methods
# - Request/response formats
# - Error handling patterns
```
## Troubleshooting
### Issue: Templates not found
**Error:** `No templates found in templates/power/`
**Resolution:**
1. Verify templates directory exists: `C:\Users\willh\.mcp-servers\docs-mcp\templates\power\`
2. Ensure .txt template files are present (readme.txt, architecture.txt, etc.)
3. Check file permissions - templates must be readable
### Issue: Server not responding
**Error:** MCP connection timeout or server unresponsive
**Resolution:**
1. Verify Python 3.10+ is installed: `python --version`
2. Check server.py path in MCP configuration
3. Test server manually: `python C:\Users\willh\.mcp-servers\docs-mcp\server.py`
4. Review MCP server logs for detailed error messages
### Issue: Invalid template name
**Error:** `Template 'xyz' not found`
**Resolution:**
- Use only valid template names: `readme`, `architecture`, `api`, `components`, `schema`
- Template names are case-sensitive (use lowercase)
- Use `list_templates()` to see available options
## Project Structure
```
docs-mcp/
├── server.py # Main MCP server implementation
├── templates/
│ └── power/ # POWER framework templates
│ ├── readme.txt # README documentation template
│ ├── architecture.txt # Architecture doc template
│ ├── api.txt # API documentation template
│ ├── components.txt # Components doc template
│ └── schema.txt # Schema documentation template
├── frameworks/ # Prompt framework documentation
└── README.md # This file
```
## Development
### Adding New Templates
1. Create a new `.txt` file in `templates/power/`
2. Follow POWER framework structure:
```
framework: POWER
purpose: [Define purpose]
output: [Specify format]
work: [Outline process]
examples: [Provide samples]
requirements: [List must-haves]
save_as: [filename]
store_as: [reference name]
```
3. Add enum value to server.py line 46
4. Restart MCP server
### Server Architecture
- Built on MCP SDK for Python
- Async I/O using asyncio
- Stdio transport for client communication
- File-based template storage
- Zero external dependencies beyond MCP SDK
## License
[Specify license here]
---
**AI Integration Footer**
This MCP server is optimized for AI assistant integration. It provides structured templates that guide documentation generation with consistent quality and format. Templates include decision trees for content selection and command sequences for implementation.
For AI assistants: Use the POWER framework templates to ensure comprehensive, well-structured documentation. Follow the `work` section for systematic analysis and the `requirements` section for mandatory elements.
**🤖 This README was generated using the docs-mcp POWER framework template**
---
**Support:** For issues or questions, consult the troubleshooting section above or review MCP server logs.