Skip to content

Commit 0a442d9

Browse files
author
Andy Cai
committed
Add PUBLISH.sh: one-command PyPI + MCP registry deploy script
1 parent b8c7fc2 commit 0a442d9

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#!/usr/bin/env bash
2+
# PUBLISH.sh — Publish agentcard-mcp to PyPI then register with MCP Registry
3+
#
4+
# Run this script from adapters/python/mcp-server/
5+
# Requires: pip install build twine AND mcp-publisher in PATH
6+
#
7+
# MCP registry name: io.github.kwailapt/agentcard
8+
# PyPI name: agentcard-mcp
9+
10+
set -euo pipefail
11+
12+
echo "=== Step 1: Build wheel + sdist ==="
13+
python3 -m build
14+
15+
echo ""
16+
echo "=== Step 2: Upload to PyPI ==="
17+
echo "You will need your PyPI API token. Set TWINE_PASSWORD or enter interactively."
18+
python3 -m twine upload dist/*
19+
20+
echo ""
21+
echo "=== Step 3: Verify PyPI package is live ==="
22+
echo "Waiting 30s for PyPI to index..."
23+
sleep 30
24+
pip index versions agentcard-mcp 2>/dev/null || curl -s "https://pypi.org/pypi/agentcard-mcp/json" | python3 -c "import sys,json; d=json.load(sys.stdin); print('PyPI:', d['info']['version'])"
25+
26+
echo ""
27+
echo "=== Step 4: Publish to MCP Registry ==="
28+
# mcp-publisher must be authenticated (mcp-publisher login github)
29+
mcp-publisher publish
30+
31+
echo ""
32+
echo "=== Done! ==="
33+
echo "agentcard-mcp is now live at:"
34+
echo " PyPI: https://pypi.org/project/agentcard-mcp/"
35+
echo " MCP Registry: https://registry.modelcontextprotocol.io/servers/io.github.kwailapt%2Fagentcard"
36+
echo ""
37+
echo "Also track the PR to modelcontextprotocol/servers:"
38+
echo " https://github.com/modelcontextprotocol/servers/pull/4015"

0 commit comments

Comments
 (0)