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 Session ID, all persona profiles ❌ No
compare_personas_record_result Confirmation, remaining count ❌ No
compare_personas_summarize Full comparison report ❌ No

Usage Flow:

1. compare_personas_init(url, goal, personas[])
   β†’ Returns: sessionId, all persona profiles/states

2. For each persona:
   a. cognitive_journey_init(persona, goal, url)
   b. Use browser tools to attempt goal
   c. cognitive_journey_update_state() after each action
   d. compare_personas_record_result(sessionId, result)

3. compare_personas_summarize(sessionId)
   β†’ Returns: rankings, recommendations, comparison

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
cognitive-journey CLI Server is the brain

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_record_result after each journey]
[Calls compare_personas_summarize for final report]

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

  • Sessions are stored in-memory on the MCP server
  • Auto-cleanup after 1 hour
  • Sessions deleted after summarize is called

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.

Related


Copyright: (c) 2026 Alexa Eden.

License: MIT License

Contact: [email protected]

From the Blog