MCP server for automatic Python package documentation context
Project description
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
# 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:
{
"mcpServers": {
"autodocs-mcp": {
"command": "uv",
"args": ["run", "--from", "autodocs-mcp", "autodocs-mcp"],
"env": {
"AUTODOCS_CACHE_DIR": "/path/to/cache"
}
}
}
}
Development
# 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_dependenciesMCP tool - 🚧 Testing with real projects
Coming next: Documentation fetching, version-based caching, and rich dependency context.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file autodoc_mcp-0.1.7.tar.gz.
File metadata
- Download URL: autodoc_mcp-0.1.7.tar.gz
- Upload date:
- Size: 16.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dab59fd8dc80b117e42752a9245b18075ac17d1d13624034b94df4d908a1e911
|
|
| MD5 |
e6e492b4c01c87490475b564621fde9e
|
|
| BLAKE2b-256 |
c254b50b6dba275f78a23ec15d148422bd6d5f92641516f0ce7152a88bc39bed
|
Provenance
The following attestation bundles were made for autodoc_mcp-0.1.7.tar.gz:
Publisher:
ci.yml on bradleyfay/autodoc-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
autodoc_mcp-0.1.7.tar.gz -
Subject digest:
dab59fd8dc80b117e42752a9245b18075ac17d1d13624034b94df4d908a1e911 - Sigstore transparency entry: 365038188
- Sigstore integration time:
-
Permalink:
bradleyfay/autodoc-mcp@1f3cc333db79b8833215ebb689a44b2ec53af2fb -
Branch / Tag:
refs/tags/v0.1.7 - Owner: https://github.com/bradleyfay
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@1f3cc333db79b8833215ebb689a44b2ec53af2fb -
Trigger Event:
push
-
Statement type:
File details
Details for the file autodoc_mcp-0.1.7-py3-none-any.whl.
File metadata
- Download URL: autodoc_mcp-0.1.7-py3-none-any.whl
- Upload date:
- Size: 15.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd5a6dfc7369ca89bdd14b77c46c1a02718d1e98b5bc49dade2316d1ea9fe0a5
|
|
| MD5 |
c2bda5bab8f42d0321e0b77956e2556a
|
|
| BLAKE2b-256 |
d9e3e9251d812393d3b1a910e130b4d8909909dc299cde0021fe00c39140d91b
|
Provenance
The following attestation bundles were made for autodoc_mcp-0.1.7-py3-none-any.whl:
Publisher:
ci.yml on bradleyfay/autodoc-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
autodoc_mcp-0.1.7-py3-none-any.whl -
Subject digest:
dd5a6dfc7369ca89bdd14b77c46c1a02718d1e98b5bc49dade2316d1ea9fe0a5 - Sigstore transparency entry: 365038215
- Sigstore integration time:
-
Permalink:
bradleyfay/autodoc-mcp@1f3cc333db79b8833215ebb689a44b2ec53af2fb -
Branch / Tag:
refs/tags/v0.1.7 - Owner: https://github.com/bradleyfay
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@1f3cc333db79b8833215ebb689a44b2ec53af2fb -
Trigger Event:
push
-
Statement type: