Repository navigation
81 lines (79 loc) · 3.33 KB
/
Copy pathmcp-registry.yml
File metadata and controls
81 lines (79 loc) · 3.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: MCP Registry
on:
# Release calls this after every stable release; dispatch it to list a missed one.
workflow_call:
inputs:
version:
description: Exact released @master/css-mcp version to list
required: true
type: string
workflow_dispatch:
inputs:
version:
description: Exact released @master/css-mcp version to list
required: true
type: string
permissions:
contents: read
jobs:
publish:
# The io.github.master-co namespace needs an organization credential; GitHub OIDC
# proves this repository without a personal token (see .github/RELEASING.md).
if: ${{ github.ref == 'refs/heads/main' }}
concurrency:
group: mcp-registry
cancel-in-progress: false
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read
id-token: write
env:
VERSION: ${{ inputs.version }}
PUBLISHER_VERSION: v1.8.8
PUBLISHER_SHA256: 09f1fa70ee146b640584274a1a6b2b8a0310b05d4321fa9224e6df6a016d67f4
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- uses: actions/setup-node@v6
with:
node-version: "26"
package-manager-cache: false
- name: Install the pinned MCP publisher
run: |
curl -fsSL -o mcp-publisher.tar.gz "https://github.com/modelcontextprotocol/registry/releases/download/${PUBLISHER_VERSION}/mcp-publisher_linux_amd64.tar.gz"
echo "${PUBLISHER_SHA256} mcp-publisher.tar.gz" | sha256sum -c -
tar -xzf mcp-publisher.tar.gz mcp-publisher
- name: List the exact released npm package
run: |
set -euo pipefail
[[ "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] || { echo "Expected a stable version, got $VERSION" >&2; exit 1; }
name=$(node -p "require('./server.json').name")
test "$(npm view "@master/css-mcp@$VERSION" mcpName)" = "$name"
node -e '
const fs = require("fs"), version = process.env.VERSION
const server = JSON.parse(fs.readFileSync("server.json", "utf8"))
server.version = version
for (const pkg of server.packages) pkg.version = version
fs.writeFileSync("server.json", JSON.stringify(server, null, 2) + "\n")
'
./mcp-publisher validate server.json
- name: Publish with GitHub OIDC
run: |
./mcp-publisher login github-oidc
./mcp-publisher publish
- name: Verify the public listing
run: |
set -euo pipefail
name=$(node -p "encodeURIComponent(require('./server.json').name)")
curl --fail --silent --show-error --retry 5 --retry-delay 5 --retry-all-errors \
"https://registry.modelcontextprotocol.io/v0.1/servers/${name}/versions/${VERSION}" > listing.json
node -e '
const listing = require("./listing.json"), server = listing.server ?? listing
const pkg = server.packages.find(p => p.identifier === "@master/css-mcp")
if (server.version !== process.env.VERSION || pkg?.version !== process.env.VERSION || pkg.transport?.type !== "stdio") {
console.error(JSON.stringify(server, null, 2)); process.exit(1)
}
console.log(`Listed ${server.name}@${server.version} with stdio @master/css-mcp@${pkg.version}`)
'