Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.

You can prototype a browser-based sales research assistant by exposing a small, read-only WebMCP tool from your page, having a server query an official public dataset, and returning a brief that names its source and data year. The example below uses U.S. Census County Business Patterns (CBP) for industry-and-place context. It helps a user decide what to research next; it does not identify named prospects or prove that a business is ready to buy.

WebMCP is a proposed, evolving browser capability, not a way to make any website automatically callable by an AI agent. Chrome documents a local-development flag and an origin trial beginning with Chrome 149; check its current WebMCP setup guidance before trying the demo.

What you are building

The user asks a question such as, “Compare the number of establishments in this industry across two counties.” A WebMCP-aware agent can call a page-provided tool with structured inputs. Your server validates those inputs, queries CBP, and returns a compact result with geography, industry, dataset and reference year. The agent can then explain the comparison in a research brief.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The division of responsibility matters: the page describes an allowed action, the browser exposes that action in the page’s context, and the agent supplies arguments. WebMCP does not turn a page tool into a universal server API, and the W3C draft does not require all browsers to expose tools through one particular agent protocol. See the W3C WebMCP draft and Chrome’s overview of WebMCP and AI agents.

Choose public data that fits the question

Source Best fit What it describes Geography and access
County Business Patterns (CBP) Industry and place context Annual aggregate statistics for businesses with paid employees, including establishment counts, employment and payroll. Coverage includes U.S., state, county, metropolitan, ZIP code and congressional-district geographies, with limits that vary by measure and data year. API requests require a Census API key. See the CBP API documentation.
USAspending Federal contract and grant research Federal spending and award information, including award and transaction searches, recipients, categories and geography. Its API documentation currently says authorization is not required; recheck the endpoint documentation before deployment. Start at USAspending API.

These sources answer different questions. CBP is the fit for aggregate industry sizing by place; USAspending is the fit for investigating public federal awards and recipients. Neither establishes an individual organization’s purchase intent or ability to buy. Make the dataset and reference year visible in every result. The Census API user guide describes its datasets and query context.

Build the ordinary interface and server first

Keep the page useful without an agent: provide a form, labels, validation messages and a visible result area. Use a server endpoint for data access so the Census API key is not shipped to the browser. The following is an implementation pattern; confirm the current WebMCP method and CBP vintage-specific query fields against the live documentation before running it. CBP’s available years and geography or measure limits vary.

Server: validate inputs and query CBP

Example using Node.js and Express. Set CENSUS_API_KEY in the server environment. Select and verify the CBP vintage and industry field supported by that vintage in the Census documentation; the URL builder below makes those choices explicit rather than assuming a field is universal. The route deliberately accepts only county comparisons and a fixed set of query field names configured for your selected vintage.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

npm install express

server.mjs:

import express from 'express';
const app = express();
app.use(express.json());

// Configure these for a CBP data year and field names verified in
// the Census CBP documentation before deployment.
const YEAR = process.env.CBP_YEAR;
const INDUSTRY_FIELD = process.env.CBP_INDUSTRY_FIELD;
const API_KEY = process.env.CENSUS_API_KEY;
const ALLOWED_INDUSTRIES = new Set((process.env.CBP_INDUSTRIES || '').split(',').filter(Boolean));

