MCPyDoc
Provides real-time access to Python package documentation, source code, and symbol search to prevent AI hallucinations.
README
MCPyDoc - Python Package Documentation MCP Server
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 mcpydocinstead ofuvx, or install globally withpip install mcpydocand usepython -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:
- MCP Client Roots - Auto-detected from your IDE workspace (zero config!)
MCPYDOC_PYTHON_PATH- Manual override:"env": {"MCPYDOC_PYTHON_PATH": "~/myproject/.venv"}VIRTUAL_ENV- Activated virtual environment- Common directories - Searches
~/projects,~/dev,~/code, etc. 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?
- Check your project has a
.venvorvenvdirectory - Verify the package is installed:
pip list | grep package-name - If needed, set
MCPYDOC_PYTHON_PATHexplicitly
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
- Fork the repository
- Create a feature branch
- Make your changes with tests
- Submit a pull request
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.