Skip to main content

MCPyDoc - Python Package Documentation MCP Server

CI PyPI version Python 3.9+ License: MIT

AI assistants hallucinate when working with unfamiliar Python packages—guessing APIs, wrong signatures, outdated usage. MCPyDoc fixes that by giving your assistant real-time access to actual documentation and source code from your environment.

✨ Features

  • 📚 Package Documentation - Comprehensive docs for any Python package
  • 🔍 Symbol Search - Find classes, functions, and modules by pattern
  • 💻 Source Code Access - Retrieve actual implementation code
  • 🏗️ Structure Analysis - Analyze complete package architecture
  • 🔧 Auto-Environment Detection - Finds your project's venv automatically

🚀 Quick Start

Zero Config (Recommended)

With compatible MCP clients (Cursor, VS Code), MCPyDoc automatically detects your workspace and virtual environment. Just add to your MCP config:

{
  "mcpServers": {
    "mcpydoc": {
      "command": "uvx",
      "args": ["mcpydoc"]
    }
  }
}

Alternatives: Use pipx run mcpydoc instead of uvx, or install globally with pip install mcpydoc and use python -m mcpydoc.

VS Code Extension

For VS Code, install the MCPyDoc extension for a fully automatic setup.

🔧 Environment Detection

MCPyDoc automatically finds your Python environment in this priority order:

  1. MCP Client Roots - Auto-detected from your IDE workspace (zero config!)
  2. MCPYDOC_PYTHON_PATH - Manual override: "env": {"MCPYDOC_PYTHON_PATH": "~/myproject/.venv"}
  3. VIRTUAL_ENV - Activated virtual environment
  4. Common directories - Searches ~/projects, ~/dev, ~/code, etc.
  5. MCPYDOC_SEARCH_PATHS - Custom: "env": {"MCPYDOC_SEARCH_PATHS": "~/work,~/repos"}

Per-Project Config

Create .mcpydoc.json in your project root:

{"python_path": ".venv"}

🔍 Troubleshooting

Package not found?

  1. Check your project has a .venv or venv directory
  2. Verify the package is installed: pip list | grep package-name
  3. If needed, set MCPYDOC_PYTHON_PATH explicitly

MCPyDoc shows "isolated pipx/uvx environment"?

Add your projects directory:

"env": {"MCPYDOC_SEARCH_PATHS": "~/projects"}

Or point directly to your venv:

"env": {"MCPYDOC_PYTHON_PATH": "~/myproject/.venv"}

📝 License

MIT License - see LICENSE file for details.

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes with tests
  4. Submit a pull request

Metadata

Release files for mcpydoc 1.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mcpydoc 1.4.0
File Size Uploaded Provenance
mcpydoc-1.4.0.tar.gz 1.0 MB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for mcpydoc 1.4.0
File Interpreter ABI Platform
mcpydoc-1.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 1.1 MB

Release files / mcpydoc-1.4.0.tar.gz

Download URL mcpydoc-1.4.0.tar.gz
Size 1.0 MB
Tags Source
SHA-256 checksum
How to use checksums
05f4a0cb1b1c5e91ee9a14170112231906c71e665ac40e1b8ed53021494dea1c
BLAKE2b-256 checksum
How to use checksums
eae13d7e6b28f51f2edec26ed4d0d87182d92ad9f2040b71acee0a479ee9f74e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / mcpydoc-1.4.0-py3-none-any.whl

Download URL mcpydoc-1.4.0-py3-none-any.whl
Size 43.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
049144f4ce0544eb6fc42e810e0f03463664434843e0f050f9c216843a129ffa
BLAKE2b-256 checksum
How to use checksums
20c361a2646f6c62b4d62818a34d95d617d4e89f198ff7c0c41b4a65c3d44292
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Security for mcpydoc 1.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page