Claude Code Setup Guide

Complete guide to integrating Bootspring with Claude Code (Anthropic's CLI coding assistant).

Overview#

Claude Code is Anthropic's terminal-based AI coding assistant. Bootspring enhances Claude Code by providing:

  • Structured Context - CLAUDE.md provides project understanding
  • MCP Integration - Access Bootspring tools directly
  • Expert Agents - Specialized AI assistance
  • Development Workflows - Guided multi-phase development

Prerequisites#

  • Claude Code installed
  • Bootspring CLI installed (npm install -g bootspring)
  • Node.js 18+ installed
  • Bootspring account (optional)

Installing Claude Code#

macOS#

1# Install via npm 2npm install -g @anthropic-ai/claude-code 3 4# Or via Homebrew 5brew install claude-code 6 7# Verify 8claude --version

Windows#

npm install -g @anthropic-ai/claude-code

Linux#

npm install -g @anthropic-ai/claude-code

Authenticate#

claude login

Bootspring + Claude Code Integration#

Claude Code automatically reads CLAUDE.md files in your project.

Generate context:

cd your-project bootspring init bootspring generate

Verify:

cat CLAUDE.md

Now Claude Code has full project understanding.

Method 2: MCP Server#

Configure Bootspring as an MCP server for Claude Code.

Add to ~/.claude/mcp.json:

1{ 2 "servers": { 3 "bootspring": { 4 "command": "npx", 5 "args": ["-y", "bootspring", "mcp", "serve"], 6 "env": { 7 "BOOTSPRING_API_KEY": "bs_live_xxx" 8 } 9 } 10 } 11}

Or use CLI:

bootspring mcp install --target claude-code

Method 3: Project Configuration#

Add to .claude directory in your project:

mkdir -p .claude

Create .claude/settings.json:

1{ 2 "context": { 3 "include": ["CLAUDE.md", "bootspring.config.js"], 4 "autoRefresh": true 5 }, 6 "mcp": { 7 "servers": ["bootspring"] 8 } 9}

Using Bootspring with Claude Code#

Context-Aware Assistance#

Claude Code reads your CLAUDE.md automatically:

1# Start Claude Code in your project 2cd my-project 3claude 4 5# Claude now understands your project 6> "Help me add a new API endpoint following our patterns"

Invoking Agents via Chat#

Ask Claude Code to use Bootspring agents:

> Use the bootspring security-expert to review my authentication implementation

Applying Skills#

Request skill patterns:

> Apply the bootspring api-endpoint pattern for a user profile endpoint

Running Workflows#

Start development workflows:

> Start the bootspring feature-development workflow for adding notifications

Command Integration#

Bootspring Commands in Claude Code#

Run Bootspring commands directly:

# In Claude Code session > Run: bootspring generate > Run: bootspring status > Run: bootspring agent invoke frontend-expert "Create dashboard"

Slash Commands#

Create custom slash commands in .claude/commands.json:

1{ 2 "commands": { 3 "/bs-generate": { 4 "command": "bootspring generate", 5 "description": "Regenerate Bootspring context" 6 }, 7 "/bs-agent": { 8 "command": "bootspring agent invoke $1 \"$2\"", 9 "description": "Invoke a Bootspring agent", 10 "args": ["agent-name", "prompt"] 11 }, 12 "/bs-skill": { 13 "command": "bootspring skill apply $1", 14 "description": "Apply a Bootspring skill pattern" 15 }, 16 "/bs-quality": { 17 "command": "bootspring quality pre-commit", 18 "description": "Run quality checks" 19 } 20 } 21}

Usage:

/bs-generate /bs-agent frontend-expert "Create a form component" /bs-skill patterns/react-form

Configuration Files#

Project Context#

CLAUDE.md (generated by Bootspring):

1# Project Context 2 3## Overview 4Next.js 14 application with TypeScript... 5 6## Tech Stack 7- Framework: Next.js 14 8- Language: TypeScript 9- Styling: Tailwind CSS 10... 11 12## Architecture 13...

Bootspring Config#

bootspring.config.js:

1module.exports = { 2 project: { 3 name: 'my-app', 4 type: 'nextjs', 5 }, 6 context: { 7 include: ['**/*.ts', '**/*.tsx'], 8 exclude: ['node_modules/**'], 9 }, 10 agents: { 11 enabled: ['frontend-expert', 'backend-expert'], 12 }, 13};

Claude Code Settings#

~/.claude/settings.json (global):

1{ 2 "editor": "code", 3 "theme": "dark", 4 "contextFiles": ["CLAUDE.md", "README.md"], 5 "mcp": { 6 "enabled": true, 7 "servers": ["bootspring"] 8 } 9}

Workflow Examples#

Feature Development#

1# Start Claude Code 2claude 3 4# Begin workflow 5> I want to add user notifications to the app 6 7# Claude uses Bootspring context to understand existing patterns 8# Then provides implementation plan following your architecture 9 10> Use bootspring_workflow to start feature-development 11 12# Follow guided phases: 13# 1. Design - Claude helps design the feature 14# 2. Implementation - Uses your patterns 15# 3. Testing - Generates tests 16# 4. Review - Quality checks

Code Review#

1claude 2 3> Review the changes in src/api/users.ts for security issues 4 5# Claude uses bootspring_agent with security-expert 6> Use bootspring_agent security-expert to audit this file 7 8# Detailed security review with recommendations

Quick Fixes#

1claude 2 3> Fix the TypeScript errors in this file 4 5# Claude understands your project's type patterns from context 6> Run: bootspring quality types-only 7 8# Shows issues and provides fixes

Context Synchronization#

Auto-Refresh#

Keep context updated:

1// bootspring.config.js 2module.exports = { 3 context: { 4 autoRefresh: true, 5 refreshOn: ['git-commit', 'file-change'], 6 }, 7};

Manual Refresh#

# In Claude Code > Run: bootspring generate # Or use slash command /bs-generate

Watch Mode#

# In separate terminal bootspring generate --watch

MCP Tools Available#

When configured as MCP server, these tools are available:

ToolDescription
bootspring_contextGet project context
bootspring_agentInvoke expert agents
bootspring_skillApply skill patterns
bootspring_workflowStart workflows
bootspring_generateRegenerate context
bootspring_qualityRun quality checks
bootspring_todoManage tasks

Using MCP Tools#

> Use bootspring_context to understand this codebase > Use bootspring_agent database-expert to design the schema > Use bootspring_skill patterns/prisma-crud for the User model

Performance Tips#

Optimize Context Size#

1// bootspring.config.js 2module.exports = { 3 context: { 4 // Only include relevant files 5 include: ['src/**/*.ts', 'src/**/*.tsx'], 6 // Exclude generated/large files 7 exclude: [ 8 'node_modules/**', 9 'dist/**', 10 '**/*.test.ts', 11 '**/*.spec.ts', 12 ], 13 // Limit file sizes 14 maxFileSize: 50000, // 50KB 15 // Limit total context 16 maxContextSize: 500000, // 500KB 17 }, 18};

Cache Configuration#

1module.exports = { 2 cache: { 3 enabled: true, 4 ttl: 3600, // 1 hour 5 invalidateOn: ['config-change', 'git-commit'], 6 }, 7};

Troubleshooting#

Context Not Loading#

1# Verify CLAUDE.md exists 2ls -la CLAUDE.md 3 4# Regenerate 5bootspring generate --verbose 6 7# Check file permissions 8chmod 644 CLAUDE.md

MCP Connection Issues#

1# Test MCP server 2bootspring mcp serve --debug 3 4# Check Claude Code MCP config 5cat ~/.claude/mcp.json 6 7# Verify Bootspring status 8bootspring status

Agent Invocation Failures#

1# Test agent directly 2bootspring agent invoke frontend-expert "test" 3 4# Check API key 5bootspring status 6 7# Verify network 8curl https://api.bootspring.dev/health

Slow Context Generation#

# Profile generation bootspring generate --profile # Optimize configuration bootspring config optimize

Security#

API Key Management#

Environment variable (recommended):

export BOOTSPRING_API_KEY="bs_live_xxx"

In MCP config:

{ "env": { "BOOTSPRING_API_KEY": "${BOOTSPRING_API_KEY}" } }

File Permissions#

chmod 600 ~/.claude/mcp.json chmod 644 CLAUDE.md chmod 644 bootspring.config.js

Sensitive Data#

Exclude sensitive files from context:

1// bootspring.config.js 2module.exports = { 3 context: { 4 exclude: [ 5 '**/.env*', 6 '**/secrets/**', 7 '**/*.pem', 8 '**/*.key', 9 ], 10 }, 11};

Integration with Other Tools#

VS Code + Claude Code#

Use both together:

  1. VS Code for editing
  2. Claude Code for AI assistance
  3. Bootspring for context and patterns

Git Hooks#

Pre-commit quality check:

#!/bin/sh # .git/hooks/pre-commit bootspring quality pre-commit

CI/CD Integration#

1# .github/workflows/quality.yml 2- name: Quality Check 3 run: | 4 npm install -g bootspring 5 bootspring generate 6 bootspring quality pre-deploy

Uninstalling#

Remove MCP Configuration#

bootspring mcp uninstall --target claude-code

Clean Project Files#

rm -rf .bootspring rm CLAUDE.md rm bootspring.config.js

Remove Global Config#

rm ~/.claude/mcp.json

Next Steps#