Connect via OpenAI API
Prerequisites
Section titled “Prerequisites”- An OpenAI API account with Responses API access
- An
umk_live_API key from app.uptimemonitoring.com — see Authentication
Connect
Section titled “Connect”Use the mcp tool type in a Responses API request. This example restricts allowed_tools to the read-only list_monitors for safe verification — remove the restriction to enable write tools in production:
curl https://api.openai.com/v1/responses \ -H "Authorization: Bearer $OPENAI_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "gpt-4o", "tools": [ { "type": "mcp", "server_label": "uptimemonitoring", "server_url": "https://api.uptimemonitoring.com/mcp", "headers": { "Authorization": "Bearer umk_live_..." }, "allowed_tools": ["list_monitors"] } ], "input": "List my UptimeMonitoring monitors." }'Replace umk_live_... with your UptimeMonitoring API key. Keep the two keys separate: OPENAI_API_KEY (sk-...) is your OpenAI credential; umk_live_... is your UptimeMonitoring credential.
Auth modes
Section titled “Auth modes”| Use case | Method |
|---|---|
| Backend-to-backend / server agent | Pass Authorization: Bearer umk_live_... in the headers field (shown above) |
| User-facing agent with OAuth | Pass the user’s OAuth access token via the authorization field of the MCP tool config instead of headers.Authorization |
To enable write tools (create_monitor, update_monitor, delete_monitor) in production, remove allowed_tools and handle the mcp_approval_request events in the response stream, or set require_approval: "never" only after confirming user intent in your application layer.
Verify
Section titled “Verify”Run the curl call above. The response should include a tool call to list_monitors and a follow-up assistant message summarising your monitors.
Common errors
Section titled “Common errors”| Symptom | Cause | Fix |
|---|---|---|
401 from UptimeMonitoring | Wrong key in headers.Authorization | Confirm the key starts with umk_live_ — do not use your OpenAI key here |
| MCP tool ignored by model | Older model version without mcp tool support | Switch to gpt-4o or a later model |
| Server not found | URL typo | The endpoint is https://api.uptimemonitoring.com/mcp, not mcp.uptimemonitoring.com |