Skip to content

feat: add MCP transport client, remove broken speculative REST methods#19

Merged
KhaledSalhab-Develeap merged 1 commit into
mainfrom
feat/mcp-client
Apr 19, 2026
Merged

feat: add MCP transport client, remove broken speculative REST methods#19
KhaledSalhab-Develeap merged 1 commit into
mainfrom
feat/mcp-client

Conversation

@KhaledSalhab-Develeap
Copy link
Copy Markdown
Collaborator

Summary

Adds HyperpingMcpClient for 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

  • All 12 REST endpoints: 0/12 work (10x 404, 2x 401 session-auth-only)
  • All 16 MCP tools: work via JSON-RPC at /v1/mcp
  • Verification script included: scripts/verify_endpoints.py

New

  • McpTransport: JSON-RPC 2.0 client with auto-init handshake, error mapping
  • HyperpingMcpClient: 16 typed methods (on-call, alerts, anomalies, integrations, probe logs, response time, MTTA/MTTR, status summary, outage timeline, monitor search)
  • MCP_URL constant
  • 29 new tests (9 transport + 20 client)

Removed

  • 8 speculative mixin files (sync + async)
  • Speculative methods from outages/monitors mixins
  • 8 speculative Endpoint enum entries
  • 5 speculative test files
  • All model files kept (used by MCP client)

Breaking change

Users calling client.list_on_call_schedules() etc on HyperpingClient will get AttributeError. They need to switch to HyperpingMcpClient. Since these methods never worked (404), no real user code breaks.

Test plan

  • 312 tests pass, 90.71% coverage
  • ruff check + format clean
  • Live MCP verification with API key

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.
@KhaledSalhab-Develeap KhaledSalhab-Develeap merged commit 972dc82 into main Apr 19, 2026
0 of 3 checks passed
@KhaledSalhab-Develeap KhaledSalhab-Develeap deleted the feat/mcp-client branch April 19, 2026 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant