AI Agent & Model Context Protocol (MCP) Manual

Developer & Autonomous Agent Documentation

Learn how autonomous coding agents, LLMs, and backend services can establish monitoring, query uptime metrics, trigger ad-hoc synthetic probes, and report incident updates programmatically.

Interactive API & MCP Live Sandbox

Execute live requests against synthetic endpoints and test response payloads in real time.

Request Payload (JSON)
Response Output
// Click "Send Live Request" above to view response telemetry.

1. Model Context Protocol (MCP) Server

Seseli exposes a full MCP JSON-RPC 2.0 server supporting both stdio and SSE transports. Add this entry to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS or %APPDATA%/Claude/claude_desktop_config.json on Windows):

{
  "mcpServers": {
    "seseli": {
      "command": "npx",
      "args": ["-y", "@seseli/mcp-server"],
      "env": {
        "SESELI_API_KEY": "ssl_live_YOUR_API_TOKEN"
      }
    }
  }
}

1b. Agent Onboarding (copy-paste prompt)

New to Seseli? Hand this prompt to your coding agent. It connects to Seseli MCP, shows you a consent deep link (sign in / create account → Authorize), then sets up monitoring and a status page — including a status.<your-domain> custom domain with a step-by-step DNS CNAME walkthrough.

Set up website monitoring and a public status page for my site with Seseli via MCP.

HOW TO CONNECT TO SESELI MCP (use whichever your client supports):
- Local / stdio: run its MCP server with: npx -y @seseli/mcp-server
- Remote / Streamable HTTP: POST https://api.seseli.io/v1/mcp (JSON-RPC 2.0).
  Discover first with GET https://api.seseli.io/.well-known/mcp.json —
  then call tools/list.

  No API key yet? No problem — get the deep link directly (no auth needed):
  POST https://api.seseli.io/v1/onboarding/deep-link
  with {"siteUrl": "https://example.com", "agent": "Claude Code"}
  (stdio MCP + start_onboarding also work without a key).

SEQUENCE — follow this exactly:
1. Call the Seseli MCP tool `start_onboarding` (or read resource
   `seseli://onboarding/guide` / prompt `onboarding` if you prefer), passing
   my website URL in `siteUrl` if I already gave it to you. The tool returns
   a deep link (https://app.seseli.io/onboarding?... on prod, or the dev/stage
   host in those environments). If remote MCP returns 401/Unauthorized because
   I have no key yet, fall back to POST /v1/onboarding/deep-link above, or
   just give me https://app.seseli.io/onboarding directly.
