brandfetch
A command-line tool and MCP server that pulls brand details — logos, colors, description, company info, social links and WHOIS registration data — for a given domain, served up from what Brandfetch publishes.
Not the official Brandfetch software. This is an independent side project. It is not affiliated with, endorsed by, or sponsored by Brandfetch. "Brandfetch" is a trademark of Brandfetch Ltd, and all brand data shown by this tool belongs to its respective owners.
Install
pip install brandfetch
Requires Python 3.10+. On first use the tool downloads a headless browser, which it drives to read brand pages without tripping bot detection.
Usage
Look up a company by its domain:
brandfetch nike.com
If the argument has no dot, it's treated as a search instead:
brandfetch nike
| Flag | Meaning |
|---|---|
-j, --json |
print raw JSON |
-m, --md |
print Markdown |
-v, --version |
show version and exit |
-h, --help |
show help and exit |
--mcp |
run the MCP server on stdio |
Example of the JSON output:
{
"name": "OpenAI",
"domain": "openai.com",
"description": "Open AI is an AI research and deployment company dedicated to ensuring...",
"logos": [
"https://cdn.brandfetch.io/idR3duQxYl/theme/dark/logo.svg",
"https://cdn.brandfetch.io/idR3duQxYl/theme/light/logo.svg"
],
"colors": [
"#080808",
"#ffffff"
],
"industry": "Science and Education",
"company_type": "Partnership",
"year_founded": "2015",
"company_size": "1001-5000 employees",
"social_links": [
{ "platform": "twitter", "url": "https://twitter.com/openai" },
{ "platform": "github", "url": "https://github.com/openai" }
],
"related": ["elevenlabs.io", "wiley.com"],
"whois": {
"registrar": "MarkMonitor Inc.",
"creation_date": "2007-01-19T19:28:24+00:00",
"expiration_date": "2029-01-19T19:28:24+00:00",
"name_servers": ["ns1-02.azure-dns.com"],
"organization": "OpenAI",
"country": "US"
}
}
Use with your agent
brandfetch --mcp exposes three tools over the Model Context Protocol:
| Tool | What it returns |
|---|---|
lookup_brand |
full brand profile for a domain |
search_brands |
matching brands for a name or keyword |
whois_lookup |
WHOIS record for a domain |
After pip install brandfetch the command is brandfetch --mcp; when running from a checkout use python -m brandfetch.cli --mcp.
One caveat across all of the setups below: domain lookups drive a real headless browser and can take 10-80s. If your agent has a per-tool timeout, raise it or the lookup will be killed mid-flight.
opencode
Project opencode.json, or the global ~/.config/opencode/opencode.json:
{
"mcp": {
"brandfetch": {
"type": "local",
"command": ["brandfetch", "--mcp"],
"enabled": true,
"timeout": 300000
}
}
}
The timeout is in milliseconds.
Claude Code
One command (add --scope user to make it available in every project):
claude mcp add brandfetch -- brandfetch --mcp
Or write a project-scoped .mcp.json so the whole team shares it:
{
"mcpServers": {
"brandfetch": { "command": "brandfetch", "args": ["--mcp"] }
}
}
Claude Desktop
Add to claude_desktop_config.json (%APPDATA%\Claude\ on Windows, ~/Library/Application Support/Claude/ on macOS):
{
"mcpServers": {
"brandfetch": { "command": "brandfetch", "args": ["--mcp"] }
}
}
Codex (OpenAI Codex CLI)
Edit ~/.codex/config.toml (the same file is shared by the Codex CLI, the ChatGPT desktop app, and the IDE extension):
[mcp_servers.brandfetch]
command = "brandfetch"
args = ["--mcp"]
enabled = true
startup_timeout_sec = 30
tool_timeout_sec = 300
Codex defaults tool_timeout_sec to 60, which is too short for a browser-backed lookup.
How it works
- Domain lookups — a stealth headless browser visits
brandfetch.com/<domain>and reads the page directly. - WHOIS — queried over the WHOIS protocol (TCP port 43), so it works even when the main site is unreachable.
Tech stack
- Typer — CLI framework
- Rich — terminal output
- Scrling — stealth headless-browser scraping (via the
scraplingpackage) - MCP Python SDK — LLM tool server
Development
python -m pytest tests/test_cli.py tests/test_mcp.py
python test_mcp_manual.py # spins up the MCP server over stdio and pokes it
License
MIT. See LICENSE.
Metadata
Release files for brandfetch 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| brandfetch-0.4.0.tar.gz | 19.0 kB | Without provenance | Details for brandfetch-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| brandfetch-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for brandfetch-0.4.0-py3-none-any.whl |
Total release size: 32.1 kB
Release files / brandfetch-0.4.0.tar.gz
| Download URL | brandfetch-0.4.0.tar.gz |
|---|---|
| Size | 19.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3e995f3e0ae721c06bd83ca309a736b65e0a7b54a5c6cb5fae0e0e2e6598a42f
|
|
BLAKE2b-256 checksum How to use checksums |
4bdae34fb06e209629f2c6196b7b04ca7cab2b2ca1d16d6daa760dc946a88db8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|
Release files / brandfetch-0.4.0-py3-none-any.whl
| Download URL | brandfetch-0.4.0-py3-none-any.whl |
|---|---|
| Size | 13.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f534c50e00fa51b76edb9361d91811ff71aba0d961096a2489aaaf440910f98f
|
|
BLAKE2b-256 checksum How to use checksums |
ead6bb08f1b8d1adbedc8ed7d522f7a6769fbb0a0ab5d457d6dc19c29385a6cc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|
Security for brandfetch 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.