v149 · Origin Trial · WebMCP

Tool Consent Panel

How might a browser surface the MCP tools a page has registered? This demo simulates the consent UI: discover registered tools, inspect their schemas, and grant or revoke permission per tool — just as a real browser agent controller might.

Origin trial simulation. navigator.modelContext is behind an origin trial in Chrome 149. This demo uses a mock registry to simulate how the consent model works.
0registered tools
0granted
0revoked

event log

Waiting for tool registration…

how the consent model works

// 1. Page registers tools (happens at page-load or on demand)
await navigator.modelContext.registerTool({
  name: 'search_products',
  description: 'Search the product catalogue',
  inputSchema: { query: 'string', maxResults: 'number' }
});

// 2. Browser surfaces consent UI (this demo simulates that UI)
// Users see tool name + description + schema → grant or deny

// 3. Agent can only invoke granted tools
const tools = await navigator.modelContext.listGrantedTools();
// → ['search_products'] if granted, [] if denied

see also

implementation reference

Need the exact API surface, compatibility boundaries, errors, lifecycle, and source links? Read the matching gendn reference ↗