Skip to content

Commit 5f8850a

Browse files
authored
Merge pull request #102 from stacklok/refer-upstream-schema
Use the official upstream schema as a reference for the server description
2 parents 71e8d76 + b251a40 commit 5f8850a

File tree

27 files changed

+454
-364
lines changed

27 files changed

+454
-364
lines changed

.github/workflows/build-and-publish.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,17 @@ jobs:
6363
name: codecov-umbrella
6464
continue-on-error: true
6565

66-
- name: Build tools
66+
- name: Install Task
67+
uses: arduino/setup-task@v2
68+
69+
- name: Validate schema file syntax
6770
run: |
68-
go build -o registry-builder ./cmd/registry-builder
69-
go build -o import-from-toolhive ./cmd/import-from-toolhive
71+
echo "Validating schema JSON syntax..."
72+
jq empty schemas/registry.schema.json
73+
echo "✅ Schema file is valid JSON"
7074
7175
- name: Validate registry entries
72-
run: ./registry-builder validate -v
76+
run: task validate
7377

7478
build-and-release:
7579
name: Build and Release Registry
@@ -88,13 +92,13 @@ jobs:
8892
go-version-file: 'go.mod'
8993
cache: true
9094

91-
- name: Build registry-builder
92-
run: go build -o registry-builder ./cmd/registry-builder
95+
- name: Install Task
96+
uses: arduino/setup-task@v2
9397

9498
- name: Build registry files (both formats)
9599
run: |
96100
mkdir -p dist
97-
./registry-builder build --format all -v
101+
task build:registry
98102
cp build/registry.json dist/registry.json
99103
cp build/official-registry.json dist/official-registry.json
100104
CONTAINER_COUNT=$(jq '.servers | length' dist/registry.json)

.github/workflows/update-tools.yml

Lines changed: 136 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -184,34 +184,32 @@ jobs:
184184
fi
185185
fi
186186
187-
- name: Commit changes
187+
- name: Stage changes for later commit
188188
if: (steps.update.outputs.changed == 'true' || steps.update.outputs.warning-added == 'true') && github.event_name == 'pull_request'
189189
run: |
190-
git config --local user.email "[email protected]"
191-
git config --local user.name "GitHub Action"
190+
# Just stage the files, don't commit yet
191+
git add "${{ matrix.spec }}"
192192
193+
# Create a summary file for the commit job to use
193194
SERVER_NAME="${{ steps.server-info.outputs.server-name }}"
195+
mkdir -p /tmp/commit-info
194196
195197
if [ "${{ steps.update.outputs.changed }}" = "true" ]; then
196-
git add "${{ matrix.spec }}"
197-
git commit -m "chore: update tool list for $SERVER_NAME
198-
199-
Automatically updated tool list using 'thv mcp list --server $SERVER_NAME'
200-
201-
Co-authored-by: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>"
198+
echo "update" > "/tmp/commit-info/${SERVER_NAME}.type"
199+
echo "$SERVER_NAME" > "/tmp/commit-info/${SERVER_NAME}.name"
200+
echo "${{ matrix.spec }}" > "/tmp/commit-info/${SERVER_NAME}.spec"
202201
else
203-
git add "${{ matrix.spec }}"
204-
git commit -m "chore: add warning for $SERVER_NAME tool list update failure
205-
206-
Could not fetch tools from MCP server, added warning comment.
207-
208-
Co-authored-by: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>"
202+
echo "warning" > "/tmp/commit-info/${SERVER_NAME}.type"
203+
echo "$SERVER_NAME" > "/tmp/commit-info/${SERVER_NAME}.name"
204+
echo "${{ matrix.spec }}" > "/tmp/commit-info/${SERVER_NAME}.spec"
209205
fi
210-
211-
- name: Push changes
206+
207+
- name: Upload commit info
212208
if: (steps.update.outputs.changed == 'true' || steps.update.outputs.warning-added == 'true') && github.event_name == 'pull_request'
213-
run: |
214-
git push
209+
uses: actions/upload-artifact@v4
210+
with:
211+
name: commit-info-${{ steps.server-info.outputs.server-name }}
212+
path: /tmp/commit-info/
215213

