Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 72 additions & 0 deletions .github/workflows/publish-mcp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Publish MCP Server

on:
push:
tags:
- 'v*'

jobs:
publish:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v5

- name: Setup Node.js
uses: actions/setup-node@v5
with:
node-version: 'lts/*'

- name: Install corepack
run: npm i -g corepack@latest

- name: Enable pnpm
run: corepack enable

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Run tests
run: pnpm test --if-present

- name: Build package
run: pnpm run build --if-present

- name: Determine version from tag
id: version
run: echo "version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT

- name: Sync server.json version to tag
run: |
VERSION=${{ steps.version.outputs.version }}
jq --arg v "$VERSION" '.version = $v | .packages = (.packages // []) | .packages |= map(.version = $v)' server.json > tmp && mv tmp server.json

- name: Validate server.json against schema
run: npx --yes ajv-cli@5 validate -s https://static.modelcontextprotocol.io/schemas/2025-09-16/server.schema.json -d server.json

- name: Install MCP Publisher
run: |
curl -L "https://github.com/modelcontextprotocol/registry/releases/download/v1.1.0/mcp-publisher_1.1.0_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/').tar.gz" | tar xz mcp-publisher

- name: Login to MCP Registry (OIDC)
run: ./mcp-publisher login github-oidc

- name: Publish to MCP Registry
run: ./mcp-publisher publish

16 changes: 16 additions & 0 deletions .github/workflows/validate-server-json.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Validate MCP server.json

on:
pull_request:
branches: ['**']
push:
branches: ['main']

jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Validate server.json against schema
run: npx --yes ajv-cli@5 validate -s https://static.modelcontextprotocol.io/schemas/2025-09-16/server.schema.json -d server.json

Binary file added mcp-publisher
Binary file not shown.
31 changes: 31 additions & 0 deletions server.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-09-16/server.schema.json",
"name": "io.github.appwrite/website",
"description": "An MCP server that provides [describe what your server does]",
"status": "active",
"repository": {
"url": "https://github.com/appwrite/website",
"source": "github"
},
"version": "1.0.0",
"packages": [
{
"registryType": "npm",
"registryBaseUrl": "https://registry.npmjs.org",
"identifier": "appwrite-website",
"version": "1.0.0",
"transport": {
"type": "stdio"
},
"environmentVariables": [
{
"description": "Your API key for the service",
"isRequired": true,
"format": "string",
"isSecret": true,
"name": "YOUR_API_KEY"
}
]
}
]
}
Loading
Loading