app.post('/api/market', async (req, res) => {
const { industry, counties } = req.body || {};
if (!YEAR || !INDUSTRY_FIELD || !API_KEY) {
return res.status(500).json({ error: 'Server CBP configuration is incomplete.' });
}
if (!ALLOWED_INDUSTRIES.has(String(industry)) || !Array.isArray(counties) ||
counties.length < 1 || counties.length > 2) {
return res.status(400).json({ error: 'Choose a configured industry and one or two counties.' });
}
const parsed = counties.map(c => ({ state: String(c.state), county: String(c.county) }));
if (parsed.some(c => !/^d{2}$/.test(c.state) || !/^d{3}$/.test(c.county))) {
return res.status(400).json({ error: 'Use two-digit state and three-digit county FIPS codes.' });
}
try {
const results = await Promise.all(parsed.map(async c => {
const url = new URL(`https://api.census.gov/data/${YEAR}/cbp`);
url.searchParams.set('get', 'NAME,ESTAB');
url.searchParams.set('for', `county:${c.county}`);
url.searchParams.set('in', `state:${c.state}`);
url.searchParams.set(INDUSTRY_FIELD, industry);
url.searchParams.set('key', API_KEY);
const response = await fetch(url);
if (!response.ok) throw new Error(`Census returned HTTP ${response.status}`);
const rows = await response.json();
if (!Array.isArray(rows) || rows.length < 2) throw new Error('No CBP row for a selected area.');
const [headers, values] = rows;
const row = Object.fromEntries(headers.map((key, i) => [key, values[i]]));
return { area: row.NAME, establishments: row.ESTAB };
}));
res.json({ dataset: 'U.S. Census County Business Patterns', year: YEAR,
industry, measure: 'establishments', results });
} catch (error) {
res.status(502).json({ error: 'Could not retrieve CBP results.', detail: error.message });
}
});

app.listen(3000, () => console.log('Listening on http://localhost:3000'));

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The route’s FIPS checks are input-shape checks, not proof that a code exists in a particular vintage. Keep the industry allowlist aligned with that vintage’s documented fields and valid values, impose request timeouts and rate limits for a deployed service, and avoid returning fields the user did not request. For a USAspending version, replace the data-access layer with an appropriate documented award or transaction endpoint; do not treat those award records as CBP-style establishment counts.

Page: expose a narrow read-only tool

Render the same action as a normal form for people who are not using an agent. The WebMCP registration below follows the shape of Chrome’s documented example—name, title, description, input schema and execution function—but the browser API is evolving. Adapt it to the current Chrome documentation and test in its supported environment.

<form id="market-form">
<label>Industry code <input id="industry" name="industry" required></label>
<label>First state FIPS <input id="state1" required></label>
<label>First county FIPS <input id="county1" required></label>
<label>Second state FIPS <input id="state2"></label>
<label>Second county FIPS <input id="county2"></label>
<button type="submit">Compare market context</button>
</form>
<pre id="result" aria-live="polite"></pre>
<script type="module">
const form = document.querySelector('#market-form');
async function searchMarket({ industry, counties }) {
const response = await fetch('/api/market', {
method: 'POST', headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ industry, counties })
});
const data = await response.json();
if (!response.ok) throw new Error(data.error || 'Market lookup failed');
document.querySelector('#result').textContent = JSON.stringify(data, null, 2);
return data;
}
form.addEventListener('submit', async event => {
event.preventDefault();
const counties = [{ state: form.state1.value, county: form.county1.value }];
if (form.state2.value || form.county2.value) counties.push({
state: form.state2.value, county: form.county2.value
});
try { await searchMarket({ industry: form.industry.value, counties }); }
catch (error) { document.querySelector('#result').textContent = error.message; }
});

// Illustrative WebMCP registration shape: check current browser API support.
if (navigator.modelContext?.registerTool) {
navigator.modelContext.registerTool({
name: 'compare_market',
title: 'Compare county industry context',
description: 'Return Census CBP establishment counts for one or two configured counties. Results are aggregate context, not named leads.',
inputSchema: {
type: 'object', additionalProperties: false,
properties: {
industry: { type: 'string', description: 'Configured industry code' },
counties: { type: 'array', minItems: 1, maxItems: 2, items: {
type: 'object', additionalProperties: false,
properties: { state: { type: 'string' }, county: { type: 'string' } },
required: ['state', 'county']
}}
}, required: ['industry', 'counties']
},
execute: searchMarket
});
}
</script>

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For a simple existing form, a declarative WebMCP annotation may be a better fit; use imperative registration when the action needs custom behavior. Either way, expose a small tool aligned with a user journey, not a generic “do anything” interface. Chrome recommends checking how agents select and invoke tools and using its tool inspector to list tools, call them, and examine schema parsing and structured output.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Test tool behavior, boundaries and output

  1. Start the server with the verified CBP year, industry field, allowlist and Census key configured; verify the route using a valid county pair and a deliberately invalid input.
  2. Use the browser setup described in the Chrome WebMCP documentation, then inspect the available tool list. Browser and agent support is time-sensitive.
  3. Call the tool with missing fields, invalid FIPS shapes, an unconfigured industry and one versus two counties. Confirm that errors are understandable and that no server secret is returned.
  4. Check the output names the dataset, year, measure, industry and geographic areas. The counts must remain attached to those labels when the agent summarizes them.
  5. Try realistic prompts and inspect whether the agent selects the intended tool, passes valid structured arguments and preserves the data’s aggregate nature in its answer.

