Model Context Protocol (MCP)

Kleene supports Model Context Protocol (MCP), allowing authorised AI assistants such as Claude, ChatGPT, Cursor, and other MCP-compatible tools to connect securely to your Kleene.ai account.

Use Kleene MCP to inspect transforms, generate SQL, explore schemas, troubleshoot pipeline errors, and write approved changes to sandbox from the AI client your team already uses.

Prerequisites

Before you connect an AI assistant:

  • Enable External AI Assistants (MCP) in Kleene.
  • Use a Kleene account with permission to access the workflows, transforms, schemas, or pipeline runs you want to query.
  • Use an AI client that supports MCP connectors or custom apps.

Setup

Enable MCP in Kleene

  1. Go to App Settings → AI.
  2. Turn on External AI Assistants (MCP).
External AI Assistants MCP setting in Kleene

Connect Claude

  1. Open Claude.

  2. Ask a claude admin who has access to add connectors

    1. Go to Customize → Connectors.
    2. Click + → select Add Custom connector
    3. Give the
      1. Name - Kleene

      2. Remote MCP Server URL - https://mcp.kleene.ai

      3. Enable Individual sign-in

      4. Click Add

  3. As a user navigate to Customize → Connectors.

  4. Search for KleeneAI.

  5. Click Connect.

  6. Sign in to Kleene when prompted.

  7. Approve access.

  8. Start asking questions about your Kleene workflows.

Connect ChatGPT

  1. Open ChatGPT.

  2. Go to Settings → Apps → Advanced settings.

  3. Turn on Developer Mode, then click Create apps.

    ChatGPT advanced app settings
  4. When the new app configuration screen is displayed, enter the following values:

    ChatGPT new app configuration screen
    FieldValue
    NameKleene
    MCP Server URLhttps://mcp.kleene.ai/
    AuthenticationOAuth
  5. Click Create.

  6. Complete the authentication flow by signing in to Kleene and granting the required permissions.

  7. Enable Kleene in conversations when needed.

What you can do with Kleene MCP

Search and inspect transforms

Find transforms and transform groups, retrieve SQL, check configuration, and understand existing logic.

Example prompts:

  • “Show me the SQL for the customer LTV transform.”
  • “Find all transforms in the marketing pipeline group.”
  • “Which transforms reference the orders table?”

Generate and improve SQL

Describe what you need in plain English, then use your AI client to draft or improve SQL. Where write access is enabled, proposed changes can be sent to sandbox for review and testing.

Example prompts:

  • “Write a transform that calculates 30-day rolling revenue by customer.”
  • “Rewrite this join to reduce query cost.”
  • “Create a weekly cohort retention transform in sandbox.”

Nothing is committed to production automatically. Write access follows your existing Kleene role permissions, and changes are reviewed before they are applied.

Debug pipeline and transform issues

Ask about recent failures, retrieve logs, and understand errors without manually digging through run output.

Example prompts:

  • “Why did the orders pipeline fail last night?”
  • “Show me errors from the last run of the revenue transform.”
  • “What does this error mean, and how should I fix it?”

Explore schemas and table data

Browse warehouse tables, inspect column names and data types, and preview small samples where your organisation has enabled that capability.

Example prompts:

  • “What columns are on the orders table?”
  • “What tables are in the ecommerce schema?”
  • “Show me a sample of the sessions data.”

By default, data previews are protected: personally identifiable information is obfuscated before preview rows are returned, unless your organisation has explicitly enabled raw preview access.

Get answers from Kleene documentation

Ask product and workflow questions grounded in Kleene documentation.

Example prompts:

  • “How does pipeline scheduling work?”
  • “What’s the recommended pattern for incremental transforms?”
  • “How do I set up an Asana source connector?”