Skip to main content
Glama
README.md
# claude-web-bridge

AI coding agents are bad at the web you actually use. Claude Code, Codex or Gemini CLI ask for a page and get a 403, a Cloudflare check, an empty JavaScript shell, or only the abstract of a paper your university already pays for. You can open all of those in your browser in a second.

This small MCP server closes that gap. It runs on your machine and opens pages in a separate Chrome window that has your own logins. The agent gets clean Markdown back, or a PDF saved to disk.

I built it for academic work: reading papers, getting PDFs, checking journal metrics such as JCR quartiles. It works for any page that's hard to reach, though.

## How it works

- It tries plain HTTP first. If that is blocked, nearly empty or paywalled, it switches to the browser.
- The browser is your installed Chrome (or Edge) running with its own profile, so your everyday profile isn't touched. Every agent on the machine shares that one window, so you only log in once.
- You do the logins and the "are you human" checkboxes yourself. The agent opens the window, tells you what to click, and waits. It never types passwords or solves CAPTCHAs.
- Every downloaded PDF is checked to make sure it really is a PDF, not a login page.
- You don't need a subscription. For a paywalled paper you still get its abstract and details, and a legal open copy whenever one exists. Abstracts and copies come from Crossref, OpenAlex, Semantic Scholar and Europe PMC, through anonymous requests. A university login just opens more full texts.
- Some sites run an automatic bot check, and that check only works in a window you can actually see. When one shows up, the bridge window pops up for a few seconds and then minimizes again.

## Install

You need Node.js 22.22+ or 24.15+, and Chrome or Edge. So far I've only tested it on Windows, but it should run on macOS and Linux too.

```
git clone https://github.com/sefatuncer/claude-web-bridge.git
cd claude-web-bridge
npm install
```

Then register it with your agent, using the absolute path to `src/server.js`.

Claude Code:

```
claude mcp add web-bridge -s user -- node /path/to/claude-web-bridge/src/server.js
```

Codex CLI:

```
codex mcp add web-bridge -- node /path/to/claude-web-bridge/src/server.js
```

Gemini CLI, in `~/.gemini/settings.json`:

```json
{
  "mcpServers": {
    "web-bridge": {
      "command": "node",
      "args": ["/path/to/claude-web-bridge/src/server.js"],
      "timeout": 300000
    }
  }
}
```

Copying `skill/web-bridge` into `~/.claude/skills/` (or `~/.codex/skills/`) is optional, but worth it. The skill teaches the agent when to reach for the bridge, and how to report journal metrics without mixing up sources: a SCImago quartile is not a JCR quartile.

## First run

The first time a page needs the browser, a Chrome window opens and minimizes itself. To give the agent what's behind your university login, open that window once and sign in to your library or publisher, or ask the agent to call `web_open`. Your cookies stay in the bridge profile.

## Tools

| Tool | What it does |
|---|---|
| `web_read` | Turns a page or DOI into Markdown, with citation metadata. Long pages come in chunks. |
| `paper_info` | Gets a paper's metadata (checked against Crossref), abstract and keywords, even when it's paywalled, plus any legal open copies. |
| `web_download` | Downloads one paper PDF from a DOI, landing page or direct link. If the publisher copy is locked, it falls back to a legal open copy (arXiv, PMC, repositories) and tells you which version you got. |
| `journal_metrics` | Collects free journal metrics: Web of Science index, the impact factor and JCR quartile the publisher prints, and OpenAlex citation stats. |
| `journal_guide` | Finds and reads a journal's Guide for Authors. Works for Elsevier, Springer, MDPI, Taylor & Francis, Wiley, SAGE, Frontiers, OUP and DergiPark, and for others through the link on the journal page. |
| `web_open` | Brings the window to the front so you can log in or pass a check. |
| `web_snapshot`, `web_click`, `web_type` | Let the agent use interactive sites such as JCR or Scopus. |
| `web_status` | Shows whether Chrome is running, where files go, and recent download counts. |

