Claude Code + ContextsBase Integration

The MCP server for Claude Code that runs your backlog from the terminal.

Claude Code is Anthropic’s official agentic CLI. Connect it to ContextsBase over MCP: Claude claims the next iteration item, reads structured entities and Given/When/Then test cases, builds the feature, and records test verification back to the project.

  • Compatible with Anthropic Claude Code CLI
  • Native MCP JSON-RPC 2.0
  • Free for 1 project
Terminal: Add ContextsBase MCP to Claude Code

# Connect with one command in your repository:

$ claude mcp add contextsbase \ -- npx -y @contextsbase/mcp-server \ --env CONTEXTSBASE_TOKEN="cb_tok_live_abc123..."

# Claude Code is now equipped with 5 tools:

✓ Added contextsbase (tools: list_iterations, next_iteration_item, ...)

Single Command Setup

One terminal command, zero prompt friction

Run claude mcp add with your ContextsBase token. Claude Code automatically registers the tool endpoints and invokes them autonomously when you request backlog execution.

01

Why Claude Code needs an MCP server

Claude Code has deep filesystem and terminal capabilities, but every session starts from zero memory. You are forced to re-explain requirements, paste data schemas, and manually review tickets.

While CLAUDE.md stores static hints, it is not a project management system or a live specification engine. As soon as multiple features are being built or business rules evolve, terminal memory gets fragmented.

ContextsBase turns Claude Code into a self-guiding execution engine:

  • No Prompt Amnesia: Claude Code queries ContextsBase over MCP to fetch the current iteration and exact feature requirements.
  • Zero Schema Guessing: Database models and API entities are delivered as rigid JSON schemas, preventing phantom fields.
  • Automated Playwright Generation: Plain-text Given/When/Then test cases guide Claude Code to write and run actual end-to-end assertions.
  • Drift Tracking: Once Claude Code finishes, it records an implementation fingerprint. If someone changes the business rules in ContextsBase later, the record flags Outdated automatically.

02

Connect in 60 seconds with claude mcp add

Anthropic’s Claude Code CLI provides a built-in command to register MCP servers directly into its configuration file:

Method 1: Using the Claude CLI (Recommended)

terminal
claude mcp add contextsbase \
  -- npx -y @contextsbase/mcp-server \
  --env CONTEXTSBASE_TOKEN="cb_tok_live_abc123..."

Method 2: Manual Config File (~/.claude.json)

If you manage configurations centrally, add ContextsBase directly to your ~/.claude.json or project-level configuration:

~/.claude.json
{
  "mcpServers": {
    "contextsbase": {
      "command": "npx",
      "args": ["-y", "@contextsbase/mcp-server"],
      "env": {
        "CONTEXTSBASE_TOKEN": "cb_tok_live_abc123..."
      }
    }
  }
}

Verify in the Terminal

Launch Claude Code in your terminal with claude and run /mcp. You should see contextsbase listed as connected with 5 active tools.

03

ContextsBase tools for Claude Code

ContextsBase grants Claude Code precise, scoped access to the software requirements lifecycle:

  • list_iterations

    read

    Returns open iterations and prioritized feature backlogs. Claude Code sees remaining scope.

  • next_iteration_item

    read

    Atomically claims the next pending feature. Supplies full spec, entity relations, flows, and test cases.

  • get_feature_spec

    read

    Retrieves a published feature specification by ID (e.g. F-3) without exposing draft changes.

  • record_test_automation

    records

    Stores Claude Code's generated Playwright test file, test names, and test run results against Given/When/Then cases.

  • record_feature_implementation

    records

    Stores implementation details fingerprinted against the spec version to detect requirements drift.

04

The terminal execution loop

Here is the standard workflow when pairing Claude Code with ContextsBase:

Terminal prompt
claude "Claim the next pending feature from ContextsBase, implement it according to its business rules, generate the Playwright test, and report results back."
Prompting Claude Code in your terminal

Claude Code executes the pipeline autonomously:

  1. 01
    Claim Step: Claude Code invokes next_iteration_item. The server locks the feature (e.g. F-2 Team Invites) atomically.
  2. 02
    Code Implementation: Claude Code reads the schema definition and edits the codebase without guessing field names or edge case rules.
  3. 03
    Playwright Verification: It translates the Given/When/Then test cases into Playwright scripts and runs them locally.
  4. 04
    Sync Records: Claude Code calls record_test_automation and record_feature_implementation, moving the feature from In progress to Implemented.

05

Product walkthrough in action

Watch ContextsBase serve an agent, manage the queue, and record implementation state:

walkthrough

06

ContextsBase vs CLAUDE.md

Many developers rely exclusively on CLAUDE.md. Here is how it compares to an MCP-native context server:

Comparison of CLAUDE.md file versus ContextsBase MCP server
RequirementCLAUDE.md FileContextsBase MCP
Context OverheadLoaded into every prompt tokenFetched dynamically per tool call
Feature BacklogManual checklist in textOrdered queue with atomic claims
Schema GuaranteesProse descriptions prone to hallucinationsDelivered as rigid JSON entities
Playwright RecordingManual human verificationAutomated test recording per case
Requirements DriftNo trackingSpec fingerprinting alerts on edits

07

Frequently asked questions

How does Claude Code use ContextsBase?

Claude Code uses its native Model Context Protocol (MCP) support. When running in your terminal, Claude Code calls ContextsBase to inspect project entities, fetch feature business rules, claim iteration items, and record Playwright test results upon completion.

Does ContextsBase replace CLAUDE.md?

CLAUDE.md is great for short developer conventions (lint commands, package manager flags). ContextsBase replaces bloated product requirement files, data schemas, and test specs that overwhelm CLAUDE.md and degrade agent reasoning.

Can multiple Claude Code CLI sessions work concurrently?

Yes. Because `next_iteration_item` issues atomic claims, two terminal tabs or team members running Claude Code will each take distinct features without race conditions.

Does ContextsBase supply the AI model or API keys?

No. You run Claude Code with your own Anthropic account or API key. ContextsBase only acts as the context infrastructure and execution bridge.

Equip Claude Code with full project context.

Get your free MCP token in 60 seconds. One project is free forever.

  • Free for one project
  • Bring your own agent