-
Notifications
You must be signed in to change notification settings - Fork 41
Fix MCP server config #67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
4e8765b
feat: output=md support
adarshdigievo f3e154e
chore: minor version bump
adarshdigievo 830606c
lint: ruff format
adarshdigievo 18a74a3
fix: Correct MCP config values in server.json, add a new action to pu…
adarshdigievo 35a9793
Merge branch 'main' into fix/mcp-server-config
adarshdigievo b1a2cd5
fix: Correct MCP config values in server.json - sync proejct version …
adarshdigievo cb7a310
fix: Correct MCP config values in server.json - add tests and CI chec…
adarshdigievo fe16872
Merge remote-tracking branch 'origin/fix/mcp-server-config' into fix/…
adarshdigievo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,79 @@ | ||
| name: Publish MCP Registry | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ main ] | ||
| paths: | ||
| - server.json | ||
| workflow_dispatch: | ||
|
|
||
| concurrency: | ||
| group: publish-mcp-registry | ||
| cancel-in-progress: false | ||
|
|
||
| jobs: | ||
| publish: | ||
| if: github.ref == 'refs/heads/main' | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| id-token: write | ||
|
|
||
| steps: | ||
| - name: Check out repository | ||
| uses: actions/checkout@v5 | ||
|
|
||
| - name: Check registry version alignment | ||
| run: | | ||
| PROJECT_VERSION="$(python3 -c 'import tomllib; print(tomllib.load(open("pyproject.toml", "rb"))["project"]["version"])')" | ||
| REGISTRY_VERSION="$(jq -r '.version' server.json)" | ||
| if [[ "${PROJECT_VERSION}" != "${REGISTRY_VERSION}" ]]; then | ||
| echo "::error title=Version mismatch::pyproject.toml is ${PROJECT_VERSION}, but server.json is ${REGISTRY_VERSION}. Keep both versions aligned." | ||
| exit 1 | ||
| fi | ||
|
|
||
| # Registry versions are immutable. Every server.json metadata update must | ||
| # use a version that has not previously been published. | ||
| - name: Check registry version is unpublished | ||
| run: | | ||
| SERVER_NAME="$(jq -r '.name' server.json)" | ||
| SERVER_VERSION="$(jq -r '.version' server.json)" | ||
| ENCODED_NAME="$(jq -rn --arg value "${SERVER_NAME}" '$value | @uri')" | ||
| ENCODED_VERSION="$(jq -rn --arg value "${SERVER_VERSION}" '$value | @uri')" | ||
| REGISTRY_URL="https://registry.modelcontextprotocol.io/v0.1/servers/${ENCODED_NAME}/versions/${ENCODED_VERSION}" | ||
| HTTP_STATUS="$(curl --silent --show-error --location \ | ||
| --output registry-version.json \ | ||
| --write-out '%{http_code}' \ | ||
| "${REGISTRY_URL}")" | ||
|
|
||
| case "${HTTP_STATUS}" in | ||
| 404) | ||
| ;; | ||
| 200) | ||
| echo "::error title=Registry version already exists::${SERVER_NAME} ${SERVER_VERSION} is already published. Bump version in server.json and pyproject.toml before publishing metadata changes." | ||
| exit 1 | ||
| ;; | ||
| *) | ||
| echo "::error title=Registry lookup failed::The registry returned HTTP ${HTTP_STATUS} while checking ${SERVER_NAME} ${SERVER_VERSION}." | ||
| cat registry-version.json | ||
| exit 1 | ||
| ;; | ||
| esac | ||
|
|
||
| - name: Install MCP publisher | ||
| env: | ||
| MCP_PUBLISHER_VERSION: v1.8.1 | ||
| MCP_PUBLISHER_SHA256: a06c9096dcb9727c13555b6be26c7effa707b01f06a4c561ba7a3635443cf2cc | ||
| run: | | ||
| curl --fail --location --silent --show-error \ | ||
| --output mcp-publisher.tar.gz \ | ||
| "https://github.com/modelcontextprotocol/registry/releases/download/${MCP_PUBLISHER_VERSION}/mcp-publisher_linux_amd64.tar.gz" | ||
| echo "${MCP_PUBLISHER_SHA256} mcp-publisher.tar.gz" | sha256sum --check - | ||
| tar -xzf mcp-publisher.tar.gz mcp-publisher | ||
| chmod +x mcp-publisher | ||
|
|
||
| - name: Authenticate to MCP Registry | ||
| run: ./mcp-publisher login github-oidc | ||
|
|
||
| - name: Publish server metadata | ||
| run: ./mcp-publisher publish server.json | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,16 +1,26 @@ | ||
| { | ||
| "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json", | ||
| "name": "io.github.serpapi/serpapi-mcp", | ||
| "version": "1.0.1", | ||
| "title": "SerpApi", | ||
| "version": "1.0.2", | ||
| "description": "Official SerpApi MCP server for Google, Bing, and other search engines.", | ||
| "websiteUrl": "https://serpapi.com/", | ||
| "repository": { | ||
| "url": "https://github.com/serpapi/serpapi-mcp", | ||
| "source": "github" | ||
| }, | ||
| "remotes": [ | ||
| { | ||
| "type": "http", | ||
| "url": "https://mcp.serpapi.com/mcp" | ||
| "type": "streamable-http", | ||
| "url": "https://mcp.serpapi.com/{SERPAPI_API_KEY}/mcp", | ||
| "variables": { | ||
|
adarshdigievo marked this conversation as resolved.
|
||
| "SERPAPI_API_KEY": { | ||
| "description": "Your SerpApi API key. Get one at https://serpapi.com/manage-api-key", | ||
| "isRequired": true, | ||
| "isSecret": true, | ||
| "placeholder": "your-serpapi-api-key" | ||
| } | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| } | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.