## Settings

All optional, as environment variables:

| Variable | Default |
|---|---|
| `WEB_BRIDGE_DOWNLOAD_DIR` | `~/Downloads/web-bridge` |
| `WEB_BRIDGE_CHROME` | auto-detected Chrome or Edge |
| `WEB_BRIDGE_CDP_PORT` | `9333` |
| `WEB_BRIDGE_HEADLESS` | off. Set `1` to hide the window; you then can't log in or click checks. |
| `WEB_BRIDGE_HOST_CAP`, `WEB_BRIDGE_TOTAL_CAP` | 20 per site and 60 in total, downloads per hour |

Pass them with `-e` in `claude mcp add`, `--env` in `codex mcp add`, or an `env` block for Gemini.

## Ground rules

This isn't a way around paywalls or anyone's terms. It reaches only what you can reach yourself.

- It blocks pirate libraries (Sci-Hub, LibGen, Anna's Archive, Z-Library), Google Scholar and SSRN in code. Localhost and private network addresses are blocked too.
- It downloads one paper per call, with an hourly cap. Most publisher licences forbid bulk downloading, and breaking that can get a whole university cut off.
- The browser's debugging port listens only on 127.0.0.1. Still, any program on your machine can use it while the bridge Chrome is open. If that matters to you, close the window when you're done.

## Türkçe kısaca

Claude Code, Codex ve Gemini gibi ajanların açamadığı sayfaları bilgisayarınızdaki ayrı bir Chrome penceresinden açan küçük bir MCP sunucusu. Bunlar 403 dönen siteler, Cloudflare doğrulamaları, JavaScript ile dolan sayfalar ve kurum aboneliği gereken makaleler olabilir.

Abonelik gerekmez. Kapalı makalelerin özeti ve künyesi yine gelir; yasal açık kopyası varsa (arXiv, PMC, kurumsal depo) o indirilir. Dergilerin yazar kılavuzlarını (Guide for Authors, DergiPark yazım kuralları) ve yayıncının yazdığı etki faktörünü de bulup okur.

Kurulum yukarıdaki gibi: `npm install`, sonra `claude mcp add ...` ile ajanınıza ekleyin. Kurum girişinizi köprü penceresinde bir kez kendiniz yaparsınız. Ajan şifre yazmaz; doğrulama kutucuklarını siz tıklarsınız. Korsan siteler, Google Scholar ve SSRN kapalıdır. Makaleler tek tek indirilir.

## License

MIT

TDQS

A4/5.0

Scored across 10 tools

Disambiguation4/5

The set splits cleanly into browser primitives (web_open, web_snapshot, web_click, web_type, web_read, web_download, web_status) and academic lookups (paper_info, journal_guide, journal_metrics), and the descriptions state the boundaries explicitly (snapshot = interactive refs, read = Markdown, open = user login). The only soft edges are paper_info vs web_read and journal_guide vs web_read, since both can fetch an article/journal page, but the metadata-vs-full-text distinction is spelled out. An agent can select correctly with the descriptions given.

Naming Consistency4/5

Everything is snake_case with a predictable verb_noun or noun_noun shape, so it reads uniformly. The only deviation is a two-tier scheme: generic primitives are prefixed web_* while the three academic helpers are unprefixed, which slightly breaks the pattern even though it signals domain grouping.

Tool Count5/5

Ten tools is well within the healthy range, and none look redundant: five primitives cover the interaction loop, three cover the academic research workflow, and two cover session/file setup. Each tool has an evident job that no sibling performs.

Completeness4/5

The surface covers a full browse-and-retrieve lifecycle: open/login, snapshot, click, type, read, download, status, plus paper metadata, journal guidelines and metrics. Minor gaps remain around tab/navigation management (back, close, multi-tab), scrolling, and selecting dropdown options other than via clicking, which agents can mostly work around but are real dead ends on complex forms.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues