dbt, Snowflake,
and Atlan expose theirs.
What’s exposed
The server registers 172 tools across six primitive modules + a playbook layer. Counts verified against the actual MCP tool registrations and the bundled playbook definitions.Running the server
npm run mcp command.
Auth
The server readsKAIREON_API_KEY and KAIREON_TENANT_ID from the
environment and forwards them as X-API-Key + X-Tenant-Id on every
HTTP call to /api/v1/*. Provision a krn_* tenant key in
Settings → Integrations → API Keys and export it before launching.
Hosted endpoint (no local process)
Remote agents can use the same tool surface without running the stdio process:POST /api/v1/mcp is a stateless JSON-RPC endpoint supporting initialize, ping, tools/list, and tools/call.
- Auth — the standard API-key ladder: send
X-API-KeyandX-Tenant-Idheaders. The hosted MCP endpoint is a control-plane surface, so the key must be minted with thecontrol-planescope (admin only; a default data-plane-only key gets403— see API Keys). Keep the key internal — it is a management credential; never embed it in client apps. Rate limited to 60 calls/min; every tools/call is audit-logged. - Tenant pinning — the authenticated tenant overwrites any
tenantIdargument in tool calls; a key for one tenant can never reach another. - Governed playbooks — on the hosted (governed) surface, no mutating playbook writes directly.
playbook_promote_challenger_if_winningandplaybook_rebuild_offer_qualificationqueue anexperiment/rulerecommendation for admin/four-eyes approval;playbook_run_shadow_experiment,playbook_arbitrate_policy_conflict, andplaybook_bootstrap_new_offer_campaignfail-closed (returngoverned: true,dryRun: trueand make no change). Direct writes onapply: trueonly happen on the ungoverned first-party (stdio) surface. - The production read-only default below applies to the hosted surface too.
Read-only by default in production
Write tools (createFlowPipeline, updateFlowPipeline, runFlowPipeline,
replayFlowRun, testFlowConnector, scoreCustomer, plus all writes
in other modules) are disabled in production unless MCP_ALLOW_WRITES=true
is set. Calling a blocked tool returns a structured error explaining
the gate. Read tools always work.
Phase 2b: Flow tools
Decisioning primitives (existing)
Already exposed bystudio-tools.ts and reusable directly by external agents:
listOffers,createOffer,updateOfferlistDecisionFlows,createDecisionFlow,updateDecisionFlowlistQualificationRules,createQualificationRulelistChannels,listContactPolicies,listJourneys,getJourney,listInteractions, plus more
Validation contract
Every IR-native write goes through three checks server-side:- HTTP body validation — Zod schemas on each route.
parsePipelineIR— Phase 1 two-phase validator (Zod schema + structural acyclic + ref-integrity).- Audit logging — every write writes an audit-log row. AI-authored
writes additionally land under
entityType='pipeline_ai_proposal'.
errors array
the agent can use to retry with a corrected proposal — same contract
the in-app AI Pipeline Mode (Phase 2a) uses.
Roadmap
Related
- Pipeline IR — the typed document Flow tools operate on.
- AI Pipeline Authoring — in-app sibling that produces IR via natural language.
- Pipelines API — REST endpoints these tools wrap.