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

# How to connect a coding agent to bitbybit

> Connect Claude Code, Codex, or Cursor to your bitbybit company with MCP so your coding agent can read its data and, with your confirmation, prepare changes.

Connect your coding agent to bitbybit so it can work with your company's data. It can answer questions about your campaigns, customers, orders, and AI agent settings. If you allow it, it can also prepare changes, such as drafting a campaign or creating a segment, which you review and confirm first. You add bitbybit to your coding agent once, sign in to bitbybit in your browser, and approve access. You never paste a key or token into your coding agent.

> [!NOTE]
>
> **What is MCP?** The Model Context Protocol (MCP) is an open standard that lets AI assistants connect to other apps. A coding agent is an AI assistant that works in your terminal or code editor, such as Claude Code, Codex, or Cursor. After you connect it to the bitbybit MCP server, your coding agent can look up data in your bitbybit company and, if you allow it, prepare changes for you to confirm.

## Prerequisites

* You are an **Admin** or **Super Admin** of the company you want to connect.
* The company is on a paid bitChat or bitCRM plan.
* You use a coding agent that supports remote MCP servers with sign-in, such as Claude Code, Codex, or Cursor.

**1. Add bitbybit to your coding agent**

* Add the bitbybit MCP server with the command or settings for your coding agent.
* Use the name `bitbybit` so you can find it easily later.

> [!TIP]
>
> You can also copy a ready-made setup prompt from [Settings - Developer](https://app.bitbybit.studio/settings?section=developer) under **Connect an AI agent (MCP)** and paste it into your coding agent. It contains the same setup as the tabs below.

> [tab] Claude Code
>
> Run this command in your terminal:
>
> ```bash theme={null}
> claude mcp add --transport http --scope user bitbybit https://mcp.bitbybit.studio/public/mcp
> ```
>
> Then open Claude Code, type `/mcp`, choose **bitbybit**, and select **Authenticate**.

> [tab] Codex
>
> Run these commands in your terminal. The second command opens the sign-in page in your browser:
>
> ```bash theme={null}
> codex mcp add bitbybit --url https://mcp.bitbybit.studio/public/mcp
> codex mcp login bitbybit
> ```

> [tab] Cursor
>
> Add this to `~/.cursor/mcp.json` to use bitbybit in every project, or to `.cursor/mcp.json` to use it in one project:
>
> ```json theme={null}
> {
>   "mcpServers": {
>     "bitbybit": {
>       "url": "https://mcp.bitbybit.studio/public/mcp"
>     }
>   }
> }
> ```
>
> Cursor asks you to sign in the first time it uses bitbybit.

**2. Sign in to bitbybit**

* Your coding agent opens the bitbybit connection page in your browser.
* If you are not signed in, sign in with your bitbybit account. You return to the connection page automatically.

**3. Review the request and choose a company**

* Check the app name under **App**.
* Check **Identified by**. A verified app shows its domain, for example `claude.ai` for Claude Code. **Self-registered app** means the app registered itself and bitbybit has not verified its name.
* Check **Returns to**. This is where your browser goes after you approve. For a coding agent it is usually `localhost`, which means an app on your own computer.
* Choose the company to connect under **Workspace**. The list shows only companies where you are an Admin or Super Admin.
* Review the permissions. **Read workspace data** is always included. Tick **Make changes** if you want your coding agent to prepare changes for you to confirm.

> [!WARNING]
>
> Only continue if you started this connection from your own coding agent a moment ago. If you did not, click **Deny**.

Each connection covers one company. To use another company, connect again and choose that company.

**4. Allow access**

* Click **Allow access**. Your browser returns to your coding agent, which now shows bitbybit as connected.
* You can close the browser tab once your coding agent shows it is connected.
* To cancel, click **Deny**. Your coding agent is not connected.

**5. Check the connection**

* Ask your coding agent a question about your company, such as "List my latest campaigns" or "What is still missing in my workspace setup?"
* Your coding agent answers with data from the company you chose.

## What your coding agent can do

Your coding agent can read your company's data. Each request runs as you, so it sees only what your current role allows.

If you allowed **Make changes** on the connection page, your coding agent can also prepare these changes:

* Save bitCRM campaigns, WhatsApp templates, and automations as drafts.
* Create segments and add customer tags.
* Add, re-crawl, or delete Knowledge Base sources.
* Update AI agent settings, and create, edit, delete, or run AI tests.

Every change takes two steps. Your coding agent first shows you a preview of exactly what will change, and nothing changes until you agree and it confirms. Your coding agent never sends messages to your customers, submits templates to Meta, or activates an automation. Every confirmed change appears in your company's activity log.

> [!NOTE]
>
> An automation is saved as a **draft**: when an order is created, paid, or fulfilled (Shopify or bitbybit Commerce), when a checkout is abandoned, or when a customer signs up, it can wait, then send one approved WhatsApp template without variables. Open it in bitCRM to review and activate it.

| Area | What your coding agent can read |
| - | - |
| Analytics | Chat, CRM, and AI agent performance |
| bitChat | Conversations (tickets), searched by status, channel, text, or date |
| bitCRM | Campaigns, WhatsApp templates, automations, and campaign checks |
| Customers | Customers, segments, tags, and orders |
| AI Studio | AI agent settings, Knowledge Base, AI Storage files, and AI tests |
| Account | Plan and quotas, team members, your permissions, and workspace readiness |

## Disconnect your coding agent

* Claude Code: run `claude mcp remove bitbybit`.
* Codex: run `codex mcp logout bitbybit` to sign out, or `codex mcp remove bitbybit` to remove it.
* Cursor: delete the `bitbybit` entry from `mcp.json`.
* In bitbybit: go to [Settings - Developer](https://app.bitbybit.studio/settings?section=developer), find the agent under **Connected AI agents**, and click **Revoke**. You can revoke your own connections. Admins and Super Admins can revoke any connection in the company.

If you are removed from the company or your role changes from Admin, your coding agent loses access to that company on its next request.

## Troubleshooting

> [accordion] Your coding agent says bitbybit needs authentication
>
> Your coding agent is not signed in yet, or its access ended, for example after 30 days without use. Sign in again: in Claude Code, type `/mcp` and select **Authenticate**. In Codex, run `codex mcp login bitbybit`.

> [accordion] The connection page says the request expired
>
> The connection page is valid for 10 minutes and can be used only once. Start the connection again from your coding agent.

> [accordion] The connection page says the app cannot be connected
>
> bitbybit did not recognize the app or the address it returns you to. Remove the server from your coding agent, then add it again with the exact command or settings in Step 1.

> [accordion] The connection page says only Admins can connect
>
> You are not an Admin or Super Admin of the company you chose. Ask an Admin or Super Admin to connect, or choose a company where you are an Admin.

> [accordion] The connection page says a paid plan is needed
>
> Connecting a coding agent needs a paid bitChat or bitCRM plan for that company. Upgrade the plan, then start the connection again from your coding agent.

> [accordion] Your coding agent cannot make changes
>
> The connection was approved without **Make changes**. Start the connection again from your coding agent and tick **Make changes**. The new connection replaces the old one.

> [accordion] Your coding agent says it does not have permission
>
> Your role in the company does not include that area. Ask an Admin or Super Admin to update your role in [Settings - User & Authority](https://app.bitbybit.studio/settings?section=user-authority).

## Related articles

* [How to add user](https://knowledge.bitbybit.studio/settings/how-to-add-a-user.md)
* [How to create or add a company](https://knowledge.bitbybit.studio/settings/how-to-create-or-add-a-company.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.