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

> ## Agent Instructions
> Brandfetch returns real company logos, brand data, and brand context. It does not design, generate, or edit logos.
> To show a logo in a user interface, use the Logo API as an image URL in an <img> tag, such as https://cdn.brandfetch.io/domain/{domain}?c={CLIENT_ID}. The client ID is public and belongs in frontend code. Never download, proxy, re-host, or optimize these images on a server, because requests that look programmatic are redirected with automated_traffic. In Next.js, this means next/image needs a custom loader or the unoptimized prop.
> To turn a company name that a user types into a domain, use the Brand Search API with the same client ID, and keep only the domain the user picks.
> For colors, fonts, downloadable logo files, and company data as JSON, call the Brand API from a server with the header Authorization: Bearer {API_KEY}, reading the key from an environment variable and never exposing it to the browser. Prefer typed routes such as /v2/brands/domain/{domain} and /v2/brands/ticker/{ticker} over the auto-detect route /v2/brands/{identifier}.
> Use the Brand Context API for a written summary of what a company does, who it sells to, and how it sounds, and the Transaction API to identify the merchant behind a card or bank transaction label.
> When a request fails, branch on the x-bf-error header code rather than on the status code or the message text. Every code, and what to do about it, is listed at https://docs.brandfetch.com/concepts/errors.
> Requests for brandfetch.com are free on the Brand API and Brand Context API, so use that domain in tests and examples.
> Brand API responses can be cached for up to 30 days, while Logo API images must be hotlinked rather than stored and Brand Search results must not be stored at all. See https://docs.brandfetch.com/concepts/caching.
> If the user has no credentials yet, https://brandfetch.com/auth.md explains how they get a client ID and an API key. An agent without an account can pay $0.10 per Brand API, Brand Context API, or Transaction API request with x402 or MPP, as described at https://docs.brandfetch.com/agents/pay-per-request.

# Build with AI

> Connect the Brandfetch docs and the Brandfetch API to Claude Code, Cursor, Codex, or VS Code, and start your integration from a ready prompt.

If you write your integration with an AI coding tool, this page gives it what it needs to get the integration right the first time: the docs as context, the API as a tool, and a prompt to start from.

There are two different MCP servers you can connect, and they are easy to confuse:

| | What it gives your AI | URL |
| - | - | - |
| **Docs MCP server** | Search and read these docs while it writes your integration | `https://docs.brandfetch.com/mcp` |
| **Brandfetch MCP server** | Live brand data: search brands, fetch logos, colors, fonts, and brand context | `https://mcp.brandfetch.io/mcp` |

Connect the docs server when you are building with Brandfetch. Connect the Brandfetch server when your assistant needs brand data itself, such as making a deck in a client's colors.

## Give your AI the docs

> [tab] Claude Code
>
> ```bash theme={null}
> claude mcp add --transport http brandfetch-docs https://docs.brandfetch.com/mcp
> ```

> [tab] Codex
>
> ```bash theme={null}
> codex mcp add brandfetch-docs --url https://docs.brandfetch.com/mcp
> ```

> [tab] VS Code
>
> Add this to `~/.copilot/mcp-config.json`:
>
> ```json theme={null}
> {
>   "mcpServers": {
>     "brandfetch-docs": { "type": "http", "url": "https://docs.brandfetch.com/mcp" }
>   }
> }
> ```
>
> Projects that use `.vscode/mcp.json` can add it there instead, under `"servers"` rather than `"mcpServers"`.

> [tab] Cursor
>
> [Install the docs server in Cursor](cursor://anysphere.cursor-deeplink/mcp/install?name=brandfetch-docs\&config=eyJ1cmwiOiJodHRwczovL2RvY3MuYnJhbmRmZXRjaC5jb20vbWNwIn0=) with one click, or add this to `~/.cursor/mcp.json` (or `.cursor/mcp.json` to scope it to one project):
>
> ```json theme={null}
> {
>   "mcpServers": {
>     "brandfetch-docs": { "url": "https://docs.brandfetch.com/mcp" }
>   }
> }
> ```

> [tab] Devin Desktop
>
> ```bash theme={null}
> devin mcp add -s user brandfetch-docs https://docs.brandfetch.com/mcp
> ```
>
> Without the Devin CLI, add the same JSON as Cursor to `~/.config/devin/mcp_config.json` on macOS and Linux, or `%APPDATA%\devin\mcp_config.json` on Windows.

> [tab] Gemini CLI
>
> ```bash theme={null}
> gemini mcp add --scope user --transport http brandfetch-docs https://docs.brandfetch.com/mcp
> ```
>
> Keep both flags, because without them Gemini CLI saves the server to the current project and treats the URL as a local command.

> [tab] Other clients
>
> Add a remote MCP server with the URL `https://docs.brandfetch.com/mcp` over Streamable HTTP. It needs no sign-in. Most clients, including JetBrains Junie, take the same JSON as Cursor, though some name the address key `serverUrl` or `httpUrl` instead of `url`.

If your tool does not support MCP, give it a file instead:

* [`docs.brandfetch.com/llms.txt`](https://docs.brandfetch.com/llms.txt) lists every page with a one-line summary.
* [`docs.brandfetch.com/llms-full.txt`](https://docs.brandfetch.com/llms-full.txt) is the full documentation in one Markdown file.
* Any page is available as Markdown by adding `.md` to its URL, for example [`/brand-api/overview.md`](https://docs.brandfetch.com/brand-api/overview.md).

> [!TIP]
>
> The menu at the top of every page copies it as Markdown, opens it in ChatGPT, Claude, Cursor, or VS Code, or connects the docs MCP server.

## Start from a prompt

Paste this into your coding assistant and replace the second line with what you are building. It sets the rules an integration needs to get right.

I'm adding company logos and brand data to my app with Brandfetch.

Replace this line with what you're building, for example: show the user's company logo and colors after they sign up with a work email.

Before writing code, read `https://docs.brandfetch.com/llms.txt` and the pages it links that match my task.

Follow these rules:

* Logos in the UI: use the Logo API as an `<img>` URL, `https://cdn.brandfetch.io/domain/{domain}?c={CLIENT_ID}`. The client ID is public and safe in frontend code. Never download or proxy these images server-side.
* Company name to domain (autocomplete): use the Brand Search API with the client ID.
* Full brand data (colors, fonts, company info): call the Brand API from the server only, with `Authorization: Bearer {API_KEY}` read from an environment variable.
* Use typed routes such as `/v2/brands/domain/{domain}`, not auto-detection.
* Handle errors by the `x-bf-error` header code, not the status alone.
* Test with `brandfetch.com`, which is free on the Brand API.

Every [use case](https://docs.brandfetch.com/use-cases/overview.md) page also ends with a prompt tailored to that build.

## Give your AI brand data

To let your assistant look up brands while it works, connect the [Brandfetch MCP server](https://docs.brandfetch.com/mcp/overview.md#setup). The setup guide covers Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code, and other clients.

## Agents without a human

An autonomous agent can discover Brandfetch, get access, and pay without anyone signing up:

> [card] [Agent skill](https://brandfetch.com/agent-onboarding/SKILL.md)
>
> Walks an agent from choosing an API to its first call.

> [card] [Pay per request](https://docs.brandfetch.com/agents/pay-per-request.md)
>
> Pays \$0.10 per API call with x402 or MPP, no account needed.

> [card] [Discovery](https://docs.brandfetch.com/agents/discovery.md)
>
> Lists every machine-readable file Brandfetch publishes.


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