{
 "schema_version": 1,
 "generated": "2026-11-09",
 "id": "lightpanda-io-browser--give-an-ai-agent-a-browser-with-lightpanda-mcp",
 "repo": "lightpanda-io/browser",
 "repo_url": "https://github.com/lightpanda-io/browser",
 "repo_slug": "lightpanda-io-browser",
 "title": "Give an AI agent a Browser through MCP or agent mode",
 "page_title": "How to give an AI agent a Browser through MCP or agent mode with Browser",
 "summary": "Add Lightpanda as an MCP server for your coding agent, or use lightpanda agent to describe a task in plain English and save it as a replayable script.",
 "who": "Developers building agents that need to read and click through websites.",
 "problem": "Agent browsing with full Chrome is slow and costs tokens on every replay.",
 "outcome": "An agent tool that browses pages, plus a token free PandaScript you can rerun.",
 "steps": [
  "Add an mcpServers entry named lightpanda with command set to the lightpanda path and args [\"mcp\"]",
  "Or try agent mode with `./lightpanda agent --task \"top story on news.ycombinator.com?\"`, which auto detects an API key from the environment",
  "Run `/save` in a session to export a PandaScript, then replay it with `./lightpanda run session.js`",
  "For several agents, start `lightpanda mcp --port 9223` so each connection gets its own browsing session"
 ],
 "agent_prompt": "Using lightpanda-io/browser, add the lightpanda MCP server to my agent config, then use it to open <a page> and extract its title and links.",
 "agents": [
  "claude-code",
  "codex",
  "cursor",
  "gemini-cli"
 ],
 "difficulty": "Intermediate",
 "time": "45 minutes",
 "basis": "readme",
 "caveat": "Use `--no-llm` for a plain REPL without any model.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "",
 "requirements": [
  "Linux or macOS (x86_64 or aarch64); Windows only through WSL2; Linux binaries need glibc",
  "Install with `brew install lightpanda-io/browser/lightpanda`, a nightly binary, Nix or `docker run -d --name lightpanda -p 127.0.0.1:9222:9222 lightpanda/browser:latest`",
  "puppeteer-core or Playwright if you connect your own scripts over CDP"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [
  {
   "tag": "credentials",
   "notice": "Agent mode reads model API keys from your environment; scope them and watch usage."
  },
  {
   "tag": "cost",
   "notice": "LLM calls in agent mode cost tokens; replaying saved scripts does not."
  }
 ],
 "best": false,
 "score": 0.8,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/lightpanda-io-browser/give-an-ai-agent-a-browser-with-lightpanda-mcp/",
 "md": "https://dedupedai.com/use-cases/lightpanda-io-browser/give-an-ai-agent-a-browser-with-lightpanda-mcp/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/lightpanda-io-browser--give-an-ai-agent-a-browser-with-lightpanda-mcp.json",
 "api_version": "v1"
}
