We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/nicholasglazer/gnosis-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
name: Publish to PyPI & MCP Registry
on:
push:
branches:
- main
paths:
- "pyproject.toml"
tags:
- "v*"
jobs:
check:
runs-on: ubuntu-latest
outputs:
should_release: ${{ steps.decide.outputs.should_release }}
version: ${{ steps.version.outputs.tag }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get version from pyproject.toml
id: version
run: |
VERSION=$(grep '^version' pyproject.toml | head -1 | sed 's/version = "\(.*\)"/\1/')
echo "tag=v$VERSION" >> "$GITHUB_OUTPUT"
echo "Found version: v$VERSION"
- name: Decide whether to release
id: decide
run: |
# If triggered by a tag push, always release
if [[ "${{ github.ref }}" == refs/tags/v* ]]; then
echo "should_release=true" >> "$GITHUB_OUTPUT"
echo "Tag push trigger — releasing"
exit 0
fi
# If triggered by pyproject.toml change, check if tag exists
if git rev-parse "${{ steps.version.outputs.tag }}" >/dev/null 2>&1; then
echo "should_release=false" >> "$GITHUB_OUTPUT"
echo "Tag ${{ steps.version.outputs.tag }} already exists, skipping"
else
echo "should_release=true" >> "$GITHUB_OUTPUT"
echo "New version ${{ steps.version.outputs.tag }}, will release"
fi
build:
needs: check
if: needs.check.outputs.should_release == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- run: pip install build
- run: python -m build
- uses: actions/upload-artifact@v4
with:
name: dist
path: dist/
publish-pypi:
needs: build
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
name: dist
path: dist/
- uses: pypa/gh-action-pypi-publish@release/v1
publish-mcp-registry:
needs: publish-pypi
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- name: Install mcp-publisher
run: |
curl -sL "https://github.com/modelcontextprotocol/registry/releases/latest/download/mcp-publisher_linux_amd64.tar.gz" | tar xz
sudo mv mcp-publisher /usr/local/bin/
- name: Login via GitHub OIDC
run: mcp-publisher login github-oidc
- name: Publish to MCP Registry
run: mcp-publisher publish
tag:
needs: [check, publish-pypi]
if: github.ref != 'refs/tags/*'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Create and push tag
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
TAG="${{ needs.check.outputs.version }}"
if ! git rev-parse "$TAG" >/dev/null 2>&1; then
git tag "$TAG"
git push origin "$TAG"
echo "Created tag $TAG"
else
echo "Tag $TAG already exists, skipping"
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
github-release:
needs: [check, tag]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Create GitHub Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
TAG="${{ needs.check.outputs.version }}"
# Only create if release doesn't already exist
if ! gh release view "$TAG" >/dev/null 2>&1; then
gh release create "$TAG" \
--title "$TAG" \
--generate-notes \
--latest
echo "Created release $TAG"
else
echo "Release $TAG already exists, skipping"
fi