Use Agent Analytics with WebMCP
此内容尚不支持你的语言。
WebMCP lets a compatible AI agent call structured tools exposed by the web page you are viewing. Agent Analytics supports WebMCP today through a public, read-only evidence explorer: the agent receives structured analytics, and the same result appears on the page for you to inspect.
Try it
Section titled “Try it”- Open the Agent Analytics WebMCP Evidence Explorer in the ChatGPT or Codex built-in browser with WebMCP enabled.
- Ask the agent a product question, rather than naming a tool.
- Watch the agent select a read-only site tool and update the visible evidence canvas.
Start with this prompt:
Find the biggest signup leak and show me the evidence on the page.Then try:
Which entry page produces the strongest signup path?Compare the signup CTA experiment variants. Is there enough evidence to call a winner?Give me the 30-day growth baseline, then tell me which analysis I should run next and why.In a regular browser, the explorer still works through its visible controls. WebMCP adds the structured agent interface; it does not replace the human interface.
Available site tools
Section titled “Available site tools”| Tool | What the agent can inspect |
|---|---|
show_growth_overview | Unique users, intentional product events, signup rate, and daily activity over 7–90 days |
trace_signup_funnel | Ordered event conversion and the largest step-to-step drop-off |
compare_conversion_paths | Entry-page journeys to a selected goal event |
break_down_conversions | Conversion events grouped by page, referrer, or campaign source |
inspect_signup_experiment | Variant exposures, conversions, observed rates, and experiment status |
All five tools are read-only. They can inspect only the public demo evidence allowlisted by the explorer; they cannot create projects, change experiments, manage billing, read keys, or mutate an account.
Why the result also changes the page
Section titled “Why the result also changes the page”WebMCP is most useful here as a shared evidence surface. The agent needs typed data so it does not have to infer numbers from pixels. You need a visible funnel, path comparison, breakdown, or experiment result so you can verify the conclusion.
The explorer therefore sends manual button clicks and agent tool calls through the same execution path. There is no separate hidden answer for the agent.
How it is implemented
Section titled “How it is implemented”The page feature-detects document.modelContext.registerTool and registers five top-level imperative tools. Each tool has a closed JSON Schema, a focused description, and readOnlyHint: true.
A same-origin Cloudflare Worker validates inputs again, creates a short-lived public-demo session, and calls only allowlisted Agent Analytics read endpoints. The bearer credential stays on the server and is never sent to browser JavaScript. The page uses no cookies, local storage, or third-party browser scripts.
The complete implementation and tests are available in the public Agent Analytics WebMCP repository.
Use your own Agent Analytics project
Section titled “Use your own Agent Analytics project”WebMCP access to signed-in customer projects is not available in this preview. To ask the same questions about your own data today:
- Connect Agent Analytics to your agent.
- Instrument intentional product events tied to your goals.
- Ask the agent to inspect your overview, funnels, paths, retention, or experiments through the existing Agent Analytics access method.
The WebMCP preview demonstrates the browser-native interaction model without weakening the existing account and project authorization boundaries.