mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-09 15:19:10 +02:00
89 lines
3.3 KiB
YAML
89 lines
3.3 KiB
YAML
name: Update MCPServerConfig Schema
|
|
|
|
# This workflow runs on merges to main to automatically update the config schema
|
|
# by creating a PR when changes are needed.
|
|
|
|
on:
|
|
push:
|
|
branches: ["main"]
|
|
paths:
|
|
- "src/fastmcp/utilities/mcp_server_config/**"
|
|
- "!src/fastmcp/utilities/mcp_server_config/v1/schema.json" # Exclude the local schema file
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: write
|
|
pull-requests: write
|
|
|
|
jobs:
|
|
update-config-schema:
|
|
timeout-minutes: 5
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
|
|
- name: Generate Marvin App token
|
|
id: marvin-token
|
|
uses: actions/create-github-app-token@v2
|
|
with:
|
|
app-id: ${{ secrets.MARVIN_APP_ID }}
|
|
private-key: ${{ secrets.MARVIN_APP_PRIVATE_KEY }}
|
|
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@v6
|
|
with:
|
|
enable-cache: true
|
|
cache-dependency-glob: "uv.lock"
|
|
|
|
- name: Install dependencies
|
|
run: uv sync --python 3.12
|
|
|
|
- name: Generate config schema
|
|
run: |
|
|
echo "🔄 Generating fastmcp.json schema..."
|
|
|
|
# Generate schema in docs/public for web access
|
|
uv run python -c "
|
|
from fastmcp.utilities.mcp_server_config import generate_schema
|
|
generate_schema('docs/public/schemas/fastmcp.json/latest.json')
|
|
print('✅ Latest schema generated in docs/public')
|
|
"
|
|
|
|
# Also update the v1 schema in docs/public
|
|
uv run python -c "
|
|
from fastmcp.utilities.mcp_server_config import generate_schema
|
|
generate_schema('docs/public/schemas/fastmcp.json/v1.json')
|
|
print('✅ v1 schema generated in docs/public')
|
|
"
|
|
|
|
# Generate schema in the source directory for local development
|
|
uv run python -c "
|
|
from fastmcp.utilities.mcp_server_config import generate_schema
|
|
generate_schema('src/fastmcp/utilities/mcp_server_config/v1/schema.json')
|
|
print('✅ Schema generated in utilities/mcp_server_config/v1/')
|
|
"
|
|
|
|
- name: Create Pull Request
|
|
uses: peter-evans/create-pull-request@v7
|
|
with:
|
|
token: ${{ steps.marvin-token.outputs.token }}
|
|
commit-message: "chore: Update fastmcp.json schema"
|
|
title: "chore: Update fastmcp.json schema"
|
|
body: |
|
|
This PR updates the fastmcp.json schema files to match the current source code.
|
|
|
|
The schema is automatically generated from `src/fastmcp/utilities/mcp_server_config/` to ensure consistency.
|
|
|
|
**Note:** This PR is fully automated and will update itself with any subsequent changes to the schema, or close automatically if the schema becomes up-to-date through other means. Feel free to leave it open until you're ready to merge.
|
|
|
|
🤖 Generated by Marvin
|
|
branch: marvin/update-config-schema
|
|
delete-branch: true
|
|
author: "marvin-context-protocol[bot] <225465937+marvin-context-protocol[bot]@users.noreply.github.com>"
|
|
committer: "marvin-context-protocol[bot] <225465937+marvin-context-protocol[bot]@users.noreply.github.com>"
|
|
|
|
- name: Summary
|
|
run: |
|
|
echo "✅ Config schema generation workflow completed"
|
|
echo "PR will be created if there are changes, or closed if schema is already up to date"
|