{"id":51334064,"url":"https://github.com/browserless/browserless-langchain","last_synced_at":"2026-07-02T01:04:13.052Z","repository":{"id":356150224,"uuid":"1231249384","full_name":"browserless/browserless-langchain","owner":"browserless","description":"LangChain (Python + JS) examples for the Browserless MCP server","archived":false,"fork":false,"pushed_at":"2026-05-06T19:47:34.000Z","size":29,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-15T19:39:45.127Z","etag":null,"topics":["browser-automation","browserless","langchain","mcp","python","web-scraping"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/browserless.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-06T19:27:06.000Z","updated_at":"2026-05-06T19:47:39.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/browserless/browserless-langchain","commit_stats":null,"previous_names":["browserless/browserless-langchain"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/browserless/browserless-langchain","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/browserless%2Fbrowserless-langchain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/browserless%2Fbrowserless-langchain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/browserless%2Fbrowserless-langchain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/browserless%2Fbrowserless-langchain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/browserless","download_url":"https://codeload.github.com/browserless/browserless-langchain/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/browserless%2Fbrowserless-langchain/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35028653,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-01T02:00:05.325Z","response_time":130,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["browser-automation","browserless","langchain","mcp","python","web-scraping"],"created_at":"2026-07-02T01:04:09.659Z","updated_at":"2026-07-02T01:04:13.048Z","avatar_url":"https://github.com/browserless.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Browserless × LangChain\n\nRunnable Python and JS examples for the [Browserless](https://browserless.io) MCP server. Browserless is a **stateful** MCP server: a multi-turn browser agent works in a real ReAct loop over HTTP, not just batched single-call mode.\n\nThe hosted endpoint at `https://mcp.browserless.io/mcp` exposes 10 tools auto-importable via `langchain-mcp-adapters` — no partner package needed.\n\n| | Stateless tools (8) | Stateful tools (2) |\n|---|---|---|\n| | `smartscraper`, `search`, `map`, `crawl`, `export`, `performance`, `function`, `download` | `agent`, `skill` |\n| Use case | Single-shot scraping, research, data extraction | Multi-turn browser automation, ReAct loops with persistent browser state |\n\n\u003e **Multi-turn agent in Python**: bind tools inside `async with client.session(...)` to keep the same MCP session across calls — see [`python/README.md`](./python/README.md#note-on-python-session-handling). The JS adapter does this automatically.\n\n## Python\n\n```python\nimport os\nfrom langchain_mcp_adapters.client import MultiServerMCPClient\n\nclient = MultiServerMCPClient({\n    \"browserless\": {\n        \"transport\": \"http\",\n        \"url\": \"https://mcp.browserless.io/mcp\",\n        \"headers\": {\"Authorization\": f\"Bearer {os.environ['BROWSERLESS_TOKEN']}\"},\n    }\n})\ntools = await client.get_tools()\nprint([t.name for t in tools])  # 10 tools\n```\n\nSee [`python/`](./python/) for full notebooks: `quickstart.ipynb`, `research_agent.ipynb`, `browser_agent.ipynb`.\n\n## JS / TypeScript\n\n```ts\nimport { MultiServerMCPClient } from \"@langchain/mcp-adapters\";\n\nconst client = new MultiServerMCPClient({\n  mcpServers: {\n    browserless: {\n      transport: \"http\",\n      url: \"https://mcp.browserless.io/mcp\",\n      headers: { Authorization: `Bearer ${process.env.BROWSERLESS_TOKEN}` },\n    },\n  },\n});\nconst tools = await client.getTools();\nconsole.log(tools.map((t) =\u003e t.name)); // 10 tools\n```\n\nSee [`js/`](./js/) for full scripts: `quickstart.ts`, `research_agent.ts`, `browser_agent.ts`.\n\n## Get a token\n\n[account.browserless.io](https://account.browserless.io)\n\n## Links\n\n- Hosted MCP server: [mcp.browserless.io](https://mcp.browserless.io)\n- Python adapter: [`langchain-mcp-adapters`](https://github.com/langchain-ai/langchain-mcp-adapters)\n- JS adapter: [`@langchain/mcp-adapters`](https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-mcp-adapters)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrowserless%2Fbrowserless-langchain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrowserless%2Fbrowserless-langchain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrowserless%2Fbrowserless-langchain/lists"}