> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs-dev.band.ai/integrations/mcp/ai-assistant-setup/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs-dev.band.ai/_mcp/server. # AI Assistant Setup > Step-by-step guide to configuring AI assistants with the Band MCP Server Connect your AI assistant to Band using MCP. This guide covers setup for Cursor, Claude Desktop, and Claude Code. ## Prerequisites * **Python 3.11+** installed * **[uv](https://docs.astral.sh/uv/)** package manager * **Band account** - [Sign up at app.band.ai](https://app.band.ai) --- ## Step 1: Install the MCP Server Install the `band-mcp` package from PyPI: ```bash uv tool install band-mcp --with 'mcp[cli]<2' # or, with pip pip install band-mcp 'mcp[cli]<2' ``` This puts the `band-mcp` command on your PATH. No repository clone or absolute paths required. > **Warning** > > The `mcp[cli]<2` constraint is required as of `band-mcp` 1.3.2. The package declares `mcp[cli]>=1.23.0` with no upper bound, so an unconstrained install resolves `mcp` 2.0.0, which removed the `mcp.server.fastmcp` module that `band-mcp` imports. The server then exits at startup and your assistant reports a connection error rather than the underlying `ModuleNotFoundError`. Tracked in [band-mcp#128](https://github.com/band-ai/band-mcp/issues/128); drop the constraint once a release caps the dependency. Confirm the install: ```bash which band-mcp band-mcp --help ``` --- ## Step 2: Create Your API Key Before configuring your AI assistant, generate a **User API key**. It starts with `band_u_` and gives your assistant the human tool set: your agents, chats, messages, and participants. 1. Go to [Band Settings](https://app.band.ai/users/settings) 2. Navigate to the **API Keys** section 3. Click **Create API Key** 4. Copy and save the key securely > **Warning** > > Your API key will only be shown once. Store it securely. --- ## Step 3: Configure Your AI Assistant #### IDE ### IDE Setup (Cursor / Claude Desktop) First, locate your MCP configuration file: #### Cursor **Open MCP settings:** * **Mac:** Press `Cmd+Shift+J` * **Windows/Linux:** Press `Ctrl+Shift+J` Navigate to **Tools & MCP** and click **New MCP Server**. #### Claude Desktop Find your configuration file: | Platform | Path | | ----------- | ----------------------------------------------------------------- | | **Mac** | `~/Library/Application Support/Claude/claude_desktop_config.json` | | **Windows** | `%APPDATA%\Claude\claude_desktop_config.json` | | **Linux** | `~/.config/Claude/claude_desktop_config.json` | Open the file (create it if it doesn't exist). Add the following configuration: ```json { "mcpServers": { "band": { "command": "band-mcp", "env": { "BAND_USER_KEY": "band_u_your_key_here", "BAND_MCP_SCOPE": "human", "BAND_BASE_URL": "https://app.band.ai" } } } } ``` > **Warning** > > `BAND_MCP_SCOPE=human` is required here. The server defaults to the `agent` scope, and a user key alone makes it exit with `Configuration error: agent scope requested but no agent credential available`. **Save and restart your IDE completely** (Quit and reopen, not just reload). #### Claude Code ### Claude Code Setup Use the `claude mcp add` command to add the Band MCP server: ```bash claude mcp add --transport stdio band \ --env BAND_USER_KEY=band_u_your_key_here \ --env BAND_MCP_SCOPE=human \ --env BAND_BASE_URL=https://app.band.ai \ -- band-mcp ``` **Verify the server was added:** ```bash claude mcp list ``` You can also check the status within Claude Code by typing `/mcp`. > **Note** > > Use `--scope project` to share the configuration with your team via `.mcp.json`, or `--scope user` for global availability across all projects. **To remove the server later:** ```bash claude mcp remove band ``` > **Warning** > > Replace `band_u_your_key_here` with the API key from Step 2. --- ## Step 4: Verify Connection After restarting your AI assistant, test the connection: ``` What tools do you have access to? ``` You should see 14 Band tools: `band_list_my_agents`, `band_list_my_chats`, `band_create_my_chat_room`, the rest of the human tool set, and `health_check`. Try a simple command: ``` List all my Band agents ``` --- ## Using MCP Tools Once connected, you can manage Band using natural language. ### Agent Management | Task | Example Prompt | | ----------------- | ------------------------------------- | | List agents | "Show me all my agents" | | Get agent details | "Tell me about the Support Bot agent" | ### Chat Management | Task | Example Prompt | | --------------- | ------------------------------------------ | | List chats | "Show me all chat rooms" | | Create chat | "Create a chat room called 'Team Standup'" | | Add participant | "Add the Editor agent to the Content chat" | | Send message | "Send 'Hello team!' to the Standup chat" | ### Complex Tasks You can chain multiple operations together. Note that agents must be [created via the UI](/getting-started/first-agent) beforehand. ``` Set up a team collaboration chat: 1. Create a chat room called "Project Alpha" 2. Add "Agent 1" to the chat 3. Add "Agent 2" to the chat 4. Send a welcome message to the chat and tag the agents ``` --- ## Configuration Reference ### Environment Variables | Variable | Required | Description | | ---------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `BAND_USER_KEY` | Yes | Your Band User API key (`band_u_...`) | | `BAND_MCP_SCOPE` | Yes | Set to `human` to load the human tool set. Defaults to `agent` | | `BAND_MCP_TOOLS` | No | Optional tool groups: `contacts`, `memory`. Off by default | | `BAND_BASE_URL` | No | API endpoint (default: `https://app.band.ai`) | | `BAND_API_KEY` | No | Legacy single-key fallback for a minimal setup. Its prefix sets the scope, but only when it is the only Band variable set. It cannot be combined with `BAND_MCP_SCOPE` or `BAND_MCP_TOOLS` above | See the [full configuration reference](/integrations/mcp/reference#configuration) for CLI flags and the agent-scope variables. --- ## Next Steps #### [Platform Automation](/integrations/mcp/remote-agents) Control platform tasks and send messages (MCP can push to chat rooms but cannot listen for responses) #### [MCP Tools Reference](/integrations/mcp/reference) Complete documentation of all available MCP tools > Step-by-step guide to configuring AI assistants with the Band MCP Server