Name | mcpydoc JSON |
Version |
0.3.0
JSON |
| download |
home_page | None |
Summary | Model Context Protocol (MCP) server providing documentation and code analysis for Python packages |
upload_time | 2025-07-28 20:48:58 |
maintainer | None |
docs_url | None |
author | Amit Ronen |
requires_python | >=3.9 |
license | None |
keywords |
documentation
introspection
mcp
packaging
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# MCPyDoc - Python Package Documentation MCP Server
[](https://github.com/amit608/MCPyDoc/actions/workflows/ci.yml)
[](https://badge.fury.io/py/mcpydoc)
[](https://www.python.org/downloads/)
[](https://opensource.org/licenses/MIT)
[](https://github.com/psf/black)
MCPyDoc is a Model Context Protocol (MCP) server that provides comprehensive documentation and code analysis capabilities for Python packages. It enables AI agents like Cline and GitHub Copilot to understand and work with Python codebases more effectively, especially when working with private libraries and unfamiliar packages.
## ✨ Features
- **📚 Package Documentation**: Get 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
- **🔧 Type Hints**: Extract and analyze type annotations
- **📖 Docstring Parsing**: Support for Google, NumPy, and Sphinx formats
- **🏃 High Performance**: Efficient caching and optimized operations
- **🛡️ Error Handling**: Robust error management and validation
## 🚀 Quick Start
### Installation
```bash
# Install from PyPI (Recommended)
pip install mcpydoc
# Or install from source
git clone https://github.com/amit608/MCPyDoc.git
cd MCPyDoc
pip install .
```
Once installed and configured with your AI agent, the server will automatically start when needed.
## 🔌 Integration with you favorite coding AI agent
### Configuration
Add MCPyDoc to your Cline/Claude Code/Cursor/Github Copilot MCP configuration:
```json
{
"mcpServers": {
"mcpydoc": {
"command": "python",
"args": ["-m", "mcpydoc"],
"env": {},
"description": "Python package documentation and code analysis server"
}
}
}
```
## 📊 Supported Package Types
- ✅ **Standard Library** - Built-in modules (`json`, `os`, `sys`, etc.)
- ✅ **Third-Party Packages** - pip-installed packages
- ✅ **Local Packages** - Development packages in current environment
- ✅ **Virtual Environments** - Proper path resolution
## 🛠️ API Reference
### Core Methods
#### `get_module_documentation(package, module_path=None, version=None)`
Get comprehensive documentation for a package or specific module.
**Parameters:**
- `package` (str): Package name
- `module_path` (str, optional): Dot-separated path to specific module
- `version` (str, optional): Specific version to use
**Returns:** `ModuleDocumentationResult`
#### `search_package_symbols(package, pattern=None, version=None)`
Search for symbols in a package.
**Parameters:**
- `package` (str): Package name
- `pattern` (str, optional): Search pattern (case-insensitive)
- `version` (str, optional): Specific version to use
**Returns:** `List[SymbolSearchResult]`
#### `get_source_code(package, symbol_name, version=None)`
Get source code for a specific symbol.
**Parameters:**
- `package` (str): Package name
- `symbol_name` (str): Dot-separated path to symbol
- `version` (str, optional): Specific version to use
**Returns:** `SourceCodeResult`
#### `analyze_package_structure(package, version=None)`
Analyze complete package structure.
**Parameters:**
- `package` (str): Package name
- `version` (str, optional): Specific version to use
**Returns:** `PackageStructure`
## 🏗️ Architecture
MCPyDoc uses a clean, modular architecture:
```
mcpydoc/
├── __init__.py # Package interface
├── __main__.py # CLI entry point
├── server.py # Core MCPyDoc class
├── mcp_server.py # MCP JSON-RPC server
├── analyzer.py # Package analysis engine
├── documentation.py # Docstring parsing
├── models.py # Pydantic data models
├── exceptions.py # Custom exceptions
└── utils.py # Utility functions
```
### Key Components
- **Analyzer**: Package introspection and symbol discovery
- **Documentation Parser**: Multi-format docstring parsing
- **MCP Server**: JSON-RPC protocol implementation
- **Models**: Type-safe data structures with Pydantic
- **Exception Handling**: Comprehensive error management
## 📝 License
MIT License - see [LICENSE](LICENSE) file for details.
## 🤝 Contributing
1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Add tests
5. Run the test suite
6. Submit a pull request
---
**Made with ❤️ for the Python community**
Raw data
{
"_id": null,
"home_page": null,
"name": "mcpydoc",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "documentation, introspection, mcp, packaging",
"author": "Amit Ronen",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/9b/3e/0b0c088369e229c20069d985ea8ac6b2dd4f319d8977099d990c512e0ba1/mcpydoc-0.3.0.tar.gz",
"platform": null,
"description": "# MCPyDoc - Python Package Documentation MCP Server\n\n[](https://github.com/amit608/MCPyDoc/actions/workflows/ci.yml)\n[](https://badge.fury.io/py/mcpydoc)\n[](https://www.python.org/downloads/)\n[](https://opensource.org/licenses/MIT)\n[](https://github.com/psf/black)\n\nMCPyDoc is a Model Context Protocol (MCP) server that provides comprehensive documentation and code analysis capabilities for Python packages. It enables AI agents like Cline and GitHub Copilot to understand and work with Python codebases more effectively, especially when working with private libraries and unfamiliar packages.\n\n## \u2728 Features\n\n- **\ud83d\udcda Package Documentation**: Get comprehensive docs for any Python package\n- **\ud83d\udd0d Symbol Search**: Find classes, functions, and modules by pattern\n- **\ud83d\udcbb Source Code Access**: Retrieve actual implementation code\n- **\ud83c\udfd7\ufe0f Structure Analysis**: Analyze complete package architecture\n- **\ud83d\udd27 Type Hints**: Extract and analyze type annotations\n- **\ud83d\udcd6 Docstring Parsing**: Support for Google, NumPy, and Sphinx formats\n- **\ud83c\udfc3 High Performance**: Efficient caching and optimized operations\n- **\ud83d\udee1\ufe0f Error Handling**: Robust error management and validation\n\n## \ud83d\ude80 Quick Start\n\n### Installation\n\n```bash\n# Install from PyPI (Recommended)\npip install mcpydoc\n\n# Or install from source\ngit clone https://github.com/amit608/MCPyDoc.git\ncd MCPyDoc\npip install .\n```\n\nOnce installed and configured with your AI agent, the server will automatically start when needed.\n\n## \ud83d\udd0c Integration with you favorite coding AI agent\n\n### Configuration\n\nAdd MCPyDoc to your Cline/Claude Code/Cursor/Github Copilot MCP configuration:\n\n```json\n{\n \"mcpServers\": {\n \"mcpydoc\": {\n \"command\": \"python\",\n \"args\": [\"-m\", \"mcpydoc\"],\n \"env\": {},\n \"description\": \"Python package documentation and code analysis server\"\n }\n }\n}\n```\n\n## \ud83d\udcca Supported Package Types\n\n- \u2705 **Standard Library** - Built-in modules (`json`, `os`, `sys`, etc.)\n- \u2705 **Third-Party Packages** - pip-installed packages\n- \u2705 **Local Packages** - Development packages in current environment\n- \u2705 **Virtual Environments** - Proper path resolution\n\n## \ud83d\udee0\ufe0f API Reference\n\n### Core Methods\n\n#### `get_module_documentation(package, module_path=None, version=None)`\nGet comprehensive documentation for a package or specific module.\n\n**Parameters:**\n- `package` (str): Package name\n- `module_path` (str, optional): Dot-separated path to specific module\n- `version` (str, optional): Specific version to use\n\n**Returns:** `ModuleDocumentationResult`\n\n#### `search_package_symbols(package, pattern=None, version=None)`\nSearch for symbols in a package.\n\n**Parameters:**\n- `package` (str): Package name\n- `pattern` (str, optional): Search pattern (case-insensitive)\n- `version` (str, optional): Specific version to use\n\n**Returns:** `List[SymbolSearchResult]`\n\n#### `get_source_code(package, symbol_name, version=None)`\nGet source code for a specific symbol.\n\n**Parameters:**\n- `package` (str): Package name\n- `symbol_name` (str): Dot-separated path to symbol\n- `version` (str, optional): Specific version to use\n\n**Returns:** `SourceCodeResult`\n\n#### `analyze_package_structure(package, version=None)`\nAnalyze complete package structure.\n\n**Parameters:**\n- `package` (str): Package name\n- `version` (str, optional): Specific version to use\n\n**Returns:** `PackageStructure`\n\n## \ud83c\udfd7\ufe0f Architecture\n\nMCPyDoc uses a clean, modular architecture:\n\n```\nmcpydoc/\n\u251c\u2500\u2500 __init__.py # Package interface\n\u251c\u2500\u2500 __main__.py # CLI entry point\n\u251c\u2500\u2500 server.py # Core MCPyDoc class\n\u251c\u2500\u2500 mcp_server.py # MCP JSON-RPC server\n\u251c\u2500\u2500 analyzer.py # Package analysis engine\n\u251c\u2500\u2500 documentation.py # Docstring parsing\n\u251c\u2500\u2500 models.py # Pydantic data models\n\u251c\u2500\u2500 exceptions.py # Custom exceptions\n\u2514\u2500\u2500 utils.py # Utility functions\n```\n\n### Key Components\n\n- **Analyzer**: Package introspection and symbol discovery\n- **Documentation Parser**: Multi-format docstring parsing\n- **MCP Server**: JSON-RPC protocol implementation\n- **Models**: Type-safe data structures with Pydantic\n- **Exception Handling**: Comprehensive error management\n\n## \ud83d\udcdd License\n\nMIT License - see [LICENSE](LICENSE) file for details.\n\n## \ud83e\udd1d Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Make your changes\n4. Add tests\n5. Run the test suite\n6. Submit a pull request\n\n---\n\n**Made with \u2764\ufe0f for the Python community**\n",
"bugtrack_url": null,
"license": null,
"summary": "Model Context Protocol (MCP) server providing documentation and code analysis for Python packages",
"version": "0.3.0",
"project_urls": {
"Homepage": "https://github.com/amit608/MCPyDoc",
"Issues": "https://github.com/amit608/MCPyDoc/issues",
"Repository": "https://github.com/amit608/MCPyDoc"
},
"split_keywords": [
"documentation",
" introspection",
" mcp",
" packaging"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "08373b5f769ab9d78d7418f36c36f96b817febf3d8b74b3e324dc217855a6461",
"md5": "c2e2f97a7cd82758b92f2818f5ee6395",
"sha256": "2bd2c4b0e89f4aa6d1d78a9c7bc9b144db3dd3df7b6337a5b5c76818b5a58388"
},
"downloads": -1,
"filename": "mcpydoc-0.3.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c2e2f97a7cd82758b92f2818f5ee6395",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 24134,
"upload_time": "2025-07-28T20:48:57",
"upload_time_iso_8601": "2025-07-28T20:48:57.279066Z",
"url": "https://files.pythonhosted.org/packages/08/37/3b5f769ab9d78d7418f36c36f96b817febf3d8b74b3e324dc217855a6461/mcpydoc-0.3.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "9b3e0b0c088369e229c20069d985ea8ac6b2dd4f319d8977099d990c512e0ba1",
"md5": "006985f8f7fdae70b870e32c3fa99151",
"sha256": "7286696bd3a60e02af72229fa0a436aabe305a0994db95232fb8b1380ed061d4"
},
"downloads": -1,
"filename": "mcpydoc-0.3.0.tar.gz",
"has_sig": false,
"md5_digest": "006985f8f7fdae70b870e32c3fa99151",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 35271,
"upload_time": "2025-07-28T20:48:58",
"upload_time_iso_8601": "2025-07-28T20:48:58.471810Z",
"url": "https://files.pythonhosted.org/packages/9b/3e/0b0c088369e229c20069d985ea8ac6b2dd4f319d8977099d990c512e0ba1/mcpydoc-0.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-28 20:48:58",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "amit608",
"github_project": "MCPyDoc",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "mcpydoc"
}