Define this in code. YAML format · Terraform
Config fields
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
config.command | string | Yes | — | Command to start the MCP server |
config.args | array of string | No | [] | Command-line arguments |
config.env | object | No | {} | Environment variables to set for the process |
Assertions
| Assertion | Required fields | Description |
|---|---|---|
mcp_connects | (none) | Passes if the MCP server starts and accepts connections |
mcp_response_time | maxMs | Fails if initialization takes longer than threshold |
mcp_response_time_warn | warnMs | Records degraded hint for elevated startup time |
mcp_has_capability | capability | Fails if the server doesn’t advertise a specific capability |
mcp_tool_available | toolName | Fails if a specific tool isn’t in the server’s tool list |
mcp_min_tools | min | Fails if the tool count is below minimum |
mcp_protocol_version | version | Fails if the server’s MCP protocol version doesn’t match |
mcp_tool_count_changed | expectedCount | Fails if the tool count differs from expected (detects drift) |
Examples
Basic connectivity
monitors:
- name: Custom MCP server
type: MCP_SERVER
config:
command: node
args: ["dist/server.js"]
assertions:
- config:
type: mcp_connects
severity: fail
Full validation
monitors:
- name: Production MCP
type: MCP_SERVER
config:
command: uvx
args: ["devhelm-mcp-server"]
env:
DEVHELM_API_TOKEN: ${MCP_TOKEN}
frequencySeconds: 300
regions: [us-east]
assertions:
- config:
type: mcp_connects
severity: fail
- config:
type: mcp_response_time
maxMs: 10000
severity: fail
- config:
type: mcp_tool_available
toolName: list-monitors
severity: fail
- config:
type: mcp_tool_available
toolName: create-monitor
severity: fail
- config:
type: mcp_min_tools
min: 5
severity: warn
- config:
type: mcp_tool_count_changed
expectedCount: 12
severity: warn
Next steps
MCP overview
When to use MCP server monitors.
MCP Server SDK
The DevHelm MCP server for AI agents.