| name | description |
|---|---|
browser-fetch |
Fetch authenticated web content using browser session (SSO, internal sites) |
Fetch web content from authenticated/internal sites using a real browser with persistent login sessions.
Repository: https://github.com/benthomasson/browser-fetch
Use this skill when:
- Fetching internal company pages that require SSO login
- curl returns login pages or 401/403 errors
- WebFetch fails due to authentication
- You need to access content behind Red Hat SSO or similar
# User starts server (token required by default):
uvx --from "git+https://github.com/benthomasson/browser-fetch" browser-fetch --serve https://internal.redhat.com
# Server prints a token. User provides token to Claude. Claude fetches via curl:
curl 'http://localhost:8080/fetch?token=TOKEN&url=https://internal.redhat.com/page&text=true'IMPORTANT: Ask the user for the token printed by the server.
# First time: Login to save session (opens browser)
uvx --from "git+https://github.com/benthomasson/browser-fetch" browser-fetch --login https://internal.redhat.com
# After login: Fetch headlessly
uvx --from "git+https://github.com/benthomasson/browser-fetch" browser-fetch --headless --text https://internal.redhat.com/page# Open browser for manual SSO login
uvx --from "git+https://github.com/benthomasson/browser-fetch" browser-fetch --login https://source.redhat.com
# Log in via browser, then press Enter
# Session saved to ~/.config/browser-fetch/profile# Fetch full HTML
uvx --from "git+https://github.com/benthomasson/browser-fetch" browser-fetch --headless https://internal.redhat.com/page
# Fetch text only (no HTML tags) - easier to read
uvx --from "git+https://github.com/benthomasson/browser-fetch" browser-fetch --headless --text https://internal.redhat.com/page
# Extract specific element by CSS selector
uvx --from "git+https://github.com/benthomasson/browser-fetch" browser-fetch --headless --selector "main" --text https://docs.example.com/page
# Save to file
uvx --from "git+https://github.com/benthomasson/browser-fetch" browser-fetch --headless --text -o /tmp/page.txt https://internal.redhat.com/page| Option | Description |
|---|---|
--login |
Open browser for manual login, save session |
--headless |
Run without visible browser (requires saved session) |
--text |
Extract text content only (no HTML) |
--selector CSS |
Extract specific element by CSS selector |
-o FILE |
Save output to file |
--wait N |
Wait N seconds after page load (default: 5) |
--timeout N |
Page load timeout in seconds (default: 30) |
--profile-dir DIR |
Custom profile directory |
--serve |
Run as HTTP server (browser stays open) |
--port N |
Server port (default: 8080) |
--no-token-dangerous |
Disable security token (NOT recommended) |
User starts server in a separate terminal:
uvx --from "git+https://github.com/benthomasson/browser-fetch" browser-fetch --serve https://source.redhat.comServer prints a security token. Ask user to provide this token.
Claude fetches via curl (with token):
# Fetch text content
curl 'http://localhost:8080/fetch?token=TOKEN&url=https://source.redhat.com/page&text=true'
# Fetch with selector
curl 'http://localhost:8080/fetch?token=TOKEN&url=https://source.redhat.com/page&selector=main&text=true'
# Check if server is running (no token needed)
curl 'http://localhost:8080/health'Query parameters:
token- security token (required by default)url- URL to fetch (required)text=true- extract text onlyselector=CSS- extract specific elementwait=N- wait N seconds after load
When user asks to read an internal page:
-
Check if server is running:
curl -s 'http://localhost:8080/health' || echo "Server not running"
-
If not running, ask user to start it and provide token:
Please start browser-fetch server and give me the token: uvx --from "git+https://github.com/benthomasson/browser-fetch" browser-fetch --serve https://source.redhat.com -
If running but you get 401, ask user for the token:
I got 401 Unauthorized. Please provide the security token from the browser-fetch server output. -
Fetch content via curl (with token):
curl -s 'http://localhost:8080/fetch?token=USER_PROVIDED_TOKEN&url=https://source.redhat.com/page&text=true' -
Or save to file and read:
curl -s 'http://localhost:8080/fetch?token=TOKEN&url=https://source.redhat.com/page&text=true' > /tmp/page.txt
Then use the Read tool to read
/tmp/page.txt
- Token is required by default - Prevents other processes from using your session
- Ask user for token - Token is printed when server starts
- Server mode for SSO - Keeps browser open, handles auth better
- Use
text=truefor readable output without HTML clutter - Check health first -
curl localhost:8080/healthto verify server is up (no token needed)
| Tool | Use Case |
|---|---|
| curl | Public pages, APIs with tokens |
| WebFetch | Public pages (can be slow/unreliable) |
| browser-fetch | Authenticated pages, SSO, internal sites |
"Session expired" - Re-run with --login to refresh
"Playwright not installed" - First time setup:
cd ~/git/browser-fetch && uv sync && uv run playwright install chromiumPage loads but content missing - Increase wait time:
browser-fetch --headless --wait 10 --text URLSSO redirect loops - Some SSO systems need manual login each time
Last updated: 2026-02-10