Skip to main content

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)
1

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.
2

Connect a datasource

Add your database connection details. Use a role with SELECT-only grants — TeamDuo never needs write access.See Connect a datasource for the full walkthrough.
3

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.
4

Connect your MCP client

Add the TeamDuo MCP server to your client and authorize it. See MCP clients for per-client setup.
5

Run a query

Ask your agent a question about the data. A typical first exchange looks like:

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.
Start with sample_rows on an unfamiliar table. It is cheaper than an exploratory SELECT * and shows the shape of the data immediately.