Back to docs

API Free Cognitive Features

Since v9.7.0, CBrowser's cognitive simulation works without an Anthropic API key when running via MCP.

How It Works

CBrowser uses a session bridge architecture:

  1. MCP Tools return data β€” The server does math, returns persona profiles, cognitive states, thresholds
  2. Claude provides reasoning β€” Claude.ai or Claude Code is the brain that decides what to do
  3. No API calls on server β€” The MCP server does not call Anthropic's API

Two Modes Comparison

Mode Brain API Key Needed?
Session Bridge (MCP) Claude.ai/Code ❌ Not on server
Standalone CLI CBrowser calls Anthropic API βœ… Required

Available Session Bridge Tools

Cognitive Journey Tools

Tool What It Returns API Key?
cognitive_journey_init Persona profile, initial state, thresholds ❌ No
cognitive_journey_update_state New state after action, abandonment check ❌ No
list_cognitive_personas All available personas with traits ❌ No

Usage Flow:

1. cognitive_journey_init(persona, goal, startUrl)
   β†’ Returns: profile, initialState, thresholds

2. Use browser tools (navigate, click, fill)

3. cognitive_journey_update_state(currentState, actionResult, personaTraits)
   β†’ Returns: newState, shouldAbandon, abandonmentReason

4. Repeat steps 2-3 until goal achieved or abandoned

Persona Comparison Tools (v9.8.0)

Tool What It Returns API Key?
compare_personas_init Persona profiles and instructions for each journey ❌ No
compare_personas_complete Comparison report from the results you pass in ❌ No

Usage Flow:

  1. compare_personas_init(url, goal, personas[]) returns persona profiles and instructions.
  2. For each persona:
    • cognitive_journey_init(persona, goal, url)
    • Use browser tools to attempt the goal
    • cognitive_journey_update_state() after each action
    • Keep the journey's result
  3. compare_personas_complete(url, goal, journeyResults[]) returns rankings and recommendations.

Each journey result carries persona, goalAchieved, totalTime (seconds), stepCount, finalState (patience, frustration, confusion), abandonmentReason and frictionPoints.

compare_personas_record_result and compare_personas_summarize were removed in 20.0. They read a server-side session that nothing created, so both always answered "Session not found".

Fire-and-Forget Tools (Still Need API Key)

These tools run autonomously and need an API key on the server:

Tool Why API Key Required
compare_personas (non-session) Runs full journeys internally
competitive_benchmark Runs a journey per site; since 20.0 there is no keyless fallback
cognitive-journey CLI Server is the brain
explore, compare-personas, competitive-benchmark CLI Each runs cognitive journeys; since 20.0 explore and competitive-benchmark have no keyless mode

A journey replayed from a saved trace (cognitive-journey --replay-trace <file>) makes no model call and needs no key.

Claude.ai Example

When using CBrowser via claude.ai custom connector:

User: "Compare how first-timer and elderly-user experience the signup on example.com"

Claude: I'll use the session bridge tools to compare personas.

  • Calls compare_personas_init with url, goal, personas
  • For each persona: navigates, clicks, tracks cognitive state
  • Calls compare_personas_complete

Here's the comparison:

  • first-timer: Completed in 45s, 6 steps, 15% frustration
  • elderly-user: Abandoned at step 4 due to confusion (small touch targets)
  • ...

Session Management

Nothing is stored on the server between the comparison calls: compare_personas_complete works from the results Claude passes in.

Environment Detection (v9.7.0)

CBrowser detects when running inside Claude Code via these environment variables:

  • CLAUDE_CODE_SESSION
  • MCP_SERVER_NAME
  • CLAUDE_CODE

When detected, isCognitiveAvailable() returns true even without an API key.


Copyright: (c) 2026 Alexa Eden.

License: MIT License

Contact: [email protected]

From the Blog