Developer & agent documentation

Integrate Assess My Hair

The cosmetic decision engine is available through four doors that all share one canonical engine: a REST API, a Model Context Protocol server, a page-level Browser WebMCP tool, and the human web assessment. All agent responses are cosmetic guidance only — never medical advice.

Cosmetic-only safety contract. Every door returns cosmetic hair-care and styling suggestions and product categories only. It never diagnoses, treats, or advises on any medical or scalp condition, never prescribes medication, and routes anything concerning to a qualified professional. Tool calls trigger no emails, purchases, or other consequential actions.

The four doors
Door 1 · REST

REST API

Versioned JSON endpoint. POST a cosmetic hair profile, receive cosmetic approaches and product categories. CORS is open (Access-Control-Allow-Origin: *) and OPTIONS preflight is supported.

https://assessmyhair.com/api/v1/assess-hair-needs
Door 2 · MCP

Model Context Protocol

A genuine MCP server over JSON-RPC 2.0 (protocol 2024-11-05). Supports initialize, tools/list, and tools/call for the assess_hair_needs tool. CORS-enabled for browser-based agents.

https://assessmyhair.com/api/mcp
Door 3 · Browser WebMCP

Page-level Browser Tool

When a WebMCP-capable browser/agent is present, every page registers the assess_hair_needs tool directly in the page. Its handler calls the same canonical REST endpoint. Degrades gracefully when no WebMCP host is available.

navigator.modelContext.registerTool("assess_hair_needs")
Door 4 · Human

Human Web Assessment

The original interactive assessment for people. It shares the same canonical cosmetic engine as the agent doors, so humans and agents get consistent logic.

https://assessmyhair.com/quiz

REST: request & response

curl -X POST https://assessmyhair.com/api/v1/assess-hair-needs \
  -H "Content-Type: application/json" \
  -d '{
    "hairType": "4c coily",
    "condition": ["dry", "breakage"],
    "goals": ["length retention", "more moisture"],
    "routine": { "washFrequency": "weekly", "heatUse": "rarely" }
  }'

Returns JSON with summary, cosmeticApproaches, productCategories, routineGuidance, whenToConsultAProfessional, and a cosmetic-only disclaimer. Full schema at .

MCP: tools/call

curl -X POST https://assessmyhair.com/api/mcp \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0", "id": 1, "method": "tools/call",
    "params": {
      "name": "assess_hair_needs",
      "arguments": {
        "hairType": "4c coily",
        "condition": ["dry", "breakage"],
        "goals": ["length retention"]
      }
    }
  }'

Also supports initialize and tools/list. REST and MCP resolve identical inputs to identical output.

Discovery & manifests

  • OpenAPI spec
  • Capability manifest
  • MCP discovery doc
  • Registry packages (prepared)
  • Interface analytics (counts only)