WebMCP Integration

How AI agents can interact with PhD Demographics data

What is WebMCP?

WebMCP (Web Model Context Protocol) is a browser API that lets websites expose structured tools to AI agents. Instead of agents needing to scrape HTML or interpret screenshots, WebMCP provides a clean JSON interface for querying data directly.

This site registers WebMCP tools on the STEM and Non-STEM name list pages. When an AI agent with WebMCP support visits these pages, it can programmatically list universities, fetch records, and navigate the interface.

Available Tools

The following tools are registered via navigator.modelContext.registerTool() on the name list pages:

ToolDescriptionInput
list_universities Get all universities with NRA% and record counts None
get_university_data Fetch full thesis records for a university university_key (e.g., "purdue")
get_data_catalog Get the versioned data catalog with schemas None
get_taxonomy Get department name taxonomy (44 categories) None
navigate_to_university Navigate page to show a university university_key, optional department

Example Usage

An AI agent with WebMCP access would interact like this:

1. List available universities

// Agent calls:
const result = await navigator.modelContext.callTool('list_universities', {});
// Returns: [{key: "purdue", name: "Purdue", nra: 60.3, records: 8058}, ...]

2. Fetch a university's data

// Agent calls:
const data = await navigator.modelContext.callTool('get_university_data', {
  university_key: 'mit'
});
// Returns full JSON with records, enrollment, funding, completions trend

3. Navigate the page

// Agent calls:
await navigator.modelContext.callTool('navigate_to_university', {
  university_key: 'stanford',
  department: 'Computer Science'
});
// Page navigates to Stanford, Computer Science department expanded

Non-WebMCP Access

For agents and tools that don't support WebMCP, the same data is available via standard HTTP:

EndpointDescription
/llms.txtAI agent discovery guide (plain text)
/catalog.jsonMachine-readable data catalog with schemas
/data/stem/{key}.jsonPer-university STEM records
/data/nonstem/{key}.jsonPer-university non-STEM records
/data/taxonomy.jsonDepartment taxonomy
/sitemap.xmlStandard sitemap

Record Format

Each university JSON contains a records array. Each record is a compact array:

[department, year, author_name, origin_class, confidence, title, url, degree_type]
 0: string   1: int  2: string    3: string    4: string  5: string 6: string 7: string

Example:
["Computer Science", 2024, "Smith, John", "other", "", "Machine Learning for...", "https://...", "phd"]

Versioning

All data is versioned. The current version is 1.0.0 (last updated April 2026). Version info is available in:

Browser Compatibility

WebMCP is currently supported in Chrome (behind flags) and is a W3C draft specification. The tools gracefully degrade — if navigator.modelContext is not available, the registration code is silently skipped. All data remains accessible via the standard HTTP endpoints above.