Skip to main content
Glama

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

Related MCP server: Context7 MCP

๐Ÿš€ Quick Start

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

No tool schema history has been recorded yet.

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/amit608/MCPyDoc'

If you have feedback or need assistance with the MCP directory API, please join our Discord server