PyPI Package Management MCP Server for JAEGIS-web-os project with 8 fully implemented tools including working pypi_upload_package
Project description
jaegis-pypi-mcp-server
PyPI package management with 8 fully implemented tools for JAEGIS-Web-OS project automation
🚀 Quick Start
NPX (Recommended)
# List all available tools
npx jaegis-pypi-mcp-server@latest --list-tools --format=table
# Get tools schema for MCP integration
npx jaegis-pypi-mcp-server@latest --tools-json
# Start the MCP server
npx jaegis-pypi-mcp-server@latest
Global Installation
npm install -g jaegis-pypi-mcp-server
pypi-mcp-server --list-tools
🐍 Tool Inventory (8 Tools)
| Tool Name | Category | Description | Required Params | Optional Params |
|---|---|---|---|---|
pypi_package_info |
Package Information | Get detailed package metadata and dependencies | 1 | 1 |
pypi_search_packages |
Package Discovery | Search PyPI registry using keywords | 1 | 1 |
pypi_upload_package |
Package Publishing | Upload packages to PyPI registry | 1 | 1 |
pypi_list_versions |
Package Information | List all available package versions | 1 | 0 |
pypi_download_stats |
Package Analytics | Get download statistics and analytics | 1 | 1 |
pypi_validate_package |
Package Validation | Validate package metadata for publishing | 1 | 0 |
pypi_build_package |
Package Building | Build distribution files (sdist, wheel) | 1 | 1 |
pypi_check_name_availability |
Package Discovery | Check if package name is available | 1 | 0 |
security_check |
Security | Scan project for exposed credentials and secrets | 1 | 0 |
Tool Categories
- Package Information (2 tools) - Retrieve package metadata and versions
- Package Discovery (2 tools) - Search registry and check name availability
- Package Publishing (1 tool) - Upload packages to PyPI
- Package Analytics (1 tool) - Download statistics and metrics
- Package Validation (1 tool) - Validate package configuration
- Package Building (1 tool) - Build distribution files
🔧 Environment Setup
Required Variables
export PYPI_TOKEN=pypi-your_token_here # PyPI API token
export PYPI_USERNAME=__token__ # PyPI username (use __token__ for token auth)
Optional Variables
export PYPI_INDEX_URL=https://upload.pypi.org/legacy/ # PyPI upload URL
export PYPI_REPOSITORY_URL=https://pypi.org/simple/ # PyPI repository URL
export DEFAULT_PROJECT=JAEGIS-Web-OS # Default project name
Generate PyPI Token
- Go to PyPI Account Settings > API tokens
- Click "Add API token"
- Enter token name and select scope (entire account or specific project)
- Copy the generated token (format:
pypi-*)
Token Format Validation
- ✅
pypi-*- PyPI API token - ✅
__token__- Username for token authentication - ❌ Other formats will show warnings
🎯 MCP Client Integration
Augment Code
{
"pypi-jaegis": {
"command": "npx",
"args": ["@jaegis/pypi-mcp-server@latest"],
"env": {
"PYPI_TOKEN": "pypi-your_token_here",
"PYPI_USERNAME": "__token__"
}
}
}
Claude Desktop
{
"mcpServers": {
"pypi-jaegis": {
"command": "npx",
"args": ["@jaegis/pypi-mcp-server@latest"],
"env": {
"PYPI_TOKEN": "pypi-your_token_here",
"PYPI_USERNAME": "__token__"
}
}
}
}
VS Code MCP Extension
{
"name": "PyPI JAEGIS",
"command": "npx @jaegis/pypi-mcp-server@latest",
"env": {
"PYPI_TOKEN": "pypi-your_token_here",
"PYPI_USERNAME": "__token__"
}
}
📖 Usage Examples
Package Information
// Get package information
{
"tool": "pypi_package_info",
"parameters": {
"package_name": "JAEGIS-Web-OS",
"version": "latest"
}
}
// List all versions
{
"tool": "pypi_list_versions",
"parameters": {
"package_name": "JAEGIS-Web-OS"
}
}
Package Publishing
// Upload a package
{
"tool": "pypi_upload_package",
"parameters": {
"package_path": "/path/to/dist/package.tar.gz",
"repository": "pypi"
}
}
// Build distribution files
{
"tool": "pypi_build_package",
"parameters": {
"package_path": "/path/to/package",
"build_type": "both"
}
}
Package Validation
// Validate package
{
"tool": "pypi_validate_package",
"parameters": {
"package_path": "/path/to/package"
}
}
// Check name availability
{
"tool": "pypi_check_name_availability",
"parameters": {
"package_name": "my-new-package"
}
}
Package Analytics
// Get download statistics
{
"tool": "pypi_download_stats",
"parameters": {
"package_name": "JAEGIS-Web-OS",
"period": "last-month"
}
}
Package Discovery
// Search packages
{
"tool": "pypi_search_packages",
"parameters": {
"query": "jaegis web os",
"limit": 10
}
}
🛠️ Command Line Options
pypi-mcp-server [OPTIONS]
OPTIONS:
--list-tools List all available tools with descriptions
--tools-json Output complete MCP tools schema as JSON
--format=table Use table format for tool listings (default: JSON)
--help, -h Show this help message
EXAMPLES:
pypi-mcp-server --list-tools --format=table
pypi-mcp-server --tools-json > tools-schema.json
pypi-mcp-server # Start MCP server
🔒 Security Features
- ✅ Credential Sanitization - PyPI tokens masked in logs
- ✅ Environment-based Authentication - No hardcoded credentials
- ✅ Token Format Validation - Validates PyPI token formats
- ✅ Repository Configuration - Configurable PyPI repository URLs
- ✅ Error Handling - Comprehensive error messages without credential exposure
🚨 Troubleshooting
Common Issues
"PyPI token is required"
# Set your PyPI token
export PYPI_TOKEN=pypi-your_token_here
export PYPI_USERNAME=__token__
"Package not found"
- Check package name spelling
- Verify package exists on PyPI
- Ensure token has access to private packages
"Permission denied"
- Verify token has upload permissions
- Check package ownership
- Ensure token is not expired
"Package validation failed"
- Check setup.py or pyproject.toml syntax
- Verify required metadata fields
- Ensure dependencies are valid
"Build failed"
- Install build dependencies (setuptools, wheel)
- Check package structure
- Verify Python version compatibility
Debug Mode
# Enable debug logging
DEBUG=pypi-mcp-server pypi-mcp-server
📦 Package Information
- Package:
@jaegis/pypi-mcp-server - Version: 1.0.0
- Node.js: >=18.0.0
- License: MIT
- Repository: GitHub
🤝 Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Submit a pull request
📄 License
MIT License - see LICENSE file for details.
Built with ❤️ by the JAEGIS Team
For more information, visit JAEGIS Documentation
Project details
Release history Release notifications | RSS feed
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 jaegis_pypi_mcp_server-1.1.4.tar.gz.
File metadata
- Download URL: jaegis_pypi_mcp_server-1.1.4.tar.gz
- Upload date:
- Size: 17.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6189bbdb2c07c5d72f534112c1f98d76431efc9b76ed2a320e751f5f4819ba22
|
|
| MD5 |
ee0ef97b0f437f47895cc7745ec4406c
|
|
| BLAKE2b-256 |
2c37e320034bb40302b37cdb9d521c45bd6ed71a147dfe71d3bb34e4e82e933c
|
File details
Details for the file jaegis_pypi_mcp_server-1.1.4-py3-none-any.whl.
File metadata
- Download URL: jaegis_pypi_mcp_server-1.1.4-py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
14eb59ea089a464126194c03cd60a622d5da8a040578fef613476d230729aa77
|
|
| MD5 |
5a8a28cb548c7bdba366477c7d247852
|
|
| BLAKE2b-256 |
b2c7c24715179b4adaee0c820fb411658040e513865a47cbd4b38c271759f607
|