Testing checklist
Use this checklist before shipping WebMCP to production.
Browser registration
- [ ] Chrome with
document.modelContext(origin trial 149+, or#enable-webmcp-testing) — tools register - [ ] DevTools → Application → WebMCP — manual tool execution works
- [ ] Safari — no errors, no registration attempted
- [ ] Firefox — no errors, no registration attempted
Integration
- [ ] Vanilla HTML demo works without React/Next in bundle
- [ ]
CONTENTSTACK_WEBMCP_ENABLED=false— complete no-op - [ ] Proxy mode — no delivery token in client bundle (inspect built JS)
- [ ]
/serverhandler works standalone - [ ]
/nextadapter produces identical responses to/server
Demo flow
- [ ]
contentstack_search_entriesreturns results - [ ]
contentstack_get_entry_by_urlreturns consistent data for a known URL - [ ] Search → get entry → navigate flow works end-to-end
- [ ] Compare output with
@contentstack/mcpCDA tools for same query
Security
- [ ]
Permissions-Policy: tools=(self)header set - [ ]
navigate_torejects external URLs - [ ] Search limit capped at
maxLimit, and the tool's input schema advertises the same cap - [ ] CDA tools carry
untrustedContentHint: true - [ ] Custom routes validate input
Package tests
Run the library test suite:
bash
npm test
npm run test:coverage
npm run verifyLocal docs
bash
npm run docs:dev