Making this portfolio AI-agent queryable via the W3C WebMCP standard. 8 structured tools registered on navigator.modelContext — no DOM scraping needed.
Why WebMCP
// DOM scraping — brittle, slow
agent.click("#search-btn");
agent.waitFor(".results");
agent.scrape(".result-card");
// ❌ Breaks on redesign
// ❌ Requires screenshots
// ❌ Layout-dependent// Structured tools — fast, stable
const results = await agent.call(
"search_projects",
{ tech: "Python" }
);
// ✅ Layout-agnostic
// ✅ JSON in, JSON out
// ✅ 89% fewer tokensAPI
Click any tool to see its call signature and example response.
Architecture
Next.js loads MDX projects, resume, lab data via fs
WebMCPLoader serializes SiteData to client
WebMCPProvider detects navigator.modelContext
8 tools + 1 context registered with JSON Schema
AI agents call tools, get structured JSON responses
Try It
// 1. Chrome 146 Canary + enable 'Experimental Web Platform Features' flag // 2. Visit jayhemnani.me // 3. Open DevTools Console and run: navigator.modelContext // → ModelContext { registerTool, unregisterTool, ... } // Tools are registered automatically on page load. // AI agents can now query your portfolio as structured data.