# Getting Started

Connect the Sequel MCP server to your AI tool in a few minutes — the MCP URL, where to get an API key, the two auth types, and how OAuth works.

This guide gets the Sequel MCP server running inside your AI tool. By the end you'll have a connected data source and an agent answering questions against it.

<Steps>
<Step title="Create an account and connect a data source">
Sign up at [sequel.sh](https://sequel.sh) and create or join an organization. Then add a data source — a cloud Postgres or MySQL database, a warehouse like BigQuery, or a SaaS source like Stripe or Google Analytics. See [Connecting your first data source](/docs/connecting-your-first-data-source) for the full walkthrough. Everything you connect becomes available to the MCP server.
</Step>

<Step title="Install the Sequel CLI">
The CLI is the fastest way to wire Sequel into a coding agent — it creates the API key and writes the config for you. One line installs it:

<CodeBlock language="bash">curl -fsSL https://sequel.sh/install | sh</CodeBlock>

Then sign in:

<CodeBlock language="bash">sequel login</CodeBlock>
</Step>

<Step title="Install Sequel into your agent">
Run `install` and pick your agent — Claude Code, Cursor, VS Code, Windsurf, Zed, Codex, or Claude Desktop — or pass its slug directly:

```bash
sequel install          # interactive
sequel install cursor   # or target one directly
```

The CLI runs over the same hosted MCP endpoint every tool uses — `https://api.sequel.sh/mcp` — so you never touch the URL or key by hand. Prefer to configure a tool manually (or using ChatGPT, Claude.ai, or Gemini)? See [Install Sequel MCP](/docs/install) for copy-paste setup.
</Step>

<Step title="Ask your first question">
Restart the agent, then try “What tables do we have, and how many rows are in each?” Go deeper with [Chatting with your data](/docs/chatting-with-your-data).
</Step>
</Steps>

## Authentication: two ways to connect

Sequel supports **two authentication methods** for the MCP server. Pick whichever your tool supports best.

| Method | Best for | How it works |
| --- | --- | --- |
| **API key (Bearer token)** | CLIs and editors — Claude Code, Cursor, VS Code, Windsurf, Zed, Codex, Gemini | You paste a static key into an `Authorization: Bearer …` header in the tool's config. |
| **OAuth 2.0** | Connector-style clients — ChatGPT, Claude.ai | The tool registers itself and sends you through a sign-in + consent screen. No key to copy. |

### API key

Create a key in the Sequel dashboard under **Settings → API Keys**. Keys look like `sql_…` and are shown **once** at creation — copy it then. Add it as a Bearer token:

<CodeBlock language="http" label="Authorization header">Authorization: Bearer sql_your_api_key</CodeBlock>

<Callout type="tip">
When you install from the dashboard, Sequel auto-provisions a key named <code>sequel_mcp</code> and drops it straight into the snippet for you.
</Callout>

### OAuth

For clients that support it, OAuth avoids copying keys around. The flow is standard OAuth 2.0 with PKCE: the client registers itself automatically, you sign in on a Sequel consent screen, and Sequel issues a short-lived access token (refreshed automatically) scoped to your organization. Revoke access any time from the dashboard.

Either method only ever exposes the data sources your organization has connected — see [API keys & authentication](/docs/api-keys-and-auth) for the full details.

## Next step

Head to **[Install Sequel MCP](/docs/install)** for copy-paste setup instructions for every supported AI tool.
