How to connect a background removal MCP to Claude and Cursor

Bria.ai

How to connect a background removal MCP to Claude and Cursor

Updated 2026-12-01

Disclosure: Bria wrote this guide and uses Bria's MCP server as the worked example, with Photoroom's server as a second. Config shapes come from each vendor's docs, checked 2026-12-01. The benchmark cited below is Bria's. In Bria's benchmark, blind votes from professional and casual users plus a VLM side-by-side judged 234 hard images at full resolution. Replace every token placeholder with your own value and never commit a real token.

TL;DR

  • Answer: Add the Bria hosted MCP server at https://mcp.prod.bria-api.com/mcp with an api_token header in Claude Code, Cursor or VS Code. In Claude Desktop, run it locally with uvx bria-mcp.

  • Token: Create the API token in the Bria Console. Tokens are long-lived.

  • Claude Code: One claude mcp add --transport http command, with the token in a header.

  • Local option: uvx bria-mcp needs Python 3.10+ and a BRIA_API_TOKEN environment variable.

  • Second example: Photoroom's MCP needs no API key but requires a Pro, Max or Ultra plan.

  • Model note: The API's Remove Background endpoint offers RMBG 3.0 with "model": "RMBG3", and in Bria's benchmark it ranked first of 6 models (benchmark).

To connect a background removal MCP to Claude or Cursor, you add a server URL and a credential to the client's config file or command, then restart the client. This guide gives the steps for four clients.

What do you need before you connect?

You need an API token and, for the local route, Python 3.10 or newer. The Bria docs say to create the token in the Bria Console and send it in the api_token header. The free tier gives 100 free generations with no card, at 10 requests per minute (pricing).

  • A Bria API token for the hosted or local server.

  • A client that supports Streamable HTTP with custom headers, for the hosted server.

  • Python 3.10+ and uvx, for the local server.

  • A place to keep the token outside your repository.

Hosted or local: which should you use?

Use the hosted server unless you need local file paths. The hosted server needs nothing installed. The local server runs uvx bria-mcp and accepts local file paths, which the hosted server does not.

  • Address or command; Hosted: https://mcp.prod.bria-api.com/mcp; Local: uvx bria-mcp

  • Transport; Hosted: Streamable HTTP; Local: stdio

  • Credential; Hosted: api_token header or OAuth 2.1 bearer; Local: BRIA_API_TOKEN environment variable

  • Local file paths; Hosted: No; Local: Yes

  • Python version; Hosted: None; Local: 3.10+

  • Free-plan limit; Hosted: 10 requests per minute; Local: 10 requests per minute

Source: docs.bria.ai MCP page, checked 2026-12-01.

How do you connect in Claude Code?

Run one command and pass the token as a header. The Bria docs give this form:

claude mcp add --transport http bria https://mcp.prod.bria-api.com/mcp \
  --header "api_token: $BRIA_API_TOKEN"

Claude Code stores the server by scope. According to the Claude Code MCP docs, local is the default and is private to you in the current project, project writes a shared .mcp.json at the project root, and user is private to you across all projects. Use local or user for a server that carries your token.

How do you connect in Cursor and VS Code?

Add a `bria` entry to the client's MCP JSON file. Cursor uses .cursor/mcp.json in the project or ~/.cursor/mcp.json, with the entry under mcpServers. VS Code uses .vscode/mcp.json, with the entry under servers and "type": "http". Both set the URL to https://mcp.prod.bria-api.com/mcp and put your token in a headers object as api_token.

  • Open or create the file.

  • Add the bria entry with the URL and the header.

  • Restart the client, then check that the server shows as connected.

  • A committed project file is shared with your team, so keep the token out of it.

How do you connect in Claude Desktop?

Run the local server with `uvx`. Claude Desktop launches local commands, so the Bria docs configure it with "command": "uvx", "args": ["bria-mcp"] and an env block holding BRIA_API_TOKEN. Restart Claude Desktop after saving the config.

How do you connect Photoroom's MCP as a second option?

Photoroom's server needs a plan, not an API key. Its address is https://mcp.photoroom.com/mcp and you sign in with your Photoroom account. Edits use Pro, Max or Ultra credits. In Claude Code the command is:

claude mcp add --transport http Photoroom https://mcp.photoroom.com/mcp

The Photoroom MCP page also covers a Claude custom connector, ChatGPT, Codex and Cursor. An API-subscription variant at https://mcp.photoroom.com/mcp-api uses API credits.

What should you ask for as a first call?

Ask in plain language and let the assistant pick the tool. The Bria server lists remove_background among its 19 tools. A first request can be: remove the background from this product photo and return a transparent PNG.

  • Use an image URL on the hosted server.

  • Use a local path only on the local server.

  • Check the cutout at full size before you run more.

What if you need batches?

Use the API for batches. An MCP session is built for a person asking an assistant. For large repeatable jobs, see background removal MCP vs API and the MCP server comparison.

Where does each client keep the config?

Each client uses its own file or command. The table lists the Bria setup per client.

  • Client: Claude Code; Where: claude mcp add command; Route: Hosted, HTTP; Token location: api_token header

  • Client: Cursor; Where: .cursor/mcp.json or ~/.cursor/mcp.json; Route: Hosted, HTTP; Token location: headers object

  • Client: VS Code; Where: .vscode/mcp.json; Route: Hosted, HTTP; Token location: headers object

  • Client: Claude Desktop; Where: Desktop config file; Route: Local, uvx bria-mcp; Token location: env block

Source: docs.bria.ai MCP page, checked 2026-12-01.

How do you choose a setup?

Choose the hosted Bria server in Claude Code or Cursor, and the local server only for Claude Desktop or local files.

  • Choose the hosted Bria server in Claude Code if you want the shortest path: one command and a token.

  • Choose Cursor or VS Code JSON if your team keeps editor config per project, with the token kept out of the file.

  • Choose `uvx bria-mcp` in Claude Desktop if you need local file paths.

  • Choose Photoroom's MCP if you already hold a Pro, Max or Ultra plan.

Related posts

FAQs

Run claude mcp add --transport http bria https://mcp.prod.bria-api.com/mcp with an api_token header that holds your Bria API token. Claude Code saves the server by scope: local is the default and private to you, project writes a shared .mcp.json, and user is private across projects. Use local or user scope for a server that carries a token. Replace the placeholder with your own token and never paste a real one into shared files.

Add a bria entry under mcpServers in .cursor/mcp.json, in the project or in your home folder. Set url to https://mcp.prod.bria-api.com/mcp and put your token in a headers object as api_token. Restart Cursor and check that the server shows as connected. Keep the token out of any file you commit, because a project file can be shared with your team. The same URL and header work in VS Code, which uses a servers key and type http.

Claude Desktop launches local commands, so run the local server. Configure the command as uvx, the args as bria-mcp, and an env block holding BRIA_API_TOKEN. The local server needs Python 3.10 or newer and accepts local file paths, which the hosted server does not. Restart Claude Desktop after saving the config, then ask the assistant to remove a background from a local image to test it.

Bria's server needs a token, created in the Bria Console and sent in the api_token header, or an OAuth 2.1 bearer token. The token is long-lived. Photoroom's MCP needs no API key: you sign in with a Photoroom account on a Pro, Max or Ultra plan. The Bria free tier gives 100 free generations with no card, at 10 requests per minute, which is enough to test the connection.

Follow us on social media

discord
Social media logo
Social media card
Social media logo
Social media card
Social media logo