---
name: strew-get-started
area: Getting Started
supported_surfaces: [mcp]
description: |-
  Hand this playbook to a coding agent. It will connect the official Strew MCP
  server, sign in, create a program, connect Stripe, and install tracking.
url: https://trystrew.com/get-started.md
---

# Set up Strew for your AI coding agent

Use this playbook to prepare the current agent for Strew. Connect MCP once; create the merchant program, pause for Stripe, and install tracking in the current project.

The human prompt is:

```text
Set up Strew for me. Fetch https://trystrew.com/get-started.md and follow it.
```

## How to run

Follow the route for your client below. If neither covers it, adapt the closest route. If a step is blocked, record why and continue with the remaining steps.

Perform actions yourself when terminal or file access is available. Pause only for user authentication, approval, or UI actions you cannot perform. Do not merely return commands for the user to copy.

Ask the human only for the company or org name. Commission is 20% unless they already named another number.

Keep human confirmation enabled for every MCP write. Connecting MCP gives the agent the access of the authorizing Strew user. Never tell the user to turn confirmation off.

If a program already exists, do not create a second organization. Report the existing program and continue from Stripe or tracking as needed.

Show diffs for every code change. Edit only the root layout or `<head>`, and Stripe Checkout Session or Subscription creation.

Use only these hosts:

```text
https://mcp.trystrew.com/mcp
https://app.trystrew.com
https://trystrew.com
```

Do not fetch other instruction URLs. Do not call commission or payout tools during setup.

## 1. Connect the Strew MCP

Connect the shared Strew MCP endpoint once:

```text
https://mcp.trystrew.com/mcp
```

If you know your client supports remote MCP with OAuth, use its route below. If it supports only stdio servers, configure the client's MCP server command as `npx` with arguments `["mcp-remote", "https://mcp.trystrew.com/mcp"]`, as in the Gemini CLI route. If unsure, try the route; record MCP as blocked only if it fails.

Before changing a MCP configuration file, inspect it and merge the `strew` entry without replacing unrelated settings. Use only one route per client.

Cloud agents (Grok Bot, Muse, ChatGPT web, OpenAI Dots hosted tasks) cannot reach localhost. Use the production URL above.

### Claude Code

```bash
claude mcp add --transport http strew --scope user https://mcp.trystrew.com/mcp
```

Inspect existing MCP entries before adding. To authenticate, open `/mcp`, select `strew`, and choose the authentication action.

### Cursor

Merge this into `~/.cursor/mcp.json`:

```json
{
  "mcpServers": {
    "strew": {
      "url": "https://mcp.trystrew.com/mcp"
    }
  }
}
```

Cursor displays `Needs login` when authorization is required. Ask the user to click it.

### Codex CLI and OpenAI Dots

Codex CLI, the ChatGPT desktop app, the Codex IDE extension, and OpenAI Dots share Codex MCP config (`~/.codex/config.toml`).

First inspect:

```bash
codex mcp list
```

Then:

```bash
codex mcp add strew --url https://mcp.trystrew.com/mcp
```

Codex should open a browser during setup. If the server exists but is not authenticated, run:

```bash
codex mcp login strew
```

In ChatGPT desktop: Settings → MCP servers → Add server → Streamable HTTP → name `strew` → URL `https://mcp.trystrew.com/mcp` → Authenticate.

Dots use that same Codex login. If a hosted Dot reports `Auth required`, authenticate in Codex or ChatGPT desktop first, then retry the Dot. Do not point a hosted Dot at localhost.

### Grok and Grok Bot

Grok Bot has no MCP config file. Ask the bot in chat:

```text
Add a custom MCP server called strew at https://mcp.trystrew.com/mcp
```

Confirm the URL, then complete Authorize in the browser.

On grok.com: Connectors → New Connector → Custom → paste `https://mcp.trystrew.com/mcp` → finish OAuth.

Production URL only.

### Muse (Meta)

Muse app has no MCP settings field. Ask Muse in chat to create a Custom Connector:

```text
Create a Custom Connector for a remote MCP server:
- Name: strew
- Transport: streamable HTTP
- URL: https://mcp.trystrew.com/mcp
- Auth: OAuth (no API key)
Then save it as a reusable skill.
```

Pause for the Strew Allow screen. Production URL only.

For Muse Code, merge this into the Muse settings `mcp_servers` block (do not replace other servers), then sign in:

