integrations/beads-mcp/PYPI.md
This guide covers how to build and publish the beads-mcp package to the Python Package Index (PyPI).
PyPI Account: Create accounts on both:
API Tokens: Generate API tokens for authentication:
Build Tools: Install the Python build tools:
uv pip install --upgrade build twine
Clean previous builds (if any):
rm -rf dist/ build/ src/*.egg-info
Build the distribution packages:
python -m build
This creates both:
dist/beads_mcp-0.9.4-py3-none-any.whl (wheel)dist/beads-mcp-0.9.4.tar.gz (source distribution)Verify the build:
tar -tzf dist/beads-mcp-0.9.4.tar.gz
Should include:
src/beads_mcp/README.mdLICENSEpyproject.tomlUpload to Test PyPI:
python -m twine upload --repository testpypi dist/*
When prompted, use:
__token__pypi- prefix)Install from Test PyPI:
# In a fresh virtual environment
uv venv test-env
source test-env/bin/activate
# Install from Test PyPI
pip install --index-url https://test.pypi.org/simple/ beads-mcp
# Test it works
beads-mcp --help
Verify the installation:
python -c "import beads_mcp; print(beads_mcp.__version__)"
Once you've verified the package works on Test PyPI:
Upload to PyPI:
python -m twine upload dist/*
Use:
__token__Verify on PyPI:
Test installation:
# In a fresh environment
pip install beads-mcp
beads-mcp --help
After publishing, users can install simply with:
pip install beads-mcp
# or with uv
uv pip install beads-mcp
Update the README.md to reflect this simpler installation method.
When releasing a new version:
src/beads_mcp/__init__.pypyproject.tomlcd ../..
./scripts/bump-version.sh 0.9.5 --commit
git tag v0.9.5
git push origin v0.9.5
PyPI doesn't allow re-uploading the same version. If you need to fix something:
If files are missing from the built package, create a MANIFEST.in:
include README.md
include LICENSE
recursive-include src/beads_mcp *.py
__token__ as the username (exactly)pypi- prefixTest PyPI is completely separate from production PyPI:
Always test on Test PyPI first!
Consider setting up GitHub Actions to automate this:
v0.9.5)See .github/workflows/ in the parent project for examples.