Do not attach automatic outreach, CRM edits or meeting bookings to the research tool. Add any consequential action as a distinct step with a clear user confirmation. This is an application safeguard, not a guarantee supplied by WebMCP.

Security and accuracy safeguards

Chrome’s WebMCP security guidance calls out malicious instructions in tool definitions and contaminated tool outputs containing third-party instructions. Treat both tool descriptions and returned records as untrusted data: the agent may summarize public records, but must not obey instructions embedded in them that override the user or application rules.

  • Keep the Census key on the server, validate every tool input there, bound the number of places and returned rows, and set request timeouts.
  • Use read-only tools first. Do not return unnecessary personal data, and require explicit confirmation for external side effects.
  • Respect origin and frame boundaries: tools are associated with document origins, and Chrome describes a tools permissions policy. A page’s registered tool is not a site-wide or cross-origin API.
  • Show data vintage and geography in the result and avoid combining unlike measures or years without explaining the difference.
  • Describe the output as research context. Aggregate business statistics cannot tell you which specific company is a lead or whether it intends to purchase.

Performance, reliability and cost

This prototype adds a browser-mediated tool call and a server-side public-data request, so handle network and dataset errors as ordinary application failures. Return a bounded, concise result instead of asking the agent to process a large raw response. Cache only when you can preserve the data-year context and make the cache duration appropriate to your update needs; never let a cached result lose its source labels. The Census key requirement and changing data vintages are operational dependencies, not features WebMCP resolves.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The documented sources establish no WebMCP adoption rate, sales lift, conversion improvement or time-saved benchmark. Do not promise those outcomes. Measure your own tool-selection accuracy, invalid-input rate, response latency and research usefulness before broadening the workflow.

Troubleshooting

  • No tool appears: the browser, agent or origin may not support the current WebMCP setup, registration may have failed, or the page may not be in the documented local/eligible trial configuration. Recheck Chrome’s current setup steps and inspect the tool list.
  • The tool appears but cannot be called: compare the agent arguments with the declared schema, check required property names and types, and inspect tool execution errors. Keep the schema and server validator consistent.
  • Census rejects the query: check the API key, selected CBP year, industry field/value and geographic predicates against the vintage-specific CBP documentation. Geography and measure availability can vary.
  • A county returns no row: verify the state and county codes and confirm the selected industry and geography combination is published for that year. Return a clear no-result response rather than implying a zero count.
  • Results look misleading: verify the year, measure and geography labels survived the server response and agent summary. Establishments are not named prospects, and aggregate counts do not show intent to buy.
  • Unexpected instructions appear in a summary: treat text from tool definitions or data as untrusted; constrain the prompt and output handling, and ensure data cannot override application instructions.

Or skip the browser setup

ScreenshotNeo is a screenshot API, not a WebMCP implementation or a replacement for the Census data API. It can capture a public documentation or reference page for visual review; it does not query CBP or register agent tools. One request can save a screenshot, for example:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://www.census.gov/data/developers/data-sets/cbp-zbp/cbp-api.html -o shot.webp (ScreenshotNeo API documentation).

ScreenshotNeo accepts cookie or consent banners and removes more than 60 known consent platforms, newsletter popups and chat widgets before capture; those steps can be turned off. Bot checks, blank pages, timeouts, failed loads and cache hits are not billed, with verdict and billing information in response headers. It also offers an MCP server for AI agents, 1,000 screenshots a month free with no card, and paid plans starting at $5 for 3,000. Learn about ScreenshotNeo, then sign up for the free plan.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.