# Connect Claude Code

Give Claude Code your product's numbers while it works on your code: it can check your datacub setup, add missing events, and answer analytics questions in the terminal.

## Connect

1. Paste this in your terminal and press Enter.
2. Start Claude Code, type `/mcp` and pick datacub, then sign in and press **Allow** in the browser.
3. Ask.

```sh none
claude mcp add --transport http datacub https://datacub.to/mcp
```

The command adds datacub for you in this project. To share it with your team through the repository, add `--scope project`; to have it in every project, add `--scope user`.

## Good to know

- The ready-made prompts show as slash commands that start with `/mcp__datacub__`, such as `/mcp__datacub__weekly_review`.
- To install datacub in your code, ask: "Add datacub to this app." Claude Code calls `get_sdk_setup`, follows the steps, then checks with `get_integration_status`. The [datacub skill](https://docs.datacub.to/install-with-ai#the-datacub-skill) does the same without MCP.
- To keep the connection read only, use `https://datacub.to/mcp?readonly=1` as the address.

## Try asking

- "Check datacub is set up right in this app, and add the business events that are missing."
- "Which of our events did nobody send this week?"
- "Did yesterday's release change the sign-up conversion?"

More in [Use cases](https://docs.datacub.to/mcp/use-cases.md).
