dbt,
Snowflake, and Atlan expose theirs.
What’s exposed
The server registers six tool modules. Counts shown are the production-stable tools as of Phase 2b.| Module | Tools | Highlights |
|---|---|---|
| Flow (Phase 2b) | 11 | Create/update/run IR-native pipelines, version history, run-error inspection, replay, customer scoring |
| Data | 18 | Schemas, connectors, transform-type catalog, raw data ops |
| Studio | 30+ | Offers, decision flows, qualification rules, channels, journeys, contact policies, creates + updates |
| Algorithms | several | Models, training, predictors |
| Operations | 8 | Alerts, audit log, approvals, tenant settings |
| AI | several | AI configuration helpers |
Running the server
npm run mcp command.
Auth
The server readsKAIREONAI_API_KEY and KAIREONAI_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.
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
| Tool | Verb | Purpose |
|---|---|---|
createFlowPipeline | write | Create an IR-native pipeline. Body: { name, connectorId, schemaId, ir }. The server validates ir via parsePipelineIR before persistence. |
getFlowPipelineIr | read | Return the latest IR document for a pipeline. 409 if the pipeline is still in legacy node/edge format. |
updateFlowPipeline | write | Save a new IR version against an existing pipeline. Auto-promotes legacy pipelines to IR-native on first save. |
listFlowPipelineVersions | read | IR version history (desc by version) — version, authoredBy, comment, createdAt. |
runFlowPipeline | write | Trigger a run. IR-native pipelines dispatch in-process via runBatch; legacy pipelines go to the BullMQ worker queue. |
listFlowRuns | read | Recent runs for a pipeline. |
inspectFlowError | read | Error context for a specific run — supports AI-driven self-healing workflows. |
replayFlowRun | write | Re-run a pipeline from a previous run id. |
testFlowConnector | write | Test connection ping for a connector — verifies credentials + reachability. |
createYamlConnector | stub | Documented surface for Phase 5; currently returns { status: "deferred", phase: "5" }. |
scoreCustomer | write | Wraps POST /api/v1/recommend so external agents can score customers via MCP. |
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
AuditLogrow. AI-authored writes additionally land underentityType='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
| Phase | What this gets |
|---|---|
| 2b (this page) | 11 Flow tools live; existing decisioning tools documented as part of the unified surface. |
| 5 | YAML connector authoring lights up createYamlConnector for real. |
| Future | Streamable HTTP transport (currently stdio only); MCP Apps registry submission. |
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.