WebLLMRelay
WebLLMRelay — 网页大模型分发 MCP
给智能体接入网页大模型:通过统一 MCP 接口,复用网页登录态,调用各平台大模型的对话与生图能力——不需要 API key、不产生 API 费用。如果说网页搜索是让智能体"查资料",这里则是让智能体"问专家"——把任务分发给擅长它的网页大模型。
快速开始
环境要求:**Python 3.10 + **
安装依赖
python -m pip install -r requirements.txt下载内置浏览器(必须下载到项目
browsers/目录,应用只认这个位置)set PLAYWRIGHT_BROWSERS_PATH=D:\path\to\WebLLMRelay\browsers python -m playwright install chromium⚠️ 不设置
PLAYWRIGHT_BROWSERS_PATH会把浏览器下载到系统缓存,启动时报「Executable doesn't exist」。国内网络可加镜像:set PLAYWRIGHT_DOWNLOAD_HOST=https://npmmirror.com/mirrors/playwright/启动服务:
start_webllmrelay.bat(已运行会自动打开页面;未运行会启动服务并打开页面),或python -m webllmrelay.webui_server --port 8787登录平台:在 WebUI 中对目标平台点「网页登陆」→ 内置浏览器窗口登录 → 关闭窗口,登录态自动检测并保存
验证平台:点「测试对话」验证文本问答,点「测试生图」验证生图(成功后自动标记该平台为已验证)
接入 MCP 客户端:客户端连
http://127.0.0.1:8787/mcp(HTTP),或填 command 启动(stdio)。具体配置见 WebUI 页面的「MCP 客户端接入」,点「复制」即用。
Related MCP server: mcp-browser-use
MCP 工具
接入后三个工具自动暴露给智能体。一般无需手动调用——直接对助手说人话,它会自动选择工具;想强制用工具,消息前加 >;想禁用工具,加 !。
用户:「用豆包查一下:Python 3.13 的新特性有哪些?」 助手:调用
ask_web_llm(platform="doubao", prompt="Python 3.13 的新特性有哪些?")
ask_web_llm — 文本问答 / 任务分发
参数 | 说明 |
|
|
| 问题或任务(提问、写作、总结、翻译、写代码等) |
| 可选;留空 = 新会话,传入 = 续聊(保留上下文) |
返回 {"answer", "conversation_id"}。
ask_web_llm_image — 生图
参数 | 说明 |
|
|
| 图片描述提示词 |
| 可选;传了可基于原图续调 |
返回 {"images": [{"url", "path"}], "conversation_id"}:
url:本机服务提供的图片地址,可直接下载 / 展示 / 打开;path:图片在本地磁盘的绝对路径,智能体可本地直接读取。
图片由 MCP 在浏览器会话内自动下载到
generated_images/(原图防盗链已在内部处理),缓存超过 100 张自动清理最旧的。
list_web_llms — 列出平台
无参数,返回 [{"platform", "name", "supports_image", "verified"}],platform 即提问工具的取值。
架构
webllmrelay/
├── config.py # ProviderSpec(每平台知识)+ 平台/登录态持久化
├── browser.py # BrowserManager:会话式浏览器生命周期、死浏览器自动恢复
├── lock.py # 持久化浏览器 profile 互斥锁
├── adapters.py # PlatformAdapter 接口 + CssAdapter 默认实现 + 注册表
├── providers.py # ask_web_llm / ask_web_llm_image / list_web_llms
├── mcp.py # MCP server 定义与工具注册
├── activity_log.py # 活动日志(登录 / 测试 / 调用)
├── login_worker.py # 登录窗口子进程
├── probe.py # 平台适配诊断 CLI(接入新平台用)
├── webui.py # FastAPI:平台管理 / 测试 / 日志
├── webui_server.py # WebUI 启动入口
└── webui_static/ # WebUI 前端页面需求边界
单模型调用:智能体自己决定问哪个模型,不做"多模型对比"。
回答格式:网页返回啥就是啥,不做格式化处理。
登录:由用户手动完成(WebUI「网页登陆」打开浏览器窗口);登录状态基于每平台登录指示元素真实检测,在登录窗口关闭后自动检测、卡片「检测」按钮手动检测。
浏览器:Release版本默认内置 Chromium(随应用打包,免系统依赖),WebUI 设置卡可切换为系统 Edge,两种浏览器的登录数据相互独立。默认可见运行,可开启「智能体调用时隐藏浏览器」静默。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityCmaintenanceBrowser MCP server that connects to your existing browser, preserving sessions, passwords, and extensions, enabling AI agents to interact with web pages without bot detection.3171MIT
- AlicenseNot gradedqualityDmaintenanceEnables browser automation through MCP clients like Claude or Cursor, using the client's existing LLM without requiring an additional API key.Apache 2.0
- AlicenseNot gradedqualityBmaintenanceMCP server that lets AI agents use your real browser as an API, accessing any website with your login state, no keys or scrapers needed.1MIT
- FlicenseNot gradedqualityCmaintenanceEnables free access to multiple AI models (ChatGPT, Claude, Gemini, etc.) via MCP tools and OpenAI-compatible endpoints by leveraging browser session cookies, eliminating the need for API keys.
Related MCP Connectors
OCR, transcription, file extraction, and image generation for AI agents via MCP.
Connect any AI agent to 11+ social platforms: schedule, publish & track posts via hosted MCP.
Phone, SMS & email for AI agents — one remote MCP endpoint, OAuth login, zero install.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/mbaozi/WebLLMRelay'
If you have feedback or need assistance with the MCP directory API, please join our Discord server