---
name: contextflo-setup
description: Connect Contextflo to this agent, connect the user's data, and get their first answer.
---

# Get started with Contextflo

Goal: answer the user's question from their own data. Do what you can yourself; when the user must act, give them one step at a time.

## Before getting started

**What Contextflo is.** An MCP server that gives you the user's data (warehouse, spreadsheets, other sources) plus their team's saved context: table descriptions, metric definitions, reference queries. You write the SQL. Contextflo enforces access and logs every query.

**Credential safety.** Credentials never go through chat, and never print a key file. The user enters them only in Contextflo's secure form. Access is read-only: read-only roles, every query checked, writes blocked, credentials encrypted, revocable any time. Tell the user this before they create credentials.

**Already connected?** If Contextflo's tools are available (`getOrgInfo`, `onboard`, possibly prefixed like `mcp__contextflo__getOrgInfo`), call `getOrgInfo`, confirm the workspace with the user, and skip to "Connect their data".

## Connect this agent

- **Claude:** print https://claude.ai/directory/contextflo
- **ChatGPT:** print https://chatgpt.com/plugins/plugin_asdk_app_6ac34698b32c81919a3c4fc2b46f7db0
- **Claude Code:** `claude mcp add --transport http --scope user contextflo https://mcp.contextflo.com/mcp`, then `claude mcp login contextflo`. If the tools don't appear, have the user reconnect via `/mcp` or run `claude --continue`.
- **Codex:** `codex mcp add contextflo --url https://mcp.contextflo.com/mcp`, then `codex mcp login contextflo`. If the tools don't appear, have the user start a new session.
- **Cursor or other MCP clients:** print name `contextflo`, URL `https://mcp.contextflo.com/mcp`.

Then call `getOrgInfo` to confirm the workspace. An empty workspace is fine.

## Connect their data

Call `onboard` for the setup state and workspace links. If the data they need is already there, go to their question. Otherwise, ask whether they have their own data (a warehouse or a spreadsheet) or want to explore with Contextflo's demo dataset.

- **Warehouse:** send the matching guide below and the secure form link from `onboard`. Once they've picked tables and say "done", call `onboard` again.
- **Spreadsheet:** upload it with `upload-csv`, or have them upload it under Data Sources.
- **Demo dataset:** use the demo link from `onboard`, and label answers as demo data.

<!-- TODO(CON-1320): onboard should add the demo dataset from chat; drop the demo link step once it does. -->

Guides:

- [BigQuery](https://contextflo.com/docs/data-sources/bigquery-setup.md)
- [Snowflake](https://contextflo.com/docs/data-sources/snowflake-user-setup.md)
- [PostgreSQL](https://contextflo.com/docs/data-sources/postgres-setup.md)
- [Amazon Redshift](https://contextflo.com/docs/data-sources/redshift-setup.md)
- [MySQL](https://contextflo.com/docs/data-sources/mysql-setup.md)
- [Databricks](https://contextflo.com/docs/data-sources/databricks-setup.md)
- [ClickHouse](https://contextflo.com/docs/data-sources/clickhouse-setup.md)

<!-- TODO: the .md versions of these guides don't exist yet (needs the docs .md route). The HTML pages exist at the same path without .md. -->

For any other source, read the full list at https://contextflo.com/docs/data-sources.md and follow the guide for that source.

## First answer

Answer their question, or suggest one from the tables they chose. Use saved definitions, show the result in plain language, and fix and retry if the query fails. Setup is done when this user has an answer, whatever `onboard` says.

## What's next

Newly connected tables have no context yet, so answers depend on you guessing what columns mean. Tell the user there are three ways to add context:

- **Table context** (`set-table-context`): what each table and column means, so the agent picks the right table and doesn't misread columns like `status` or `amount`.
- **Metrics** (`create-metric`): one agreed definition for key numbers like revenue or active users, so everyone gets the same number instead of each agent computing its own.
- **Reference queries** (`save-query-pattern`): SQL known to be right for recurring questions, so it's reused instead of rewritten, and gets the same answer every time.

See full context setup: https://contextflo.com/docs/after-connecting-data.md
