feat: add MCP transport client, remove broken speculative REST methods#19
Merged
Conversation
Add HyperpingMcpClient for features only accessible via the MCP server (JSON-RPC 2.0 over HTTP). Verified against live API: all 12 speculative REST endpoints return 404/401; the same features work via MCP transport. New: - McpTransport: JSON-RPC 2.0 client with auto-init handshake - HyperpingMcpClient: 16 typed methods for on-call, alerts, anomalies, integrations, probe logs, response time, MTTA/MTTR, status summary, outage timeline, and monitor search - MCP_URL constant exported from package - 29 new tests (9 transport + 20 client) - scripts/verify_endpoints.py for live API verification Removed: - 8 speculative mixin files (sync + async) that called nonexistent REST paths - Speculative methods from outages/monitors mixins - 8 speculative Endpoint enum entries - 5 speculative test files Models kept intact for use by MCP client.
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.
Summary
Adds
HyperpingMcpClientfor the 16 features only accessible via Hyperping's MCP server (JSON-RPC 2.0). Removes the 12 speculative REST methods added in v1.3.0 that all return 404/401 against the live API.Verified against live API
/v1/mcpscripts/verify_endpoints.pyNew
McpTransport: JSON-RPC 2.0 client with auto-init handshake, error mappingHyperpingMcpClient: 16 typed methods (on-call, alerts, anomalies, integrations, probe logs, response time, MTTA/MTTR, status summary, outage timeline, monitor search)MCP_URLconstantRemoved
Breaking change
Users calling
client.list_on_call_schedules()etc onHyperpingClientwill getAttributeError. They need to switch toHyperpingMcpClient. Since these methods never worked (404), no real user code breaks.Test plan