@@ -91,18 +91,21 @@ jobs:
9191 - name : Build registry-builder
9292 run : go build -o registry-builder ./cmd/registry-builder
9393
94- - name : Build registry.json
94+ - name : Build registry files (both formats)
9595 run : |
9696 mkdir -p dist
97- ./registry-builder build -v
97+ ./registry-builder build --format all - v
9898 cp build/registry.json dist/registry.json
99+ cp build/official-registry.json dist/official-registry.json
99100 CONTAINER_COUNT=$(jq '.servers | length' dist/registry.json)
100101 REMOTE_COUNT=$(jq '.remote_servers | length // 0' dist/registry.json)
101102 TOTAL_COUNT=$((CONTAINER_COUNT + REMOTE_COUNT))
102103 echo "Registry built successfully with $TOTAL_COUNT entries ($CONTAINER_COUNT container-based, $REMOTE_COUNT remote)"
104+ echo "Both ToolHive and official MCP formats generated"
103105
104- - name : Validate JSON
106+ - name : Validate JSON files
105107 run : |
108+ echo "Validating ToolHive format..."
106109 # Validate JSON structure
107110 jq empty dist/registry.json
108111 echo "✅ Valid JSON"
@@ -119,6 +122,35 @@ jobs:
119122
120123 jq -e '."$schema"' dist/registry.json > /dev/null
121124 echo "✅ Has schema field"
125+
126+ echo ""
127+ echo "Validating Official MCP format..."
128+ # Validate official registry JSON structure
129+ jq empty dist/official-registry.json
130+ echo "✅ Valid JSON"
131+
132+ # Check required fields for official format
133+ jq -e '.version' dist/official-registry.json > /dev/null
134+ echo "✅ Has version field"
135+
136+ jq -e '.meta.last_updated' dist/official-registry.json > /dev/null
137+ echo "✅ Has meta.last_updated field"
138+
139+ jq -e '.data.servers' dist/official-registry.json > /dev/null
140+ echo "✅ Has data.servers field"
141+
142+ # Check that servers have the flattened structure with _meta
143+ SERVER_COUNT=$(jq '.data.servers | length' dist/official-registry.json)
144+ if [ "$SERVER_COUNT" -gt 0 ]; then
145+ jq -e '.data.servers[0].name' dist/official-registry.json > /dev/null
146+ echo "✅ Servers have name field"
147+
148+ jq -e '.data.servers[0]._meta.publisher' dist/official-registry.json > /dev/null
149+ echo "✅ Servers have _meta.publisher field"
150+
151+ jq -e '.data.servers[0]._meta."io.modelcontextprotocol.registry"' dist/official-registry.json > /dev/null
152+ echo "✅ Servers have registry extensions"
153+ fi
122154
123155 - name : Generate metadata
124156 id : metadata
@@ -175,11 +207,15 @@ jobs:
175207 cd dist
176208 sha256sum registry.json > registry.json.sha256
177209 md5sum registry.json > registry.json.md5
210+ sha256sum official-registry.json > official-registry.json.sha256
211+ md5sum official-registry.json > official-registry.json.md5
178212
179213 - name : Create tarball
180214 run : |
181215 cd dist
182- tar -czf registry-${{ steps.metadata.outputs.version }}.tar.gz registry.json registry.json.sha256 registry.json.md5
216+ tar -czf registry-${{ steps.metadata.outputs.version }}.tar.gz \
217+ registry.json registry.json.sha256 registry.json.md5 \
218+ official-registry.json official-registry.json.sha256 official-registry.json.md5
183219 tar -tzf registry-${{ steps.metadata.outputs.version }}.tar.gz
184220
185221 - name : Check if release exists
@@ -251,16 +287,22 @@ jobs:
251287
252288 ### 📥 Download Options
253289
254- - **registry.json** - The complete registry file
255- - **registry-${{ steps.metadata.outputs.version }}.tar.gz** - Archive with checksums
290+ **Individual Files:**
291+ - **registry.json** - ToolHive format registry file
292+ - **official-registry.json** - Official MCP format registry file
293+
294+ **Archives:**
295+ - **registry-${{ steps.metadata.outputs.version }}.tar.gz** - Complete archive with both formats and checksums
256296
257297 ### 🔗 Direct URLs
258298
259- Latest registry is always available at:
260- - `https://github.com/stacklok/toolhive-registry/releases/latest/download/registry.json`
299+ **ToolHive Format:**
300+ - Latest: `https://github.com/stacklok/toolhive-registry/releases/latest/download/registry.json`
301+ - This version: `https://github.com/stacklok/toolhive-registry/releases/download/v${{ steps.metadata.outputs.version }}/registry.json`
261302
262- This specific version:
263- - `https://github.com/stacklok/toolhive-registry/releases/download/v${{ steps.metadata.outputs.version }}/registry.json`
303+ **Official MCP Format:**
304+ - Latest: `https://github.com/stacklok/toolhive-registry/releases/latest/download/official-registry.json`
305+ - This version: `https://github.com/stacklok/toolhive-registry/releases/download/v${{ steps.metadata.outputs.version }}/official-registry.json`
264306
265307 ### 📝 Recent Changes
266308
@@ -272,6 +314,9 @@ jobs:
272314 dist/registry.json
273315 dist/registry.json.sha256
274316 dist/registry.json.md5
317+ dist/official-registry.json
318+ dist/official-registry.json.sha256
319+ dist/official-registry.json.md5
275320 dist/registry-${{ steps.metadata.outputs.version }}.tar.gz
276321 makeLatest : true
277322 artifactErrorsFailBuild : true
@@ -285,13 +330,19 @@ jobs:
285330 gh release delete-asset "v${{ steps.metadata.outputs.version }}" registry.json --yes || true
286331 gh release delete-asset "v${{ steps.metadata.outputs.version }}" registry.json.sha256 --yes || true
287332 gh release delete-asset "v${{ steps.metadata.outputs.version }}" registry.json.md5 --yes || true
333+ gh release delete-asset "v${{ steps.metadata.outputs.version }}" official-registry.json --yes || true
334+ gh release delete-asset "v${{ steps.metadata.outputs.version }}" official-registry.json.sha256 --yes || true
335+ gh release delete-asset "v${{ steps.metadata.outputs.version }}" official-registry.json.md5 --yes || true
288336 gh release delete-asset "v${{ steps.metadata.outputs.version }}" "registry-${{ steps.metadata.outputs.version }}.tar.gz" --yes || true
289337
290338 # Upload new assets
291339 gh release upload "v${{ steps.metadata.outputs.version }}" \
292340 dist/registry.json \
293341 dist/registry.json.sha256 \
294342 dist/registry.json.md5 \
343+ dist/official-registry.json \
344+ dist/official-registry.json.sha256 \
345+ dist/official-registry.json.md5 \
295346 "dist/registry-${{ steps.metadata.outputs.version }}.tar.gz" \
296347 --clobber
297348
0 commit comments