> ## Documentation Index
> Fetch the complete documentation index at: https://docs.teamduo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Connect a datasource and run your first agent query.

## Prerequisites

* A TeamDuo account and a team you belong to
* Read-only credentials for a PostgreSQL database
* An MCP-compatible client (Claude Code, Claude Desktop, or another MCP host)

<Steps>
  <Step title="Create a team">
    Teams own datasources and control who can query them. Create one from the
    dashboard, then invite the people who should have access.
  </Step>

  <Step title="Connect a datasource">
    Add your database connection details. Use a role with `SELECT`-only grants —
    TeamDuo never needs write access.

    See [Connect a datasource](/guides/connect-a-datasource) for the full walkthrough.
  </Step>

  <Step title="Choose what to expose">
    Select the tables and columns agents may read, and add notes describing what each
    one means. These notes are returned by `describe_datasource` and are the main thing
    that makes agent queries accurate.
  </Step>

  <Step title="Connect your MCP client">
    Add the TeamDuo MCP server to your client and authorize it. See
    [MCP clients](/guides/mcp-clients) for per-client setup.
  </Step>

  <Step title="Run a query">
    Ask your agent a question about the data. A typical first exchange looks like:

    ```text theme={null}
    list_datasources        → which databases this team has exposed
    describe_datasource     → tables, columns, and the team's notes
    run_query               → a plain PostgreSQL SELECT
    ```
  </Step>
</Steps>

## What happens on a blocked query

Queries touching anything outside the exposed surface are refused with an explanation
of what was blocked and why. Agents should read the explanation and adjust the query
rather than retrying the same statement.

<Tip>
  Start with `sample_rows` on an unfamiliar table. It is cheaper than an exploratory
  `SELECT *` and shows the shape of the data immediately.
</Tip>
