Package for accessing package artifacts via MCP
Project description
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
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcp_pack-0.3.0.tar.gz.
File metadata
- Download URL: mcp_pack-0.3.0.tar.gz
- Upload date:
- Size: 306.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a9242b1cd10f07744275832ebf2de4bd481c1be5b162eb853be9c81e5b26a62
|
|
| MD5 |
5bdca886437df894a32fdab21e019932
|
|
| BLAKE2b-256 |
e029c8495267cac8b1acc948235327d4ef3786a68cd4855c874be33879e31396
|
Provenance
The following attestation bundles were made for mcp_pack-0.3.0.tar.gz:
Publisher:
publish_pypi.yml on krosenfeld-IDM/mcp-pack
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcp_pack-0.3.0.tar.gz -
Subject digest:
9a9242b1cd10f07744275832ebf2de4bd481c1be5b162eb853be9c81e5b26a62 - Sigstore transparency entry: 225894332
- Sigstore integration time:
-
Permalink:
krosenfeld-IDM/mcp-pack@6ea8ef1db522361137dedb3ff9be59a6b667a554 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/krosenfeld-IDM
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish_pypi.yml@6ea8ef1db522361137dedb3ff9be59a6b667a554 -
Trigger Event:
workflow_run
-
Statement type:
File details
Details for the file mcp_pack-0.3.0-py3-none-any.whl.
File metadata
- Download URL: mcp_pack-0.3.0-py3-none-any.whl
- Upload date:
- Size: 21.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d2743c849174d3740113d628bbca40c8468a723ea66e9ec625b027b5483b464
|
|
| MD5 |
515262e4a9778c883705a016cb4e2a94
|
|
| BLAKE2b-256 |
790ac4d1256d5a90ec8b79672ab214abd1a335484d70c4b865854ef21a4e0e04
|
Provenance
The following attestation bundles were made for mcp_pack-0.3.0-py3-none-any.whl:
Publisher:
publish_pypi.yml on krosenfeld-IDM/mcp-pack
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcp_pack-0.3.0-py3-none-any.whl -
Subject digest:
9d2743c849174d3740113d628bbca40c8468a723ea66e9ec625b027b5483b464 - Sigstore transparency entry: 225894338
- Sigstore integration time:
-
Permalink:
krosenfeld-IDM/mcp-pack@6ea8ef1db522361137dedb3ff9be59a6b667a554 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/krosenfeld-IDM
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish_pypi.yml@6ea8ef1db522361137dedb3ff9be59a6b667a554 -
Trigger Event:
workflow_run
-
Statement type: