On this page
Support leads can run end-to-end SLA breach audits in Claude by pairing read-only /mcp/support and /mcp/analytics endpoints with a gated /mcp/knowledge server. Instead of loading all 291 unified tools or blindly overwriting live AI instructions, this cookbook extracts overdue threads, clusters missing FAQs, and stages human-reviewed patches through ProposeFactTool (is_approved: false) alongside idempotent HMAC webhook escalations.
Editorial disclosure: Published by TrolyPage, whose workspace MCP Gateway, approval governance, and webhook relay architecture are documented and verified against our live production codebase in this guide.
Why Vibe-Operating Support Fails on Broad Unified MCP Endpoints
Most teams hit a predictable wall the first time they connect Claude Desktop, Claude Code, or Cursor to an operations platform: they wire up a single "everything" MCP endpoint, ask the model to audit yesterday's delayed customer replies and fix the Knowledge Base, and immediately burn half their context window before a single conversation is read.
On the live TrolyPage MCP Gateway, the unified server at /mcp/troly exposes 291 tools, 14 resources, and 12 prompts across 11 domain servers (10 business modules plus editorial blog). Note that TrolyPage's pricing page still displays legacy copy referencing 86 tools across 7 servers, whereas the live gateway ships 291 tools across 11 domain servers—always size your MCP client budgets against the live 291-tool catalog.
Measuring TrolyPage's serialized tool schemas shows an average footprint of roughly 1,034 characters (~258 tokens at ~4 characters per token) per tool definition. Injecting the full unified catalog consumes roughly 75,200 context tokens upfront just for tool schemas and descriptions, exposing 173 mutating tools—across orders, broadcasts, social publishing, and agent deletion—alongside the 118 read-only tools you actually needed for a support audit.
Per the Model Context Protocol Tools Specification, MCP servers advertise tool schemas via tools/list and expose behavioral hints so clients can distinguish read-only inspections from destructive writes. When you scope Claude down to /mcp/support (19 advertised tools) and /mcp/knowledge (14 advertised tools), the candidate pool shrinks by 88.7% (291 down to 33 tools), cutting upfront schema load to roughly 6,500 tokens (~26.2 KB) and eliminating cross-domain misfires.

Tradeoff Matrix: Manual CSV Audits vs Unified Auto vs Scoped Hybrid MCP
Before copying any configuration into Claude, choose the operating boundary that matches your team's blast-radius tolerance. The table below compares three real ways teams audit SLA breaches and patch support Knowledge Bases.
| Evaluation Axis | Option A: Manual Inbox CSV Exports & Spreadsheet Pivots | Option B: Unified /mcp/troly (291 Tools) in auto Mode |
Option C: Scoped /mcp/support + /mcp/analytics + /mcp/knowledge in hybrid Mode |
|---|---|---|---|
| Tool Surface & Schema Overhead | 0 MCP tools; manual CSV export per module + pivot table parsing in spreadsheets. | 291 domain tools (~75.2k schema tokens upfront); overlaps Commerce, Social, Marketing, and Agents. | 33 tools (support + knowledge, ~6.5k tokens) or 49 tools with analytics (~14.0k tokens). |
| Root Technical & Economic Mechanism | Async CSV exports run out-of-band; analyst time (2–4 hrs/week) becomes the bottleneck and context is stale before edits ship. | auto approval mode bypasses human queues on every mutating tool; one ambiguous prompt can call any of 173 write tools immediately. |
mcp:read token locks Phase 1–2 reads (0 writes possible); ProposeFactTool stages is_approved: false facts while active-agent KB overwrites fail closed into Approvals. |
| Retry & Duplicate-Write Protection | Manual copy-paste into KB UI; human error creates duplicate FAQ rows or partial edits. | Without explicit idempotency_key hygiene across 173 writers, transport retries or model loops can duplicate messages or edits. |
mcp_operation_receipts binds (account, user, tool, request_key) to a SHA-256 argument hash and blocks ambiguous retries with HTTP 409 executing_or_unknown. |
| Exact Failure Cost of Choosing Wrong | Stale SLA reporting (24–72 hr lag) lets recurring shipping/refund gaps compound into human handoff spikes. | Unintended live customer messages, unreviewed KB overwrites corrupting AI replies, or accidental broadcast/order mutations. | Minimal blast radius: worst-case noise is an unapproved row in pending_approval that never reaches customers until a lead rejects or approves it. |
If your team also connects ChatGPT or IDE agents like Cursor, the same scoping principle holds: OpenAI's MCP server guide and Cursor's MCP documentation both consume standard Streamable HTTP endpoints, and Anthropic's Claude MCP connector additionally supports explicit allowed_tools allowlists when using the Messages API.
Operational Asset 1: Split Read-Only Audit vs Staged Write Config
TrolyPage's credential layer (McpCredentialPermissions) enforces two independent guardrails on Sanctum MCP API keys created in /app/mcp: ability scoping (mcp:read without mcp:write rejects all mutating tools before execution) and module scoping (mcp:module:support, mcp:module:analytics, mcp:module:knowledge). Meanwhile, OAuth 2.1 browser connectors use PKCE and RFC 8707 Resource Indicators to bind tokens to specific server endpoints under the mcp:use scope.
For Claude Code (.mcp.json) or local bridge setups documented in the Claude Desktop MCP guide, split your audit endpoints from your Knowledge Base staging endpoint using two separate credentials:
{
"mcpServers": {
"trolypage-support-audit": {
"type": "http",
"url": "https://trolypage.com/mcp/support",
"headers": {
"Authorization": "Bearer YOUR_MCP_READ_ONLY_KEY"
}
},
"trolypage-analytics-audit": {
"type": "http",
"url": "https://trolypage.com/mcp/analytics",
"headers": {
"Authorization": "Bearer YOUR_MCP_READ_ONLY_KEY"
}
},
"trolypage-knowledge-staging": {
"type": "http",
"url": "https://trolypage.com/mcp/knowledge",
"headers": {
"Authorization": "Bearer YOUR_MCP_KB_WRITE_KEY"
}
}
}
}
If you register servers via the Claude Code CLI instead of editing .mcp.json manually, keep the exact same two-key split so audit sessions never accidentally hold write authority:
claude mcp add --transport http trolypage-support-audit \
https://trolypage.com/mcp/support \
--header "Authorization: Bearer YOUR_MCP_READ_ONLY_KEY"
claude mcp add --transport http trolypage-analytics-audit \
https://trolypage.com/mcp/analytics \
--header "Authorization: Bearer YOUR_MCP_READ_ONLY_KEY"
claude mcp add --transport http trolypage-knowledge-staging \
https://trolypage.com/mcp/knowledge \
--header "Authorization: Bearer YOUR_MCP_KB_WRITE_KEY"
Before running your first batch, set your TrolyPage workspace approval policy in /app/mcp to hybrid (or strict for regulated teams). In hybrid mode, propose-fact (ProposeFactTool) creates candidate facts directly in pending_approval (is_approved: false)—meaning the live AI agent never uses them to answer customers until a human admin clicks Approve—while direct edits to an active agent's knowledge records (create-knowledge-text, update-knowledge, delete-knowledge) are fail-closed into the TrolyPage Approvals queue. Keep in mind that the MCP Gateway enforces a 360 requests/minute workspace headline rate limit (with actor/IP throttles returning HTTP 429 and Retry-After), so instruct Claude to paginate deliberately rather than firing parallel bursts.
Operational Asset 2: The 4-Phase SLA Breach to KB Patch Cookbook
Running an effective support audit requires deterministic ordering: resolve metrics and overdue threads first, verify whether an approved fact already exists, and only then stage proposals with deterministic idempotency keys. Here is how each phase maps to real TrolyPage MCP tools and failure boundaries.

