Model Context Protocol (MCP) Server
Autonomous AI agent gateway for sub-5ms System 1 reflex execution, model inspection, dataset training, and zero-downtime publishing.
Model Context Protocol (MCP) for Autonomous AI Agents
Connect LLMs and autonomous agents (such as Claude 3.7 Sonnet, Antigravity IDE, Cursor, LangChain, and CrewAI) directly to Zirnay's sub-5ms System 1 decision engine. Agents can execute reflex inferences, inspect live model architectures, ingest training datasets, and publish candidate checkpoints with zero downtime.
1. The "System 1 vs. System 2" Agent Paradigm
Autonomous agents frequently stall while waiting for heavy frontier LLMs to execute trivial categorical decisions (e.g. "Should I approve this tool call?", "Is this prompt a jailbreak injection?", or "Route to finance vs customer support"). Zirnay equips agents with an instinctual, non-autoregressive coprocessor:
| DIMENSION | SYSTEM ONE: ZIRNAY MCP GATEWAY | SYSTEM TWO: FRONTIER LLM (GPT-4o / CLAUDE 3.7) |
|---|---|---|
| Latency Profile | 0.15ms – 2.50ms (Sub-millisecond) | 800ms – 3,500ms (Multi-second) |
| Inference Cost | $0.00010 – $0.00015 per decision | $0.015 – $0.075 per turn (Token-based) |
| Output Determinism | Strict typed contract (Softmax probabilities, calibrated ECE) | Non-deterministic token sampling (Hallucination risk) |
| Operational Role | Fast triage, safety reflex, continuous fraud scoring, gating | Deep conversational reasoning, synthesis, code authoring |
2. How to Integrate the MCP Server
Protocol: MCP v1.0Select your target environment below and copy the configuration snippet. Zirnay supports both local Stdio (child process) and Server-Sent Events (SSE) for cloud agents:
// Save to: .agents/mcp_config.json (workspace) OR ~/.gemini/config/mcp_config.json (global)
{
"mcpServers": {
"zirnay-decision-gateway": {
"command": "node",
"args": ["./mcp-server/dist/index.js"],
"env": {
"ZIRNAY_BASE_URL": "http://localhost:8000",
"ZIRNAY_API_KEY": "zrn_live_YOUR_API_KEY", // Replace with key from API Keys tab
"ZIRNAY_ORG_SLUG": "acme-financial",
"ZIRNAY_DEFAULT_TEAM": "fraud-ops"
}
}
}
}
3. Executable MCP Tools Reference
The server registers 9 strongly-typed tools validated with Zod schemas, partitioned into Data Plane (inference) and Control Plane (autonomous MLOps lifecycle):
| TOOL NAME | PLANE | KEY PARAMETERS | PURPOSE & CAPABILITIES |
|---|---|---|---|
zirnay_decide |
DATA | model_slug, raw_text, query, features, team_slug? |
Sub-5ms System One inference for choice, score, or yes_no primitives with calibrated probabilities and nanosecond metrics. |
zirnay_batch_decide |
DATA | model_slug, items[], team_slug? |
High-throughput vectorized inference processing up to 50 concurrent items with aggregated latency statistics. |
zirnay_calibrate_temperature |
DATA | model_slug, temperature (0.1–2.5), raw_text, query |
Evaluates Platt temperature scaling to calibrate confidence entropy, calculating Brier score and Expected Calibration Error (ECE). |
zirnay_list_models |
CONTROL | team_slug?, org_slug? |
Discovers active models across teams with target P99 SLAs, architecture backbones, and routing statuses. |
zirnay_get_model_specs |
CONTROL | model_slug, team_slug? |
Inspects architecture specifications, active checkpoint SHA-256 integrity hash, and dedicated cloud storage bucket location. |
zirnay_upload_dataset |
CONTROL | filename, records[] | raw_jsonl_content, team_slug? |
Ingests JSONL training datasets directly via the secure API gateway without exposing raw S3/GCS cloud credentials. |
zirnay_train_model |
CONTROL | model_slug, dataset_id, epochs, learning_rate |
Triggers asynchronous fine-tuning compilation runs, returning training run IDs and tracking status. |
zirnay_list_checkpoints |
CONTROL | model_slug, team_slug? |
Lists candidate and production model checkpoints with validation accuracies, P99 latencies, and SHA-256 fingerprints. |
zirnay_promote_checkpoint |
CONTROL | model_slug, checkpoint_id, team_slug? |
Executes zero-downtime hot swapping via POSIX pagecache mmap to publish candidate weights to production instantly. |
Dynamic Context Resources
Agents can read live operational state directly into their context window via standard URI schemes without executing tool round-trips:
zirnay://org/{org}/models— Active catalog & P99 targets.zirnay://models/{team}/{model}/specs— Model architecture.zirnay://models/{team}/{model}/checkpoints— Weight integrity.zirnay://telemetry/{org}/summary— Request volume & P99.zirnay://audit/{org}/recent— Real-time decision audit log.
Built-in Agent Prompts
Zirnay ships with guided prompt workflows that steer autonomous agent decision strategies:
4. Verification & Health Probes
Validate that your MCP server installation is healthy and communicating with the Zirnay data plane:
curl -s http://localhost:8001/health
# Expected response (HTTP 200):
# {"status":"healthy","service":"zirnay-mcp-server",
# "transport":"sse","activeSessions":0}
cd mcp-server && npm test
# Expected output:
# ✔ initializes McpServer
# ✔ connects MCP Client and lists tools
# ✔ executes live zirnay_decide (7/7 passed)