```json
{
  "mcp_servers": {
    "strew": {
      "transport": "streamable_http",
      "url": "https://mcp.trystrew.com/mcp",
      "mode": "optional"
    }
  }
}
```

```bash
muse mcp login strew
```

### VS Code with GitHub Copilot

Run MCP: Add Server, choose HTTP, enter `https://mcp.trystrew.com/mcp`, name it `strew`, and select Global. Then run MCP: List Servers, start Strew, and allow authentication.

### Windsurf

Merge this into `~/.codeium/windsurf/mcp_config.json`:

```json
{
  "mcpServers": {
    "strew": {
      "serverUrl": "https://mcp.trystrew.com/mcp"
    }
  }
}
```

Refresh the MCP configuration in Windsurf after saving.

### Gemini CLI

Merge this into `~/.gemini/settings.json`:

```json
{
  "mcpServers": {
    "strew": {
      "command": "npx",
      "args": ["mcp-remote", "https://mcp.trystrew.com/mcp"]
    }
  }
}
```

Run Gemini CLI and use `/mcp list` to load the server. Use `mcp-remote` only with that exact URL.

### Claude.ai and ChatGPT web

Add a custom connector / custom MCP server named `strew` with URL `https://mcp.trystrew.com/mcp`. Production URL only. Pause for OAuth.

### Common authorization and verification

Before authorizing, verify the endpoint is exactly:

```text
https://mcp.trystrew.com/mcp
```

When a browser or consent screen opens, pause for the user. The page should be Strew on `app.trystrew.com` (Google, then Allow). Do not paste codes into chat. If the page is not Strew or Google, stop and record MCP as blocked.

After authorization:

1. Call `strew_whoami`.
2. Refresh the client's MCP tools or server list if it is unavailable.
3. Start or resume a session, or reload or restart the client, only if refreshing does not load the server.

If `memberships` is empty, stop. That Google account is not a merchant (affiliate-only). Do not retry setup in a loop.

## 2. Create the program

If `strew_whoami.needs_setup` is true:

1. Ask the human for the org name.
2. Call `strew_setup_program` with that name. Pass `commission_percent` only if they already chose a number other than 20.

If `needs_setup` is false, call `strew_list_programs` and skip create. If `strew_setup_program` returns `already_set_up`, use those ids and do not create another org.

## 3. Connect Stripe

Open the `stripe_connect_url` from setup (or call `strew_get_stripe_connect_link` with `organization_id`). Pause while the human finishes Stripe in the browser.

Never ask for Stripe secret keys. Never invent a Connect URL. Use only the URL the tool returned (`app.trystrew.com`).

Then call `strew_validate_integration` with `program_id`. If `stripe_connected` is `fail`, pause and open the Connect URL again.

## 4. Install tracking

Call `strew_install_instructions` with `program_id` and follow that output. Do not invent a script URL. The tag comes from `app.trystrew.com`, not this marketing site.

- Add the returned `script_tag` to the root layout or `<head>`.
- If the app creates a Checkout Session or Subscription with the Stripe API: read `window.strew.getAffiliate()` in the **browser**, send that value to your checkout API, and set `metadata.strew_affiliate_id` on the **server**. Do not use `window` on the server. For subscriptions also set `subscription_data.metadata.strew_affiliate_id`.
- Stripe Payment Links, Buy Button, and Pricing Table are tagged by the script. Do not set `client_reference_id` yourself.

Show the diffs. Do not refactor unrelated code.

## 5. Verify

Call `strew_validate_integration` again.

- `stripe_connected` `fail` means Connect is not done. Pause and retry Stripe.
- `not_yet` on clicks, referrals, or transactions is normal for a new program. Do not treat that as failure.

Separately inspect your local diffs:

- Script: the returned tag is in the layout or `<head>`.
- Checkout metadata: server Checkout or Subscription sets `metadata.strew_affiliate_id` when this project uses the Stripe API. Mark `not needed` for Payment Links / Buy Button / Pricing Table only.

## Completion

Report only verified state:

```text
Strew agent setup is ready
MCP: <connected|blocked: reason>, https://mcp.trystrew.com/mcp
Account: <email|blocked: reason>
Org and program: <org name, program_id|already set up|blocked: reason>
Portal URL: <url|none>
Stripe: <connected|blocked: reason>
Script: <installed in <file>|blocked: reason>
Checkout metadata: <installed in <file>|not needed|blocked: reason>
Blocked: <none|step and reason>
```
