Skip to content

add mcp server meta.json #6

add mcp server meta.json

add mcp server meta.json #6

name: Auto-aggregate MCP Server Data
on:
push:
paths:
- 'mcp_servers/**'
pull_request:
paths:
- 'mcp_servers/**'
workflow_dispatch: # Allow manual trigger
jobs:
aggregate-data:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.GH_TOKEN }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
- name: Run MCP data aggregation
run: |
echo "🚀 Running MCP data aggregation..."
node .github/scripts/aggregate-mcp-data.js
echo "✅ Aggregation completed"
- name: Check for changes
id: check-changes
run: |
if [ -n "$(git diff --name-only)" ]; then
echo "changes=true" >> $GITHUB_OUTPUT
echo "📊 Changes detected in mcp_servers.json"
else
echo "changes=false" >> $GITHUB_OUTPUT
echo "ℹ️ No changes in mcp_servers.json"
fi
- name: Commit and push changes
if: steps.check-changes.outputs.changes == 'true'
run: |
git config --local user.email "[email protected]"
git config --local user.name "arvinxx"
git add mcp_servers.json
git commit -m "🤖 Auto-update mcp_servers.json
- Updated aggregated MCP server data
- Generated by: ${{ github.event_name }} on ${{ github.ref_name }}
- Commit: ${{ github.sha }}"
git push
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
- name: Create PR comment (for PRs)
if: github.event_name == 'pull_request' && steps.check-changes.outputs.changes == 'true'
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
// Read the updated mcp_servers.json
const data = JSON.parse(fs.readFileSync('mcp_servers.json', 'utf8'));
// Generate summary
let summary = '## 🤖 MCP Server Data Updated\n\n';
summary += `Generated at: ${data.generated_at}\n`;
summary += `Runs (k): ${data.k}\n\n`;
summary += '### Performance Summary\n\n';
summary += '| Server | Implementation | Tasks | Pass@1 | Per-Run Cost |\n';
summary += '|--------|----------------|-------|--------|-------------|\n';
for (const [serverName, implementations] of Object.entries(data.leaderboard)) {
for (const [implName, metrics] of Object.entries(implementations)) {
const pass1 = (metrics['pass@1'].avg * 100).toFixed(1);
const cost = metrics.per_run_cost ? `$${metrics.per_run_cost.toFixed(2)}` : 'N/A';
summary += `| ${serverName} | ${implName} | ${metrics.total_tasks} | ${pass1}% | ${cost} |\n`;
}
}
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: summary
});