MCP Monitors
Preview
MCP monitor support is in preview. Feature availability may vary by account tier.
An MCP Monitor tests an AI tool or agent that exposes the Model Context Protocol (MCP). Instead of making a plain HTTP request, APIContext connects to an MCP server, calls one of its tools or resources, and asserts on the response — letting you verify that your AI-powered services remain reliable and correct on a schedule.
When to use
Use an MCP monitor when you want to:
- Verify that an MCP server responds to tool calls within acceptable latency bounds
- Assert on the structure or content of tool outputs (e.g., a code-generation tool returns valid JSON)
- Alert on regressions in AI service availability or response quality
How it works
- APIContext connects to your MCP server over the configured transport (HTTP, SSE, or stdio).
- It issues a tool call or resource request with your configured parameters.
- The response is evaluated against your assertions (status, schema, content checks).
- Results are recorded — latency, pass/fail, raw response — and available in the project dashboard.
Setup
Step 1: Create an MCP monitor
- In the sidebar, under CONFIGURE MONITORING, click Monitors.
- Click + Add New Monitor.
- In the monitor type picker, select MCP.
Step 2: Configure the connection
Fill in the connection fields:
| Field | Description |
|---|---|
| MCP Server URL | The base URL of your MCP server (e.g., https://mcp.example.com) |
| Transport | HTTP, SSE, or stdio |
| Tool name | The MCP tool to call (e.g., search, generate) |
| Timeout (ms) | Maximum time to wait for a response before marking as failed |
| Wait for completion | For async tools: wait until the tool signals completion before evaluating |
Step 3: Set input parameters
Under Parameters, provide the tool's input in JSON format. Use APIContext variables (%%VAR%%) for values that change between runs.
Step 4: Add assertions
Use the Assertions tab to check the response:
- Status — the tool returned a result (not an error)
- Schema — the response matches a JSON schema
- Content — a JSON path value equals, contains, or matches a pattern
Step 5: Add to a schedule
Add the monitor to a schedule to run automatically.