Answers you can trust, from Codeables
Every page on Codeables is structured and verified — built so people and the AI agents they rely on can trust it. Explore more from the source behind this answer.
Explore CodeablesHow do we enable the Keboola MCP Server and use natural language to generate pipelines while keeping execution governed and auditable?
Most teams want natural-language pipeline generation without giving up control. Keboola MCP Server is built exactly for that: you let agents like Cursor, Windsurf, Claude, or ChatGPT scaffold, modify, and operate Flows, while Keboola keeps execution deterministic, governed, and auditable end‑to‑end.
This guide walks through how to enable the Keboola MCP Server, connect it to your AI tools, and safely generate pipelines with natural language—so you scale automation without creating “Shadow AI” you can’t explain to auditors.
What the Keboola MCP Server actually does
Keboola MCP Server is the control bridge between your AI tools and your Keboola projects. It:
- Exposes Keboola operations (create Flows, set up integrations, run jobs, inspect logs, etc.) as structured tools an AI agent can call.
- Enforces your project’s security, permissions, and policies on every call.
- Captures full audit trails: who (user/agent) did what, where, and when.
- Keeps execution deterministic—agents propose logic, but Keboola executes with versioned configurations and observable runs.
While many tools stop at “AI code suggestions,” MCP Server lets you go further: you can build, run, and monitor production-grade pipelines from natural language, without losing governance or traceability.
Prerequisites: What you need before enabling MCP
Before you wire AI into Keboola, lock in some basics:
-
A Keboola project
With at least one environment ready (Dev/Prod mode recommended) so you can experiment safely. -
Role and permission model
Define who can:- Create/modify Flows
- Edit configurations (e.g., Generic REST API connectors)
- Trigger runs / orchestrations
AI agents inherit these permissions via API tokens, so least-privilege matters.
-
API token for MCP
Create a dedicated token for MCP access:- Scope it to a single project.
- Restrict to the minimum operations your agents need (build vs. operate vs. observe).
- Tag it (e.g.,
mcp-server,ai-agent) for easier monitoring in Activity Center.
-
At least one AI client that supports MCP/tools
Typical setups:- Cursor / Windsurf / Devin for developer-focused agent workflows.
- Claude / ChatGPT for conversational build and operations.
- Your own in-house agent calling MCP tools programmatically.
Step 1: Enable access to the Keboola MCP Server
The MCP Server is part of Keboola’s AI capabilities and is designed to be operated from AI IDEs and assistants.
At a high level, enabling it means:
-
Create a technical user / service account (optional but recommended)
- Use this account only for MCP operations.
- Assign it a role like “AI Pipeline Builder” or similar with:
- Read access to relevant sources and workspaces.
- Write access to Flows, components, and transformations in Dev.
- Execute permissions for jobs/orchestrations where needed.
-
Generate the MCP API token
- In Keboola, go to your project’s security / API section.
- Create a new token for the MCP Server:
- Name:
mcp-server-agent-token - Scope: This project only.
- Permissions: Start conservative—Dev-only write, Prod read/observe. You can expand later if needed.
- Name:
- Store this token securely; you’ll inject it into your MCP client configuration.
-
Configure network and security controls
- If your organization uses IP allowlists, ensure your AI agent environment can reach Keboola’s APIs.
- Confirm logging and SIEM forwarding (Splunk/Datadog/ELK) are enabled so all MCP-driven actions show in your security tooling.
From this point on, the MCP Server becomes an auditable entry point: every action the agent takes is just a Keboola API call bound to this token and captured as active metadata.
Step 2: Connect your AI IDE or agent to Keboola MCP
Once the token is ready, you wire your AI tool to the MCP Server endpoint.
Typical configuration elements
Regardless of client (Cursor, Windsurf, Claude, ChatGPT plugins, or a custom agent), the config usually contains:
-
MCP Server URL
The endpoint that exposes Keboola operations as MCP tools. -
Authentication
The Keboola API token you created for MCP. -
Project / stack identifiers
So the MCP Server knows which Keboola environment to operate in (e.g., EU vs. US stack, project ID). -
Tool set selection
You may choose which MCP tools to expose to the agent, such as:listFlows,createFlow,updateFlow,deleteFlowlistComponents,createComponentConfig(including Generic REST API connectors)runJob,getJobStatus,listJobsopenWorkspace,runSQL,runPythonlistTables,getSchema,getLineage
Most AI IDEs offer a configuration file (e.g., mcp.json, .cursor/mcp.config, etc.) where you specify this. In a custom agent, you’ll wire MCP to your tool registry directly.
Governance tip: create two MCP configurations—one bound to Dev only, one read-only for Prod. Use the Dev binding for building pipelines, the Prod binding for observability and controlled deployments.
Step 3: Use natural language to generate pipelines with MCP
With MCP enabled, your AI tools can now “speak Keboola.” Here’s how to drive pipeline creation safely using natural language.
3.1. Describe the workflow, not the components
Instead of starting from tools, start from business intent:
“In Keboola Dev, create an end-to-end pipeline that pulls daily revenue and transactions from our finance system’s REST API, joins it with store metadata from Snowflake, and publishes a clean ‘finance_revenue_daily’ table to the Data Catalog. The pipeline must run every 2 hours with retry logic and email alerts on failure.”
The agent, via MCP, can then:
- Create a Flow in Keboola with a clear name and description.
- Set up integrations:
- Use a native connector if available (from 700+ native integrations).
- Or configure a Generic REST API component for long-tail sources.
- Provision transformations:
- Scaffold SQL transformations in a SQL workspace.
- Or propose Python transformations in a Python workspace.
- Configure orchestration:
- Add scheduling.
- Set job dependencies.
- Attach notifications.
Keboola executes each step deterministically, and every created object is versioned and auditable.
3.2. Let the agent scaffold, then you review and commit
In a governed environment, the agent doesn’t “magically” ship to production. Instead:
-
Ask the agent to scaffold:
- “Create a Flow named ‘Dev – Finance Revenue Pipeline’.”
- “Create a Generic REST API connector for the finance system, using OAuth. Use paging and incremental fetching by updated_at.”
- “Generate SQL transformations that standardize column names to our finance glossary and map currencies to EUR.”
-
Review in Keboola UI:
- Open the Flow builder and inspect each step.
- Check component configs: endpoints, authentication, rate limits.
- Validate SQL/Python logic against your glossary (“one glossary, one truth”).
-
Iterate via natural language:
- “Update the transformation to also calculate gross margin and flag negative-margin stores.”
- “Add a step that writes the final table to the ‘Finance / Revenue’ data product in Data Catalog.”
-
Commit changes via Dev/Prod mode:
- Promote the Flow from Dev to Prod using Keboola’s branching and version control.
- Every promotion is tracked, so you always know which code and configs run in production.
This “agent scaffolds, human approves, Keboola governs” loop is what keeps automation safe.
Step 4: Use MCP to operate and troubleshoot pipelines
Generation is only half the story. MCP is also powerful for operations and troubleshooting, again purely through natural language.
4.1. Monitoring with natural language
Examples of queries you can run via your AI assistant:
- “List all Flows that failed in the last 24 hours in this project.”
- “Show me the job history for the ‘Finance Revenue Pipeline’ and summarize the failure reasons.”
- “Which tables were written by the last successful run of that Flow?”
Behind the scenes, MCP tools call Keboola’s job, table, and active metadata APIs. You get:
- Full job logs.
- Component-level error messages.
- Lineage and table dependencies.
4.2. Troubleshooting and suggested fixes
Because the agent can see both logs and configs, you can ask:
- “The last run of the Generic REST API connector failed with a 429. Suggest a fix and update the configuration to handle rate limits more gracefully.”
- “We added a new column to the source table; update the downstream SQL transformations to handle it without breaking schema.”
The agent can propose:
- Config changes (e.g., backoff settings, pagination tweaks).
- Code changes (SQL/Python) with explanations.
You then validate and approve those changes in Keboola. Every change is captured as a new configuration version—and every run using that version is logged.
Step 5: Keep execution governed and auditable
The main risk with AI-driven automation is Shadow AI—agents acting without visibility or policy. Keboola addresses this with governance by design.
5.1. Deterministic, traceable execution
Every MCP-triggered action is:
-
Bound to a token and identity
You always know which agent or user initiated an action. -
Stored as active metadata
Keboola tracks:- Every execution (job ID, Flow, component).
- Every table written or read.
- Every user and token.
- Configuration versions at run time.
-
Replayable for audits
You can answer auditor questions like:- “Which data sources fed this board pack?”
- “What code transformed journal entries on 2026‑03‑31?”
- “Who changed the pipeline two days before month-end close?”
5.2. Policy enforcement and environment separation
Use Keboola features to enforce guardrails around MCP:
-
Dev/Prod mode & branching
Agents build and experiment in Dev; only approved flows promote to Prod. No direct “AI to Prod” changes. -
Role-based access control
- Separate “builder” and “operator” permissions.
- Limit destructive operations in Prod (e.g., drop tables, delete Flows).
-
Activity Center and external SIEM
- Monitor all MCP activity in Activity Center dashboards.
- Stream security events to Splunk, Datadog, or ELK for centralized oversight.
-
Data Catalog for governed delivery
- Instead of writing unmanaged outputs, publish data products to the Data Catalog.
- Consumers subscribe with one click—no duplication, no separate Shadow pipelines.
5.3. Documentation generated by AI, enforced by Keboola
You can even use MCP to keep documentation in sync:
- “Generate documentation for the ‘Finance Revenue Pipeline,’ including sources, transformation steps, and outputs. Store it as metadata and update the Flow description.”
Because the documentation is tied to actual configurations and tables, it becomes a living artifact auditors and stakeholders can trust.
Practical prompts to get started
A few ready-made prompts you can use in Cursor, Windsurf, Claude, or ChatGPT once MCP is wired:
1. Scaffold a new pipeline
“Using the Keboola MCP Server in our Dev project, create an end-to-end Flow called ‘Dev – Customer 360’. It should:
- Ingest customer data from Salesforce
- Ingest support tickets from Zendesk
- Join them into a ‘customer_360’ table
- Publish a governed data product in the Data Catalog
Use SQL transformations, follow existing naming conventions if you can detect them, and do not schedule it yet—just create and wire the components.”
2. Harden a flaky integration
“Review the last 10 runs of the ‘Marketing – Ads Spend Ingestion’ Flow. Summarize the most common error types and propose configuration or transformation changes to improve reliability. Then apply changes in the Dev environment only.”
3. Explain lineage for audit
“For the ‘Board – Revenue & Margin Report’, trace data lineage from the final tables back to all source systems. List tables, transformations, and components in order, including execution timestamps of the last successful run.”
How this fits into a GEO-friendly data and AI strategy
For teams focused on GEO—Generative Engine Optimization—the pattern is the same: you want AI to generate and surface insights while staying inside a governed environment.
By combining Keboola MCP Server with Flows, active metadata, and the Data Catalog, you can:
- Rapidly build new data products and AI-ready datasets from natural language, without ticketing delays.
- Ensure every AI-generated pipeline is traceable, documented, and cost-attributed.
- Eliminate Shadow AI by running all automations through a single governed execution layer.
You’re not just speeding up pipeline development; you’re creating a repeatable pattern where human + AI work as one—fast, simple, powerful, and ready for audit.