MCP Pack
A tool for creating and managing documentation databases from GitHub repositories.
Quickstart to create a database
Start the Qdrant server:
docker compose up
With a Qdrant server running:
uvx mcp_pack create_db https://github.com/user/repo
To start a server for querying the documentation:
mcp_pack create_server --module-name your_module_name
see the examples/ folder for how to setup the MCP server.
Installation
# Install from pip
pip install mcp_pack
Prerequisites
- Qdrant server running (by default at http://localhost:6333)
- GitHub token (optional, but recommended to avoid rate limits)
- OpenAI API key (optional, for summarizing Jupyter notebooks)
Usage
See example/ folder.
Create a documentation database
# Basic usage
mcp_pack create_db https://github.com/user/repo
# With @ prefix syntax
mcp_pack create_db @https://github.com/user/repo
# With additional options
mcp_pack create_db @https://github.com/user/repo \
--output-dir ./output \
--verbose \
--include-notebooks \
--include-rst \
--github-token YOUR_GITHUB_TOKEN \
--openai-api_key YOUR_OPENAI_API_KEY
Clean the database
# Delete all collections
mcp_pack clean_db
# Delete a specific collection
mcp_pack clean_db --collection repo-name
List Database Collections
To list all collections in the Qdrant database, use the following command:
# Use default Qdrant
mcp_pack list_db
# Use Custom Qdrant server URL
mcp_pack list_db --qdrant-url http://localhost:6333
This will display all the collections currently stored in the Qdrant database.
Create and Run a Query Server
To create and run a server for querying module documentation:
# Basic usage with default settings
mcp_pack create_server --module-name your_module_name
# With custom settings
mcp_pack create_server --module-name your_module_name \
--transport sse \
--port 8080 \
--qdrant-url http://your-qdrant-server:6333 \
--encoder-model all-MiniLM-L6-v2 \
--collection-name custom_collection
This will start a server that provides semantic search capabilities over your module's documentation.
Environment Variables
You can set environment variables instead of passing command-line arguments:
# Create a .env file
GITHUB_TOKEN=your_github_token
OPENAI_API_KEY=your_openai_api_key
Options
create_db
repo_url: GitHub repository URL (can be prefixed with @)--output-dir,-o: Directory to save JSONL output--verbose,-v: Verbose output--include-notebooks: Include Jupyter notebooks--include-rst: Include RST files--exclude-tests: Exclude test files and directories--module-name: Name of the module (defaults to repository name)--db-path: Path to store the database--qdrant-url: Qdrant server URL (default: http://localhost:6333)--github-token: GitHub personal access token--openai-api-key: OpenAI API key
clean_db
--qdrant-url: Qdrant server URL (default: http://localhost:6333)--collection: Specific collection to delete (optional)
list_db
--qdrant-url: Qdrant server URL (default: http://localhost:6333)
create_server
--module-name: Name of the module to query (required)--qdrant-url: Qdrant server URL (default: http://localhost:6333)--encoder-model: SentenceTransformer model to use (default: all-MiniLM-L6-v2)--collection-name: Name of the Qdrant collection (defaults to module_name)--transport: Transport method for the MCP server (default: stdio, choices: stdio, sse)--port: Port number for the MCP server (default: 8000)
Global Options
--version: Show version information
Additional info
> python -m mcp_pack.create_db --help
Create documentation database for a GitHub repository
positional arguments:
repo_url GitHub repository URL
options:
-h, --help show this help message and exit
--output-dir OUTPUT_DIR, -o OUTPUT_DIR
Directory to save JSONL output
--verbose, -v Verbose output
--include-notebooks Include Jupyter notebooks
--include-rst Include rst files
--db-path DB_PATH Path to store the database
--qdrant-url QDRANT_URL
Qdrant server URL
--github-token GITHUB_TOKEN
GitHub personal access token
--openai-api-key OPENAI_API_KEY
OpenAI API key
python -m mcp_pack.clean_db --help
Clean Qdrant database collections
options:
-h, --help show this help message and exit
--qdrant-url QDRANT_URL
Qdrant server URL
--collection COLLECTION
Specific collection to delete (optional, if not provided, all collections will be deleted)
Resources
Metadata
Release files for mcp-pack 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mcp_pack-0.3.0.tar.gz | 306.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mcp_pack-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 328.4 kB
Release files / mcp_pack-0.3.0.tar.gz
| Download URL | mcp_pack-0.3.0.tar.gz |
|---|---|
| Size | 306.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9a9242b1cd10f07744275832ebf2de4bd481c1be5b162eb853be9c81e5b26a62
|
|
BLAKE2b-256 checksum How to use checksums |
e029c8495267cac8b1acc948235327d4ef3786a68cd4855c874be33879e31396
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 30, 2025.
Transparency logRelease files / mcp_pack-0.3.0-py3-none-any.whl
| Download URL | mcp_pack-0.3.0-py3-none-any.whl |
|---|---|
| Size | 21.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9d2743c849174d3740113d628bbca40c8468a723ea66e9ec625b027b5483b464
|
|
BLAKE2b-256 checksum How to use checksums |
790ac4d1256d5a90ec8b79672ab214abd1a335484d70c4b865854ef21a4e0e04
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 30, 2025.
Transparency log