Repository navigation
Conversation
APIClient.APIVersion, when set, is sent instead of the configured CRONITOR_API_VERSION, for endpoints that need a minimum API version. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B4Z4DjjwWh9BgvdzdFoMnc
Creates a check with type "check", platform "mcp" for a remote MCP server URL, or updates the check named by --key when it exists. Auth is --header "Name: value" (repeatable; values are sent write-only and redacted from verbose logs) or --oauth, which starts a sign-in at /monitors/mcp/oauth/start, prints the authorize URL, opens the browser and polls the connection every 2s until it is ready, failed or expired, then saves the monitor with mcp.oauth_connection. Also --tools, --include-descriptions and --accept-baseline. Requests send Cronitor-Version 2025-11-28. Prints the key, protocol version, auth, watched tools and baseline tools; 400s show the server's mcp messages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B4Z4DjjwWh9BgvdzdFoMnc
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B4Z4DjjwWh9BgvdzdFoMnc
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Merge and release after cronitorio/cronitor#767 is deployed.
--oauthuses server endpoints that PR adds. Until then the command stops with "OAuth start did not return authorize_url and connection". Header auth works against any server that has MCP checks.What it does
cronitor monitor mcpcreates or updates an MCP check: a Cronitor uptime check that connects to a remote MCP server, lists its tools, and alerts when the connection, the auth, the tools or the speed change.Create or update: with
--key, the command updates the check if it exists (GETthenPUT /monitors/<key>) and creates it otherwise. Without--keyit creates a new check.--toolsand--include-descriptionsare only sent when given, so an update doesn't reset them.--header: repeatable,"Name: value". Values are stored write-only on the server and never printed. They are also redacted from-vand--logoutput through the existingrememberSecret.--oauth:POST /monitors/mcp/oauth/start.GET /monitors/mcp/oauth/connections/<id>every 2 s until the status is ready, failed or expired, or untilexpires_inruns out. Ctrl-C stops it.mcp.oauth_connection.The CLI never sees the OAuth tokens; Cronitor keeps them. The user signs in to the MCP server's provider in a browser where they are logged in to Cronitor, and lands on a page that says they can return to the terminal.
Output: the check key, protocol version, auth (header names or the OAuth issuer), watched tools and baseline tools. A server 400 prints its message, for example
Auth failed: server returned 401orheader values are required.--headerand--oauthare exclusive.Changes
lib/api_client.go: a newAPIClient.APIVersionfield, so these requests can sendCronitor-Version: 2025-11-28without changing the global setting.cmd/monitor_mcp.go(new): the command. It reuses the browser and polling helpers fromcmd/connect.goandcmd/integrations_common.go.cmd/monitor_mcp_test.go(new): 4 tests against an httptest server.oauth_connection;--headerwith--oauthis rejected.Each test also checks the
Cronitor-Versionheader.README.md: an "MCP server checks" section with one header example and one OAuth example.Tests
go test ./cmd ./libpasses, including the existing README-examples test.go test ./...can't build the root package locally, becauseweb/staticis gitignored and CI builds it first.Generated by Claude Code