Installation Guide¶
This guide walks you through installing and setting up the AutoDocs MCP Server for different AI clients and development environments.
Quick Start¶
The fastest way to get started is installing from PyPI:
MCP Client Configuration¶
Configure AutoDocs with your preferred AI client:
Claude Code Sessions¶
For temporary sessions in Claude Code:
# 1. Install the server globally
uv tool install autodoc-mcp
# 2. Start the server (available globally)
autodoc-mcp
# 3. Server provides 8 MCP tools automatically
Session Persistence
In Claude Code sessions, you'll need to install and start the server each time. The global autodoc-mcp
command is available after installation.
Claude Desktop¶
Configure Claude Desktop by editing your claude_desktop_config.json
:
Location: ~/Library/Application Support/Claude/claude_desktop_config.json
Location: %APPDATA%/Claude/claude_desktop_config.json
Cursor Desktop¶
Add AutoDocs to Cursor via Settings → Rules for AI → MCP Servers:
{
"mcpServers": {
"autodoc-mcp": {
"command": "autodoc-mcp",
"env": {
"CACHE_DIR": "~/.cache/autodoc-mcp",
"LOG_LEVEL": "INFO",
"MAX_DEPENDENCY_CONTEXT": "8"
}
}
}
}
Continue.dev¶
For Continue.dev integration, add to your config.json
:
{
"mcpServers": [
{
"name": "autodoc-mcp",
"command": "autodoc-mcp",
"env": {
"CACHE_DIR": "~/.cache/autodoc-mcp",
"LOG_LEVEL": "INFO"
}
}
]
}
Generic MCP Client Configuration¶
For other MCP clients that support the standard configuration format:
{
"mcpServers": {
"autodoc-mcp": {
"command": "python",
"args": ["-m", "autodocs_mcp.main"],
"cwd": "/path/to/autodoc-mcp",
"env": {
"CACHE_DIR": "~/.cache/autodoc-mcp",
"LOG_LEVEL": "INFO",
"MAX_CONCURRENT": "10",
"MAX_DEPENDENCY_CONTEXT": "8"
}
}
}
}
Custom Installation Path
If you installed AutoDocs in a custom location or are running from source, adjust the command
and args
accordingly.
Installation Verification¶
Test Manual Startup¶
Verify the installation by starting the server manually:
Expected output:
[INFO] Starting AutoDocs MCP Server v0.4.2
[INFO] FastMCP server initialized with 8 tools
[INFO] Ready for MCP connections
Test MCP Tools¶
Once configured with your AI client, test these commands:
-
Test dependency scanning:
This should use thescan_dependencies
tool. -
Test documentation context:
This should use theget_package_docs_with_context
tool. -
Test cache status:
This should use theget_cache_stats
tool.
Development Setup¶
Prerequisites¶
- Python 3.8+ (Python 3.11+ recommended)
- uv package manager (recommended) or pip
- Git for cloning the repository
Clone and Install¶
# Clone the repository
git clone https://github.com/bradleyfay/autodoc-mcp.git
cd autodoc-mcp
# Install development dependencies
uv sync --all-extras
# Install pre-commit hooks
uv run pre-commit install
Run Tests¶
Verify everything works correctly:
# Run all 277 tests
uv run pytest
# Run with coverage report
uv run pytest --cov=src --cov-report=html
# Run linting
uv run ruff check
# Type checking
uv run mypy src
Development Tools¶
The project includes helpful development scripts:
# Test dependency scanning
uv run python scripts/dev.py test-scan
# Test package documentation fetching
uv run python scripts/dev.py test-docs fastapi ">=0.100.0"
# View cache statistics
uv run python scripts/dev.py cache-stats
# Clear the cache
uv run python scripts/dev.py clear-cache
# Get help
uv run python scripts/dev.py --help
Common Installation Issues¶
Permission Errors¶
If you encounter permission errors during installation:
# Use user installation
pip install --user autodoc-mcp
# Or create a virtual environment
python -m venv autodoc-env
source autodoc-env/bin/activate # On Windows: autodoc-env\Scripts\activate
pip install autodoc-mcp
Command Not Found¶
If autodoc-mcp
command is not found after installation:
-
Check installation:
-
Check PATH:
-
Use full path:
Network Configuration¶
For corporate networks or proxies:
# Set proxy environment variables
export HTTP_PROXY=http://proxy.company.com:8080
export HTTPS_PROXY=http://proxy.company.com:8080
# Install with proxy
pip install --proxy http://proxy.company.com:8080 autodoc-mcp
Cache Directory Issues¶
If you have issues with the default cache directory:
# Use custom cache location
export CACHE_DIR="/tmp/autodoc-cache"
# Or specify in MCP configuration
{
"env": {
"CACHE_DIR": "/path/to/custom/cache"
}
}
Next Steps¶
After installation, you can:
- Configure the server - See Configuration Guide
- Learn about available tools - See MCP Tools Reference
- Troubleshoot issues - See Troubleshooting Guide
- Start using AutoDocs - See Getting Started Guide
Installation Complete
You now have AutoDocs MCP Server installed and configured. The server will automatically provide intelligent documentation context to your AI assistant.