Skip to main content
Glama

foreign-llm-mcp

A Claude Code plugin (MCP server) that hands simple, one-shot tasks to free web LLMs — Gemini and ChatGPT — by driving their websites in a real Chrome window. Use it to save Claude tokens on things like summarizing, translating, small code snippets, a second opinion, web lookups, and image generation.

Heads-up. This automates consumer chat UIs, which may violate their terms of service and can break whenever the site changes its markup. Use it for personal use, at low volume, with your own accounts. No warranty.

Tools

Tool

What it does

ask(prompt, provider="gemini", timeout=120)

New chat, send prompt, return the reply text.

generate_image(prompt, provider="gemini", timeout=180)

Generate an image, return the saved file path.

list_providers()

Which providers are logged in.

login(provider)

Open the site so you can sign in; returns when you close that tab.

Providers: gemini, chatgpt. Every call is a fresh one-shot chat (no history carried over), calls are serialized, with a 5 s gap between them.

Related MCP server: free-web-ai-worker

Requirements

  • Claude Code

  • uv (installs the Python dependencies on first run)

  • Google Chrome (Playwright drives the installed Chrome, not a bundled browser)

Install

/plugin marketplace add dinhngocvu96/foreign-llm-mcp
/plugin install foreign-llm@foreign-llm-mcp

Restart Claude Code, then ask Claude to call the login tool for each provider you want (login(provider="gemini")), sign in in the window that opens, and close the tab. Sessions persist in the browser profile.

Where data lives

~/.foreign-llm-mcp/ (override with the FOREIGN_LLM_HOME env var):

  • profile/ — Chrome profile with your logged-in sessions. Keep it private.

  • out/ — generated images.

Errors

Tools fail with a code Claude can act on: NOT_LOGGED_IN, QUOTA, TIMEOUT, NO_RESPONSE, SELECTOR_CHANGED.

Notes per provider

  • Gemini — image generation downloads the full-size file.

  • ChatGPT — ask uses a temporary chat (nothing saved). Image generation is blocked in temporary chats, so generate_image uses a normal chat that stays in your history. Free-plan image quota is small.

Development

Selectors live at the top of each providers/<name>.py; when a site changes, fix them there. To add a provider, create a module exposing URL, ask, generate_image, is_logged_in and register it in PROVIDERS in server.py.

Live smoke test (needs logins, uses real quota): uv run python test_live.py

License

MIT

Available Tools

4 tools
askB

One-shot question to a free web LLM (new chat each call). Good for summarize/translate/ small code/second opinion/web lookup. Returns the reply text.

Inputs: prompt (required), timeout, provider. Returns: result

generate_imageC

Generate an image on the web LLM; returns the saved file path under ./out/.

Inputs: prompt (required), timeout, provider. Returns: result

list_providersB

Providers and whether each is logged in (error code if not).

Inputs: no named parameters.

loginA

Open the provider's site in the browser so the user can sign in. Blocks until the user closes that tab (ask the user to do so when finished), then use list_providers to verify.

Inputs: provider. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.3/5.0

    Scored across 4 tools

    Disambiguation4/5

    The four tools cover clearly separate actions: browser sign-in, one-shot text query, image generation, and provider status listing. Login and list_providers sit in the same auth lifecycle, but the login description explicitly points to list_providers for verification, so the boundary is clear.

    Naming Consistency4/5

    All names are lowercase snake_case with verb or verb_noun form (login, ask, generate_image, list_providers). Minor deviation: 'login' and 'ask' are bare/ambiguous verb-nouns while the other two follow verb_noun, but the set is still predictable and readable.

    Tool Count4/5

    Four tools is on the lean side but fits a narrow purpose: authenticate, delegate a question, delegate an image request, and check provider state. Nothing extraneous, though it sits near the thin end of the 3-15 range.

    Completeness3/5

    Core flows (sign in, ask, generate image, verify status) are covered, but the auth lifecycle has no logout/switch-provider tool, and there is no way to discover providers or models before a query without trial and error. These gaps are workaroundable but notable for the stated purpose.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Lets AI assistants control your real Chrome browser to perform web tasks like reading pages, taking screenshots, clicking, and typing, using your existing logged-in sessions.
      145
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to delegate simple text subtasks such as summarising, translating, classifying, extracting, and reformatting to free web AIs through the user's own Edge/Chrome browser, returning only plain-text answers to save the main model's context and tokens.
      MIT
    • A
      license
      B
      quality
      B
      maintenance
      Enables AI agents to control your installed Google Chrome through MCP or HTTP using compact text snapshots, exact pixel coordinates, and a visible cursor. It provides browser tools for navigation, clicking, typing, scrolling, tabs, forms, waiting, recording, and human handoff.
      35
      97 npm
      3
      MIT