docs: MCP

This commit is contained in:
Simon
2026-03-22 03:21:33 +08:00
parent 4f71f065df
commit 3456f45590
9 changed files with 107 additions and 14 deletions

View File

@@ -25,8 +25,8 @@ The GUI Agent Living in Your Webpage. Control web interfaces with natural langua
- **📖 Text-based DOM manipulation** - **📖 Text-based DOM manipulation**
- No screenshots. No multi-modal LLMs or special permissions needed. - No screenshots. No multi-modal LLMs or special permissions needed.
- **🧠 Bring your own LLMs** - **🧠 Bring your own LLMs**
- **🎨 Pretty UI with human-in-the-loop**
- **🐙 Optional [chrome extension](https://alibaba.github.io/page-agent/docs/features/chrome-extension) for multi-page tasks.** - **🐙 Optional [chrome extension](https://alibaba.github.io/page-agent/docs/features/chrome-extension) for multi-page tasks.**
- [MCP Server (Beta)](https://alibaba.github.io/page-agent/docs/features/mcp-server)
## 💡 Use Cases ## 💡 Use Cases

View File

@@ -20,17 +20,16 @@
## ✨ Features ## ✨ Features
- **🎯 轻松集成** - **🎯 轻松集成**
- 无需 `浏览器插件` / `Python` / `无头浏览器` - 无需 `浏览器插件` / `Python` / `无头浏览器`,纯页面内 JavaScript
- 纯页面内 JavaScript一切都在你的网页中完成。
- **📖 基于文本的 DOM 操作** - **📖 基于文本的 DOM 操作**
- 无需截图,无需多模态模型或特殊权限 - 无需截图,无需多模态模型或特殊权限
- **🧠 用你自己的 LLM** - **🧠 自备 LLM**
- **🎨 精美 UI支持人机协同** - 🐙 可选的 [Chrome 扩展](https://alibaba.github.io/page-agent/docs/features/chrome-extension),支持跨页面任务
- **🐙 可选的 [Chrome 扩展](https://alibaba.github.io/page-agent/docs/features/chrome-extension),支持跨页面任务。** - [MCP Server (Beta)](https://alibaba.github.io/page-agent/docs/features/mcp-server)
## 💡 应用场景 ## 💡 应用场景
- **SaaS AI 副驾驶** — 几行代码为你的产品加上 AI 副驾驶,无需重写后端。 - **SaaS AI Copilot** — 几行代码为你的产品加上 AI 副驾驶,无需重写后端。
- **智能表单填写** — 把 20 次点击变成一句话。ERP、CRM、管理后台的最佳拍档。 - **智能表单填写** — 把 20 次点击变成一句话。ERP、CRM、管理后台的最佳拍档。
- **无障碍增强** — 用自然语言让任何网页无障碍。语音指令、屏幕阅读器,零门槛。 - **无障碍增强** — 用自然语言让任何网页无障碍。语音指令、屏幕阅读器,零门槛。
- **跨页面 Agent** — 通过可选的 [Chrome 扩展](https://alibaba.github.io/page-agent/docs/features/chrome-extension),让你自己的 Agent 跨标签页工作。 - **跨页面 Agent** — 通过可选的 [Chrome 扩展](https://alibaba.github.io/page-agent/docs/features/chrome-extension),让你自己的 Agent 跨标签页工作。

View File

@@ -8,8 +8,8 @@ export default function LanguageSwitcher() {
const dropdownRef = useRef<HTMLDivElement>(null) const dropdownRef = useRef<HTMLDivElement>(null)
const languages = [ const languages = [
{ code: 'zh-CN' as const, label: '中文' },
{ code: 'en-US' as const, label: 'English' }, { code: 'en-US' as const, label: 'English' },
{ code: 'zh-CN' as const, label: '中文' },
] ]
const currentLanguage = languages.find((lang) => lang.code === language) || languages[0] const currentLanguage = languages.find((lang) => lang.code === language) || languages[0]

View File

@@ -45,6 +45,7 @@ export default function DocsLayout({ children }: DocsLayoutProps) {
{ title: isZh ? '知识注入' : 'Instructions', path: '/features/custom-instructions' }, { title: isZh ? '知识注入' : 'Instructions', path: '/features/custom-instructions' },
{ title: isZh ? '数据脱敏' : 'Data Masking', path: '/features/data-masking' }, { title: isZh ? '数据脱敏' : 'Data Masking', path: '/features/data-masking' },
{ title: isZh ? 'Chrome 扩展' : 'Chrome Extension', path: '/features/chrome-extension' }, { title: isZh ? 'Chrome 扩展' : 'Chrome Extension', path: '/features/chrome-extension' },
{ title: 'MCP Server (Beta)', path: '/features/mcp-server' },
{ {
title: isZh ? '接入第三方 Agent' : 'Third-party Agent', title: isZh ? '接入第三方 Agent' : 'Third-party Agent',
path: '/features/third-party-agent', path: '/features/third-party-agent',

View File

@@ -0,0 +1,70 @@
import BetaNotice from '@/components/BetaNotice'
import CodeEditor from '@/components/CodeEditor'
import { Heading } from '@/components/Heading'
export default function McpServerPage() {
return (
<div>
<h1 className="text-4xl font-bold mb-6">MCP Server (Beta)</h1>
<BetaNotice />
<p className="text-xl text-gray-600 dark:text-gray-300 mb-8 leading-relaxed">
Use the MCP server to let your local agent send natural-language browser tasks to Page Agent
Ext.
</p>
<section className="mb-10">
<Heading id="quick-start" className="text-2xl font-bold mb-4">
How to use
</Heading>
<div className="space-y-4">
<div className="p-4 bg-blue-50 dark:bg-blue-950/20 rounded-lg border border-blue-200 dark:border-blue-800">
<p className="text-sm text-blue-900 dark:text-blue-200 leading-7">
1. Install Page Agent Ext in Chrome.
<br />
2. Add the MCP server to your local agent client.
<br />
3. Start the client and approve the Hub connection in the browser when prompted.
<br />
4. Ask your agent to do something in the browser. The client will call execute_task
for you.
</p>
</div>
<CodeEditor
code={`{
"mcpServers": {
"page-agent": {
"command": "npx",
"args": ["-y", "@page-agent/mcp"],
"env": {
"LLM_BASE_URL": "https://api.openai.com/v1",
"LLM_API_KEY": "sk-xxx",
"LLM_MODEL_NAME": "gpt-5.2"
}
}
}
}`}
language="json"
/>
</div>
</section>
<section className="mb-10">
<Heading id="the-hub" className="text-2xl font-bold mb-4">
The Hub
</Heading>
<p className="text-gray-700 dark:text-gray-300 leading-relaxed">
The Hub is the control center for communication between Page Agent Ext and external
callers.
</p>
<p className="text-gray-700 dark:text-gray-300 leading-relaxed">
When the MCP server starts, it opens a local launcher page. The launcher asks the
extension to open the Hub tab, and the Hub receives tasks from your local agent. MCP uses
this path, but the Hub itself is the extension's general external communication entry
point.
</p>
</section>
</div>
)
}

View File

@@ -33,8 +33,8 @@ const MODEL_GROUPS: Record<string, string[]> = {
'claude-haiku-4.5', 'claude-haiku-4.5',
'claude-sonnet-3.5', 'claude-sonnet-3.5',
], ],
xAI: ['grok-4.1-fast', 'grok-4', 'grok-code-fast'],
MiniMax: ['MiniMax-M2.7', 'MiniMax-M2.7-highspeed', 'MiniMax-M2.5', 'MiniMax-M2.5-highspeed'], MiniMax: ['MiniMax-M2.7', 'MiniMax-M2.7-highspeed', 'MiniMax-M2.5', 'MiniMax-M2.5-highspeed'],
xAI: ['grok-4.1-fast', 'grok-4', 'grok-code-fast'],
MoonshotAI: ['kimi-k2.5'], MoonshotAI: ['kimi-k2.5'],
'Z.AI': ['glm-5', 'glm-4.7'], 'Z.AI': ['glm-5', 'glm-4.7'],
} }

View File

@@ -13,6 +13,7 @@ import ChromeExtension from './features/chrome-extension/page'
import Instructions from './features/custom-instructions/page' import Instructions from './features/custom-instructions/page'
import CustomTools from './features/custom-tools/page' import CustomTools from './features/custom-tools/page'
import DataMasking from './features/data-masking/page' import DataMasking from './features/data-masking/page'
import McpServerPage from './features/mcp-server/page'
import Models from './features/models/page' import Models from './features/models/page'
import ThirdPartyAgent from './features/third-party-agent/page' import ThirdPartyAgent from './features/third-party-agent/page'
import Limitations from './introduction/limitations/page' import Limitations from './introduction/limitations/page'
@@ -80,6 +81,11 @@ export default function DocsRouter() {
<ChromeExtension /> <ChromeExtension />
</DocsPage> </DocsPage>
</Route> </Route>
<Route path="/features/mcp-server">
<DocsPage>
<McpServerPage />
</DocsPage>
</Route>
<Route path="/features/third-party-agent"> <Route path="/features/third-party-agent">
<DocsPage> <DocsPage>
<ThirdPartyAgent /> <ThirdPartyAgent />

View File

@@ -58,6 +58,22 @@ export default function OneMoreThingSection() {
</Link> </Link>
</div> </div>
<div className="mb-10 rounded-2xl border border-blue-200/70 dark:border-blue-800/70 bg-linear-to-r from-blue-50 to-white dark:from-blue-950/30 dark:to-gray-900 px-5 py-4 max-w-3xl mx-auto text-left sm:text-center">
<p className="text-sm text-gray-700 dark:text-gray-300 leading-7">
{isZh
? '从 Claude Desktop、Copilot 或其他本地 Agent 直接发起浏览器任务?'
: 'Using Claude Desktop, Copilot, or another local agent? Connect it to the extension with the MCP server.'}
</p>
<p>
<Link
href="/docs/features/mcp-server"
className="font-medium text-blue-700 dark:text-blue-300 underline underline-offset-4"
>
{isZh ? '查看 MCP 文档' : 'Read the MCP docs'}
</Link>
</p>
</div>
<div className="grid sm:grid-cols-3 gap-5 text-left max-w-3xl mx-auto"> <div className="grid sm:grid-cols-3 gap-5 text-left max-w-3xl mx-auto">
{[ {[
{ {
@@ -67,16 +83,16 @@ export default function OneMoreThingSection() {
: 'Run tasks across multiple pages and tabs without being limited to a single page context', : 'Run tasks across multiple pages and tabs without being limited to a single page context',
}, },
{ {
title: isZh ? '页面发起控制' : 'Control from Your Page', title: isZh ? '页面发起控制' : 'Control from a WebPage',
desc: isZh desc: isZh
? '在页面 JS 中发起任务,驱动整个浏览器完成跨标签操作' ? '在页面 JS 中发起任务,驱动整个浏览器完成跨标签操作'
: 'Trigger tasks from page JS to drive the entire browser across tabs', : 'Trigger tasks from in-page JS to drive the entire browser across tabs',
}, },
{ {
title: isZh ? '外部发起任务' : 'External Triggers', title: isZh ? '外部发起任务' : 'External Caller',
desc: isZh desc: isZh
? '页面 JS、本地 Agent 或云端 Agent 均可通过扩展发起任务' ? '页面 JS、本地 Agent 或云端 Agent 均可通过扩展发起任务'
: 'Page JS, local agents, or cloud agents can trigger tasks through the extension', : 'Local agents and cloud agents can control user browser through the extension',
}, },
].map((item) => ( ].map((item) => (
<MagicCard <MagicCard

View File

@@ -27,6 +27,7 @@ const SPA_ROUTES = [
'docs/features/custom-instructions', 'docs/features/custom-instructions',
'docs/features/models', 'docs/features/models',
'docs/features/chrome-extension', 'docs/features/chrome-extension',
'docs/features/mcp-server',
'docs/features/third-party-agent', 'docs/features/third-party-agent',
'docs/advanced/page-agent', 'docs/advanced/page-agent',
'docs/advanced/page-agent-core', 'docs/advanced/page-agent-core',