Metadata-Version: 2.4
Name: autodoc-mcp
Version: 0.1.7
Summary: MCP server for automatic Python package documentation context
Project-URL: Homepage, https://github.com/bradleyfay/autodoc-mcp
Project-URL: Repository, https://github.com/bradleyfay/autodoc-mcp.git
Project-URL: Issues, https://github.com/bradleyfay/autodoc-mcp/issues
Author-email: AutoDocs Team <team@autodocs.dev>
License: MIT
License-File: LICENSE
Requires-Python: >=3.11
Requires-Dist: click>=8.0.0
Requires-Dist: fastmcp>=2.0.0
Requires-Dist: httpx>=0.25.0
Requires-Dist: packaging>=23.0
Requires-Dist: pydantic>=2.0.0
Requires-Dist: requests>=2.28.0
Requires-Dist: structlog>=23.2.0
Requires-Dist: tomlkit>=0.12.0
Provides-Extra: dev
Requires-Dist: mypy>=1.6.0; extra == 'dev'
Requires-Dist: pre-commit>=3.5.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.21.0; extra == 'dev'
Requires-Dist: pytest-cov>=4.1.0; extra == 'dev'
Requires-Dist: pytest-mock>=3.11.0; extra == 'dev'
Requires-Dist: pytest>=7.4.0; extra == 'dev'
Requires-Dist: ruff>=0.1.0; extra == 'dev'
Description-Content-Type: text/markdown

# AutoDocs MCP Server

AutoDocs MCP Server automatically provides AI assistants with contextual, version-specific documentation for Python project dependencies, eliminating manual package lookup and providing more accurate coding assistance.

## Features

- **Automatic Dependency Scanning**: Parse pyproject.toml files and extract dependency information
- **Version-Specific Caching**: Cache documentation based on resolved package versions
- **Graceful Degradation**: Handle malformed dependencies and network issues gracefully
- **Rich Context**: Provide AI assistants with both primary package and dependency documentation
- **FastMCP Integration**: Built with FastMCP for seamless integration with AI tools like Cursor

## Installation

```bash
# Using uv (recommended)
uv tool install autodocs-mcp

# Using pip
pip install autodocs-mcp
```

## Usage

### As an MCP Server

Configure in your Cursor Desktop settings:

```json
{
  "mcpServers": {
    "autodocs-mcp": {
      "command": "uv",
      "args": ["run", "--from", "autodocs-mcp", "autodocs-mcp"],
      "env": {
        "AUTODOCS_CACHE_DIR": "/path/to/cache"
      }
    }
  }
}
```

### Development

```bash
# Install dependencies
uv sync --all-extras

# Run tests
uv run pytest

# Run linting
uv run ruff check

# Start development server
uv run hatch run dev
```

## MCP Tools

### `scan_dependencies`

Scans project dependencies from pyproject.toml files.

**Parameters:**
- `project_path` (optional): Path to project directory (defaults to current directory)

**Returns:**
- Project metadata and dependency specifications
- Graceful degradation information for malformed dependencies

### `get_package_docs` (Coming Soon)

Retrieves formatted documentation for Python packages.

## Configuration

Environment variables:

- `AUTODOCS_CACHE_DIR`: Cache directory location (default: ~/.autodocs/cache)
- `AUTODOCS_MAX_CONCURRENT`: Maximum concurrent PyPI requests (default: 10)
- `AUTODOCS_REQUEST_TIMEOUT`: Request timeout in seconds (default: 30)
- `AUTODOCS_LOG_LEVEL`: Logging level (default: INFO)

## Architecture

- **FastMCP Server**: Handles MCP protocol communication
- **Dependency Parser**: Parses pyproject.toml with graceful error handling
- **Documentation Fetcher**: Retrieves package info from PyPI (coming soon)
- **Cache Manager**: Version-based caching system (coming soon)

## Development Status

This is currently in **Priority 1: Core Validation** phase:

- ✅ Basic project setup with hatch/uv
- ✅ Minimal viable dependency parser
- ✅ Basic FastMCP integration
- ✅ `scan_dependencies` MCP tool
- 🚧 Testing with real projects

Coming next: Documentation fetching, version-based caching, and rich dependency context.

## License

MIT