216214
- name: Output diff for workflow dispatch
217215
if: github.event_name == 'workflow_dispatch' && (steps.update.outputs.changed == 'true' || steps.update.outputs.warning-added == 'true')
@@ -247,6 +245,89 @@ jobs:
247245
echo "**Spec File**: \`${{ matrix.spec }}\`" >> $GITHUB_STEP_SUMMARY
248246
echo "**Triggered by**: @${{ github.actor }}" >> $GITHUB_STEP_SUMMARY
249247
248+
commit-all-changes:
249+
name: Commit All Tool Updates
250+
needs: update-tools
251+
if: always() && needs.detect-changes.outputs.has-changes == 'true' && github.event_name == 'pull_request'
252+
runs-on: ubuntu-latest
253+
steps:
254+
- name: Checkout code
255+
uses: actions/checkout@v5
256+
with:
257+
token: ${{ secrets.GITHUB_TOKEN }}
258+
ref: ${{ github.head_ref || github.ref }}
259+
260+
- name: Download all commit info artifacts
261+
uses: actions/download-artifact@v4
262+
with:
263+
path: /tmp/artifacts/
264+
pattern: commit-info-*
265+
merge-multiple: true
266+
267+
- name: Check if any changes were made
268+
id: check_changes
269+
run: |
270+
if [ -d "/tmp/artifacts" ] && [ "$(ls -A /tmp/artifacts 2>/dev/null)" ]; then
271+
echo "changes=true" >> $GITHUB_OUTPUT
272+
echo "Found commit info files:"
273+
ls -la /tmp/artifacts/
274+
else
275+
echo "changes=false" >> $GITHUB_OUTPUT
276+
echo "No changes to commit"
277+
fi
278+
279+
- name: Commit and push all changes
280+
if: steps.check_changes.outputs.changes == 'true'
281+
run: |
282+
git config --local user.email "[email protected]"
283+
git config --local user.name "GitHub Action"
284+
285+
# Pull any remote changes first to avoid conflicts
286+
git pull origin ${{ github.head_ref || github.ref_name }} --rebase
287+
288+
# Collect all the server names that were updated
289+
UPDATED_SERVERS=""
290+
WARNING_SERVERS=""
291+
292+
for file in /tmp/artifacts/*.type; do
293+
if [ -f "$file" ]; then
294+
SERVER_NAME=$(basename "$file" .type)
295+
TYPE=$(cat "$file")
296+
297+
if [ "$TYPE" = "update" ]; then
298+
UPDATED_SERVERS="$UPDATED_SERVERS $SERVER_NAME"
299+
else
300+
WARNING_SERVERS="$WARNING_SERVERS $SERVER_NAME"
301+
fi
302+
303+
# Stage the corresponding spec file
304+
SPEC_FILE=$(cat "/tmp/artifacts/${SERVER_NAME}.spec")
305+
git add "$SPEC_FILE"
306+
fi
307+
done
308+
309+
# Create commit message
310+
COMMIT_MSG="chore: update tool lists for MCP servers"
311+
312+
if [ -n "$UPDATED_SERVERS" ]; then
313+
COMMIT_MSG="$COMMIT_MSG\n\nUpdated servers:$(echo $UPDATED_SERVERS | sed 's/ /\\n- /g' | sed 's/^/\\n- /')"
314+
fi
315+
316+
if [ -n "$WARNING_SERVERS" ]; then
317+
COMMIT_MSG="$COMMIT_MSG\n\nWarning added for servers:$(echo $WARNING_SERVERS | sed 's/ /\\n- /g' | sed 's/^/\\n- /')"
318+
fi
319+
320+
COMMIT_MSG="$COMMIT_MSG\n\nAutomatically updated using 'thv mcp list' command.\n\nCo-authored-by: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>"
321+
322+
# Check if there are actually any changes to commit
323+
if ! git diff --cached --quiet; then
324+
git commit -m "$COMMIT_MSG"
325+
git push
326+
echo "✅ Successfully committed and pushed all tool updates"
327+
else
328+
echo "ℹ️ No changes to commit (files may have been identical)"
329+
fi
330+
250331
comment-summary:
251332
name: Post Summary Comment
252333
needs: [detect-changes, update-tools]
@@ -262,6 +343,41 @@ jobs:
262343
comment-author: 'github-actions[bot]'
263344
body-includes: '## 🔧 MCP Server Tool List Updates'
264345

346+
- name: Download all commit info artifacts
347+
uses: actions/download-artifact@v4
348+
with:
349+
path: /tmp/comment-artifacts/
350+
pattern: commit-info-*
351+
merge-multiple: true
352+
353+
- name: Generate summary from artifacts
354+
id: generate-summary
355+
run: |
356+
SUMMARY=""
357+
358+
if [ -d "/tmp/comment-artifacts" ] && [ "$(ls -A /tmp/comment-artifacts 2>/dev/null)" ]; then
359+
for file in /tmp/comment-artifacts/*.type; do
360+
if [ -f "$file" ]; then
361+
SERVER_NAME=$(basename "$file" .type)
362+
TYPE=$(cat "$file")
363+
364+
if [ "$TYPE" = "update" ]; then
365+
SUMMARY="$SUMMARY| $SERVER_NAME | ✅ Updated | Tool list refreshed |\n"
366+
else
367+
SUMMARY="$SUMMARY| $SERVER_NAME | ⚠️ Warning | Could not fetch tools, added warning comment |\n"
368+
fi
369+
fi
370+
done
371+
fi
372+
373+
if [ -z "$SUMMARY" ]; then
374+
SUMMARY="| _No changes detected_ | | |"
375+
fi
376+
377+
echo "summary<<EOF" >> $GITHUB_OUTPUT
378+
echo -e "$SUMMARY" >> $GITHUB_OUTPUT
379+
echo "EOF" >> $GITHUB_OUTPUT
380+
265381
- name: Create or update comment
266382
if: github.event_name == 'pull_request'
267383
uses: peter-evans/create-or-update-comment@v4
@@ -277,7 +393,7 @@ jobs:
277393
278394
| Server | Status | Details |
279395
|--------|--------|---------|
280-
${{ needs.update-tools.outputs.summary || '| _Processing results..._ | | |' }}
396+
${{ steps.generate-summary.outputs.summary }}
281397
282398
---
283399
_This comment is automatically generated and will be updated as the workflow progresses._

Taskfile.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,13 @@ tasks:
260260
cmds:
261261
- ./{{.BUILD_DIR}}/registry-builder version
262262

263+
sync-schema:
264+
desc: Sync schema reference with Go dependency version
265+
cmds:
266+
- echo "🔄 Syncing schema version with Go dependency..."
267+
- ./scripts/sync-schema-version.sh
268+
- echo "✅ Schema sync complete. Run 'task validate' to verify."
269+
263270
watch:
264271
desc: Watch for changes and rebuild (requires entr)
265272
cmds:

registry/arxiv-mcp-server/spec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Import timestamp: 2025-08-14T07:27:00Z
66
# ---
77
name: arxiv-mcp-server
8-
description: Enables AI assistants to search and access arXiv research papers through MCP protocol. Mount a volume to /arxiv-papers for persistent paper storage.
8+
description: AI assistants search and access arXiv papers through MCP with persistent paper storage
99
tier: Community
1010
status: Active
1111
transport: stdio

registry/cloud-run/spec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Import timestamp: 2025-08-14T07:27:00Z
66
# ---
77
name: cloud-run
8-
description: Deploy apps to Google Cloud Run directly from AI assistants. Enables deployment of containerized applications, local files, and folders to Cloud Run with integrated logging and service management.
8+
description: Deploy apps to Google Cloud Run with integrated logging and service management
99
tier: Official
1010
status: Active
1111
transport: stdio

registry/context7/spec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Import timestamp: 2025-08-14T07:27:00Z
66
# ---
77
name: context7
8-
description: Context7 MCP pulls up-to-date, version-specific documentation and code examples straight from the source — and places them directly into your prompt
8+
description: Context7 MCP pulls version-specific docs and code examples directly into your prompt
99
tier: Community
1010
status: Active
1111
transport: stdio

registry/crowdstrike-falcon/spec.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44
# Original source: https://github.com/stacklok/toolhive
55
# Import timestamp: 2025-08-14T07:27:00Z
66
# ---
7+
# WARNING: Tool list fetch failed on 2025-09-04
8+
# Manual verification may be required
79
name: crowdstrike-falcon
8-
description: Connects AI agents with the CrowdStrike Falcon platform for intelligent security analysis, providing programmatic access to detections, incidents, behaviors, threat intelligence, hosts, vulnerabilities, and identity protection capabilities.
10+
description: CrowdStrike Falcon integration for security analysis, detections, incidents, and threat intel
911
tier: Official
1012
status: Active
1113
transport: streamable-http

registry/dolt/spec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Docker/OCI image reference
22
image: docker.io/dolthub/dolt-mcp:0.2.0
33
# One-line description
4-
description: Provides Git-like version control for SQL databases using Dolt, enabling branching, merging, and versioning of database schemas and data
4+
description: Git-like version control for SQL databases with branching, merging, and data versioning
55
# Communication protocol
66
transport: streamable-http
77
# Source code repository

registry/firecrawl/spec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Import timestamp: 2025-08-14T07:27:00Z
66
# ---
77
name: firecrawl
8-
description: A powerful web scraping and content extraction MCP server that provides advanced crawling, search, and structured data extraction capabilities with LLM integration.
8+
description: Web scraping and content extraction MCP server with advanced crawling and LLM integration
99
tier: Official
1010
status: Active
1111
transport: stdio

registry/genai-toolbox/spec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# WARNING: Tool list fetch failed on 2025-08-28
88
# Manual verification may be required
99
name: genai-toolbox
10-
description: A comprehensive MCP server for database operations that provides tools for connecting to and interacting with various database systems with advanced features like connection pooling, authentication, and observability. Mount and configured via tools.yaml
10+
description: Database operations MCP server with connection pooling, authentication, and observability
1111
tier: Official
1212
status: Active
1313
transport: sse

0 commit comments

Comments
 (0)