| Phase | MCP Server & Tools | Execution & Governance Rule | Failure / Guardrail Behavior |
|---|---|---|---|
| 1. SLA Baseline | /mcp/analytics: report-options, response-report, ai-report, channel-report |
100% read-only server (16 tools) backed by ReportMetricsService; matches in-app Reports. |
Zero write tools exist on this server; safe for unattended daily or weekly baseline pulls. |
| 2. Thread Triage | /mcp/support: list-conversations, get-conversation, get-subscriber, support-lookups |
Filter recent threads for did_handoff spikes, long gaps between user_message and reply, and repeat tags. |
mcp:read key blocks send-message and close-conversation; paginate via next_before_id rather than truncating. |
| 3. KB Gap Check | /mcp/knowledge: search-knowledge, list-knowledge-nodes, list-facts, search-facts |
Resolve exact agent_id and ready knowledge_id; verify whether an approved fact already covers the question. |
Prevents duplicate or contradictory rules when an answer exists in documents but failed retrieval or lacked structured phrasing. |
| 4. Staged Patch | /mcp/knowledge: propose-fact (ProposeFactTool), plus get-mcp-action |
Submit attribute, value, unit, source_span, and stable idempotency_key. |
Enters is_approved: false; reused key with altered args fails; ambiguous state returns 409 executing_or_unknown. |
Paste the following 4-phase runbook prompt into Claude once your scoped servers are connected. Notice how it forces Claude to prove each gap with real thread IDs and existing knowledge checks before touching propose-fact:
Run a Support SLA & Knowledge Base Gap Audit for the past 7 days:
Phase 1 — SLA Baseline (/mcp/analytics):
1. Call report-options to resolve valid channel and agent filter IDs.
2. Call response-report, ai-report, and channel-report for the last 7 days.
3. Identify the top 2 channels by human handoff rate or response latency.
Phase 2 — Thread Extraction (/mcp/support):
1. Call list-conversations (limit 100) and inspect threads with did_handoff=true or delayed responses.
2. For each recurring topic (at least 3 threads), call get-conversation (using next_before_id if truncated) to capture the exact customer phrasing and missing policy detail.
3. Do NOT call send-message, close-conversation, or any mutating support tool.
Phase 3 — KB Verification (/mcp/knowledge):
1. Run list-knowledge-nodes and list-facts for the target agent_id to identify ready knowledge_id nodes and existing approved facts.
2. Run search-knowledge for each customer question cluster. Classify each cluster as:
(a) Missing Fact, (b) Stale/Ambiguous Fact, or (c) Operational Escalation Only (requires human ops, not a KB patch).
Phase 4 — Staged Fact Proposals (/mcp/knowledge):
1. Only for Missing or Stale Fact clusters, present a Markdown diff table first and ask me to confirm.
2. After confirmation, call propose-fact with:
- agent_id and exact ready knowledge_id
- concise snake_case attribute (max 100 chars), verified value (max 500 chars), optional unit
- source_span citing the policy document or verified thread IDs
- deterministic idempotency_key formatted as "sla-audit-YYYYWW-<attribute>"
3. If any call returns HTTP 409 executing_or_unknown, STOP and inspect list-facts before generating a new key.
4. If any call returns a pending action_id, report the approval_url and poll get-mcp-action rather than resubmitting.
Two codebase details matter when operating Phase 4 in production. First, ProposeFactTool refuses to guess a knowledge node if an agent has multiple ready knowledge sources—you must pass the exact knowledge_id from list-knowledge-nodes. Second, TrolyPage automatically runs secret redaction (McpSecretFieldGuard and RedactsSecrets) on tool outputs, replacing credentials with [redacted]; never instruct an agent to write a [redacted] placeholder back into any configuration.
Operational Asset 3: Idempotent Webhook Escalation Bridge
Staged KB facts eliminate future repeat questions, but they do not resolve live customers stuck in an SLA breach right now. Furthermore, TrolyPage's Public Developer REST API is still in progress (an internal v1 REST API exists in the codebase, while external integrations run on Outbound/Inbound Webhooks, Zapier Webhooks, and the 291-tool MCP Gateway). To page an on-call lead in Slack, PagerDuty, or an internal ticketing system when TrolyPage waiting-conversation SLA alerts fire, run an idempotent webhook bridge.
Following the OWASP Webhook Security Cheat Sheet and RFC 2104 HMAC, your receiver must verify the HMAC-SHA256 signature against the raw unparsed request bytes using constant-time comparison, enforce a replay window, and persist a unique deduplication key before enqueueing the downstream alert:
// Node.js / TypeScript idempotent webhook bridge (verify raw bytes BEFORE JSON.parse)
import crypto from "node:crypto";
import express from "express";
const app = express();
const WEBHOOK_SECRET = process.env.TROLYPAGE_WEBHOOK_SECRET ?? "";
const MAX_SKEW_SECONDS = 300; // +-5 minute replay tolerance
// Replace with PostgreSQL / Redis SET NX EX in production
const processedEvents = new Map<string, number>();
function verifyHmacSha256(rawBody: Buffer, headerSig: string, secret: string): boolean {
if (!secret || !headerSig.startsWith("sha256=")) return false;
const expected = "sha256=" + crypto.createHmac("sha256", secret).update(rawBody).digest("hex");
const a = Buffer.from(expected, "utf8");
const b = Buffer.from(headerSig, "utf8");
return a.length === b.length && crypto.timingSafeEqual(a, b);
}
app.post("/webhooks/trolypage-sla", express.raw({ type: "application/json" }), async (req, res) => {
const rawBody = req.body as Buffer;
const sig = String(req.header("X-AgentAlert-Signature") || req.header("X-TrolyPage-Signature") || "");
if (!verifyHmacSha256(rawBody, sig, WEBHOOK_SECRET)) {
return res.status(401).json({ error: "invalid_signature" });
}
const payload = JSON.parse(rawBody.toString("utf8"));
const eventTs = Number(payload.timestamp ?? 0);
const nowSec = Math.floor(Date.now() / 1000);
if (eventTs > 0 && Math.abs(nowSec - eventTs) > MAX_SKEW_SECONDS) {
return res.status(400).json({ error: "stale_timestamp" });
}
const dedupKey = String(payload.event_id ?? crypto.createHash("sha256").update(rawBody).digest("hex"));
if (processedEvents.has(dedupKey)) {
// Acknowledge duplicate retry with 200 OK without re-paging on-call
return res.status(200).json({ ok: true, deduplicated: true });
}
processedEvents.set(dedupKey, nowSec);
try {
// Enqueue to durable job queue (BullMQ / SQS / Laravel Queue) with exponential backoff + DLQ
await enqueueSlackEscalation({ dedupKey, subscriberId: payload.subscriber_id, reason: payload.reason });
return res.status(202).json({ ok: true, queued: true });
} catch (err) {
processedEvents.delete(dedupKey); // Allow publisher retry if enqueue failed
return res.status(503).json({ error: "queue_unavailable" });
}
});
Notice the subtle failure-recovery rule in the catch block: only commit the deduplication record permanently once the downstream queue acknowledges persistence, and return 200 OK on duplicate deliveries so TrolyPage's outbound delivery worker does not burn retry attempts. If an outbound webhook fails or is denied in TrolyPage Integration Hub, operators can later inspect the redacted delivery record and requeue it via replay-integration-delivery with a fresh idempotency_key.
Honest Platform Boundaries Before You Standardize
Every operational architecture has hard boundaries. Before rolling this Claude-to-TrolyPage inbox workflow out across a multi-region support org, verify five documented constraints from TrolyPage Features, Pricing, and Docs:
- No Public Developer REST API Yet: External custom middleware cannot hit arbitrary public REST CRUD endpoints today; use the 291-tool MCP Gateway, Outbound/Inbound Webhooks, or Zapier Webhooks until the public REST API launches.
- No Native Two-Way Ecommerce or CRM Admin Sync: TrolyPage includes a built-in catalog, order pipeline, and Website Chat widget, but lacks native two-way Shopify, WooCommerce, BigCommerce, HubSpot, or Salesforce admin refund/CRM sync—bridge those via webhooks or Zapier Webhooks.
- Trial and Connection Math: The Free tier is a one-time, time-limited workspace trial (capped at 10 auto-posts/month without links), not a permanent free plan. Paid plans run from Lite (
$8/mo) to Scale ($104/mo), with add-on seats at$1/moand extra Pages at$2/mo. Remember connection weighting: one Facebook Page using both publishing and Messenger consumes 2 service connections. - Support Hours and Docs Language: Automated AI agents and MCP endpoints run 24/7, but live TrolyPage vendor staff support operates during Vietnam business hours (
UTC+7), and docs.trolypage.com is currently authored in Vietnamese. - PDF Ingestion Caveat: When attaching supplier policies or warranty sheets to close a KB gap discovered in Claude, remember TrolyPage's PDF parser reads embedded text layers rather than running an OCR pipeline over scanned image-only PDFs—convert scanned sheets to text or structured facts via
propose-factfirst.
Rollout Checklist for Your First 30-Minute Support Audit
To put this cookbook into production without disrupting active customer conversations, sequence your rollout in four tight steps:
- Generate two scoped Sanctum MCP keys in
/app/mcp: onemcp:readkey restricted tosupportandanalytics, and onemcp:writekey restricted toknowledge. - Set workspace approval policy to
hybridsoProposeFactToolstages facts safely inpending_approvalwhile destructive active-agent KB changes remain gated. - Run the 4-phase audit prompt against the past 7 days of conversations and review every proposed
attribute = valuerow inside TrolyPage's Knowledge UI before approving. - Wire TrolyPage waiting-conversation alerts to the raw-body HMAC-SHA256 webhook bridge above so SLA breaches page human leads in real time while your newly approved KB facts handle repeat questions automatically.
Comments
Your comment will appear after review.
Sign in to commentNo comments to show.