2. Show me that deep link as a clickable link and explain: open it on your
   phone/computer, sign in (or create a free account if you don't have one),
   then click "Authorize agent". That consent step issues a scoped
   ssl_live_... agent API key. STOP and wait — do not continue until I confirm
   I have consented and paste the key (or set SESELI_API_KEY) for you.
   Never ask for my password; the key is the only credential I should share.
3. Once authenticated, set up monitoring for my website:
   a. If you don't know my website URL yet, ask me for it.
   b. Call `create_monitor` with a sensible name, the URL, intervalSeconds 300,
      and tags ["agent-onboarded"].
   c. Call `trigger_check_now` to verify it is reachable and report
      status, latency, and TLS status in plain language.
4. ASK ME: "Do you want a public status page at status.<my-domain>?"
   - If yes, call `create_status_page` with a slug from my domain,
     title "<My Domain> Status", all monitor IDs you just created, and
     customDomain "status.<my-domain>". Then walk me through DNS step by step:
     add a CNAME record — Host "status" → Value "status.seseli.io" — at my
     registrar (give me Cloudflare/Route 53/Namecheap/GoDaddy wording if you
     can tell which one I use), how to verify with `dig CNAME`, propagation
     timing, and note the TLS certificate is provisioned automatically.
     Show me the public URL https://status.seseli.io/<slug> and the target
     https://status.<my-domain> (after DNS propagates).
   - If no, create the status page without a custom domain and show me the
     public https://status.seseli.io/<slug> URL.
5. Summarize what you did: monitor name + URL + check result, status page
   public URL (+ custom domain + DNS status if requested), and how to view it
   in the dashboard at https://app.seseli.io/dashboard.

RULES:
- Keep me in the loop: tell me before each step, pause at the consent step,
  and never create monitors or pages without my confirmation.
- If no MCP server is connected, tell me the exact 2-minute fix (add
  "seseli" with command "npx", args ["-y", "@seseli/mcp-server"] to my MCP
  client config) and wait for me to reconnect.
- If a step fails, explain the error in plain language and offer the next
  recovery step. Do not print secret keys back in full once set.

Full guide: docs/MCP_ONBOARDING.md · Consent page: /onboarding →

2. TypeScript / Node.js SDK

Install the lightweight, zero-dependency client in your repository:

npm install @seseli/sdk
import { createSeseliClient } from '@seseli/sdk';

const seseli = createSeseliClient({
  apiKey: process.env.SESELI_API_KEY, // e.g. "ssl_live_..."
});

// 1. Create a synthetic uptime monitor
const monitor = await seseli.monitors.create({
  name: "Production Payment Service",
  url: "https://api.acme.com/v1/payments/healthz",
  intervalSeconds: 60,
  assertions: {
    expectedStatusCodes: [200],
    latency: { thresholdMs: 250, comparison: "LESS_THAN" }
  },
  tags: ["payments", "tier-0", "soc2"]
});

// 2. Trigger an immediate on-demand probe
const checkResult = await seseli.monitors.triggerCheck({
  monitorId: monitor.id,
  region: "us-east-1"
});
console.log("Check latency:", checkResult.timing.totalMs, "ms");

3. Python & cURL REST API

import requests

API_KEY = "ssl_live_YOUR_TOKEN_HERE"
BASE_URL = "https://api.seseli.io/v1"

# Create a monitor via REST
resp = requests.post(
    f"{BASE_URL}/monitors",
    headers={"Authorization": f"Bearer {API_KEY}", "Content-Type": "application/json"},
    json={
        "name": "AI Vector Search API",
        "url": "https://vector.acme.com/readyz",
        "intervalSeconds": 60,
        "assertions": {"expectedStatusCodes": [200]}
    }
)
print("Monitor Created:", resp.json())

4. Available MCP Tools Reference

create_monitorTool

Creates a new synthetic uptime monitor for a website, API endpoint, or service. Enables automated health checks, latency tracking, SSL expiry detection, and alerting.

Required args: name, url
get_monitor_statusTool

Retrieves the real-time operational status, 7d/30d/90d uptime percentages, response latency metrics, and recent check history for a specific monitor.

Required args: monitorId
list_monitorsTool

Lists all active monitors in the organization with their current health statuses (UP, DOWN, DEGRADED, PAUSED), uptime stats, and tags.

Required args: None
trigger_check_nowTool

Triggers an immediate, synchronous multi-region synthetic check against an existing monitor or raw URL. Returns precise DNS, TLS, TTFB, and response timing.

Required args: None
analyze_failure_root_causeTool

Performs automated Root Cause Analysis (RCA) on a failed or degraded monitor, diagnosing error patterns and generating a blameless postmortem markdown report.

Required args: monitorId
detect_latency_anomaliesTool

Computes statistical baselines (Mean, StdDev, EWMA) and evaluates whether current response times represent statistical anomalies (Z-score deviation).

Required args: monitorId
pause_monitorTool

Pauses an active synthetic monitor (stops scheduled probes, keeps history).

Required args: monitorId
resume_monitorTool

Resumes a paused synthetic monitor (restarts scheduled probes).

Required args: monitorId
create_multistep_api_journeyTool

Creates an advanced chained synthetic transaction check (e.g., Step 1: Login -> Step 2: Extract Auth Token -> Step 3: Fetch User Profile -> Assert Data).

Required args: name, steps
create_status_pageTool

Creates or updates a public or white-labeled branded status page showcasing component health, 90-day uptime bars, and active incidents.

Required args: slug, title
create_incidentTool

Creates a new incident report on a status page and triggers notifications across all connected alert channels.

Required args: title, initialMessage
update_incidentTool

Appends a progress update or resolves an ongoing incident.

Required args: incidentId, status, message
create_heartbeat_monitorTool

Creates a dead-man switch / cron heartbeat monitor for AI agent background jobs, cron tasks, or scheduled workflows.

Required args: name, intervalSeconds
send_heartbeat_pingTool

Sends a heartbeat ping to signal that a scheduled agent job or cron task completed successfully.

Required args: pingToken
generate_agent_api_keyTool

Generates a new scoped API Key for autonomous agent subtasks or downstream microservices.

Required args: name
run_multistep_journeyTool

Executes a chained synthetic multi-step journey immediately across global regions with cookie jar support, dynamic variables, retry polling, and waterfall metrics.

Required args: steps
convert_workflow_to_journeyTool

Converts external workflow testing files/definitions (Postman Collection v2.1, HAR 1.2 network recordings, or cURL commands) into a native Seseli MultiStepJourney.

Required args: format, content
export_journey_as_codeTool

Exports a Seseli MultiStepJourney into runnable automated test code or collection files for Playwright (@playwright/test), k6, Postman Collection v2.1, or cURL.

Required args: format, journey
create_maintenance_windowTool

Schedules a maintenance window to suppress alerts for affected monitors and show a banner on status pages.

Required args: title, startAt, endAt
start_onboardingTool

Starts agent onboarding: returns the consent deep link the agent must show the user (sign in / create account → "Authorize agent" → scoped ssl_live_... key), the post-auth setup steps, and custom-domain DNS instructions for status.<domain>. Call this first; do not proceed to create_monitor until the user confirms consent and provides the API key.

Required args: None
get_org_usageTool

Queries usage metrics, billable event quantities, estimated cost, and active resource counts for the tenant/organization across all functionalities (synthetic probes, journeys, heartbeats, RCA, anomaly detections, alerts, and API calls).

Required args: None

Agent System Prompt

Add this snippet to your custom agent instructions so it knows how to use Seseli automatically:

You are equipped with Seseli Synthetic Monitoring tools. Whenever you finish building or deploying an HTTP endpoint, create a monitor with `create_monitor` and verify response SLA with `trigger_check_now`.

Compliance Controls

All agent API actions produce signed HMAC-SHA256 audit log records satisfying SOC 2 CC6.8 and HIPAA §164.312(b).

Learn more in Compliance Whitepaper →