We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/isdaniel/mcp_weather_server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
name: Publish to PyPI
on:
push:
branches:
- main # Trigger on pushes to the main branch (adjust as needed)
tags:
- "v*" # or trigger when create new tag with "v" prefix
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x' # Use a suitable Python version
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Extract version from pyproject.toml
run: |
VERSION=$(grep -oP '(?<=version = ").*(?=")' pyproject.toml)
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Check if version exists on PyPI
id: check_version
run: |
PACKAGE_NAME="mcp_weather_server"
if curl -sSf "https://pypi.org/pypi/${PACKAGE_NAME}/${VERSION}/json" > /dev/null; then
echo "Version ${VERSION} already exists on PyPI. Skipping publish."
echo "skip_publish=true" >> $GITHUB_ENV
else
echo "skip_publish=false" >> $GITHUB_ENV
fi
- name: Publish to PyPI
if: env.skip_publish != 'true'
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}