Getting Started with Claude Code

Installation, Setup & First Steps

Olivier Vitrac, PhD, HDR | olivier.vitrac@adservio.fr

November 2025

Introduction

Welcome

Goal: Get you up and running with Claude Code in 30 minutes

What you'll achieve:

  • ✅ Claude Code installed and verified

  • ✅ VS Code configured for AI-assisted development

  • ✅ MCP tools enabled

  • ✅ First successful audit run

  • ✅ Ready for Lectures 1 & 2

Why Claude Code?

Traditional development:

  • Manual code reviews → slow, inconsistent

  • Static analyzers → high false positives

  • Documentation lookup → context switching

With Claude Code:

  • Autonomous code auditing

  • Context-aware assistance

  • Multi-file reasoning

  • Tool integration (git, pytest, linters)

Course Structure

graph LR
    L0[Lecture 0:<br/>Setup] --> L1[Lecture 1:<br/>Agents & MCP]
    L1 --> L2[Lecture 2:<br/>Auditing]

    style L0 fill:#FF6B35

Today (L0): Foundation Next (L1): Agent patterns & MCP Final (L2): Enterprise auditing

Part 1: Prerequisites

System Requirements

Operating System:

  • Linux (Ubuntu 20.04+, Debian, Fedora)

  • macOS 11+

  • Windows 10+ with WSL2

Hardware:

  • 8 GB RAM minimum (16 GB recommended)

  • 10 GB free disk space

  • Internet connection

Required Software

Essential:

# Python 3.10 or later
python3 --version

# Git
git --version

# VS Code
code --version

Verification: All three commands should return version numbers

Python Environment

Check Python version:

python3 --version
# Expected: Python 3.10.x or later

If missing or outdated:

# Ubuntu/Debian
sudo apt update && sudo apt install python3.11

# macOS
brew install python@3.11

# Verify
python3.11 --version

Install Pandoc

Required for: Building slides and documentation

# Ubuntu/Debian
sudo apt install pandoc

# macOS
brew install pandoc

# Verify
pandoc --version

Expected: Pandoc 2.x or later

Install Development Tools

# Create virtual environment
python3 -m venv ~/claude-env
source ~/claude-env/bin/activate

# Install static analysis tools
pip install --upgrade pip
pip install ruff flake8 bandit pytest

# Verify installations
ruff --version
flake8 --version
bandit --version

Part 2: Claude Code Installation

Accessing Claude Code

Two modes:

  1. Claude Code (Web Interface)

  2. Claude Code CLI (if available)

    • Install via package manager

    • Requires: API key configuration

Verify Claude Access

Web Interface:

  1. Navigate to https://claude.ai/code

  2. Sign in with your account

  3. Verify Pro or Max tier active

Check model access:

Prompt: "What model are you?"
Expected: "I am Claude Sonnet 4.5..."

Understanding Tiers

Feature Pro Max
Context window 200k tokens 200k tokens
MCP tools ✅ Yes ✅ Yes
Usage limits Moderate High
Priority access Standard Priority
Cost $20/month $200/month

Recommendation: Start with Pro, upgrade to Max for production

Part 3: VS Code Setup

Install VS Code

If not installed:

# Ubuntu/Debian
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | \
  gpg --dearmor > packages.microsoft.gpg
sudo install -o root -g root -m 644 packages.microsoft.gpg \
  /etc/apt/trusted.gpg.d/
sudo sh -c 'echo "deb [arch=amd64] \
  https://packages.microsoft.com/repos/code stable main" \
  > /etc/apt/sources.list.d/vscode.list'
sudo apt update && sudo apt install code

# macOS
brew install --cask visual-studio-code

Essential Extensions

Open VS Code:

code .

Install extensions:

  1. Python (ms-python.python)

  2. Markdown All in One (yzhang.markdown-all-in-one)

  3. Mermaid Markdown Syntax (bpruitt-goddard.mermaid-markdown-syntax-highlighting)

  4. GitLens (eamodio.gitlens) — optional

Via command line:

code --install-extension ms-python.python
code --install-extension yzhang.markdown-all-in-one
code --install-extension bpruitt-goddard.mermaid-markdown-syntax-highlighting

Configure VS Code Tasks

Create .vscode/tasks.json:

{
  "version": "2.0.0",
  "tasks": [
    {
      "label": "Build Reveal Slides",
      "type": "shell",
      "command": "bash",
      "args": [
        "tools/scripts/build_reveal.sh",
        "${fileDirname}"
      ],
      "problemMatcher": []
    },
    {
      "label": "Run Audit",
      "type": "shell",
      "command": "python3",
      "args": [
        "tools/scripts/run_audit.py",
        "${workspaceFolder}/src"
      ],
      "problemMatcher": []
    }
  ]
}

VS Code Settings

Recommended settings (.vscode/settings.json):

{
  "python.linting.enabled": true,
  "python.linting.ruffEnabled": true,
  "python.linting.flake8Enabled": true,
  "python.formatting.provider": "black",
  "editor.formatOnSave": true,
  "editor.rulers": [88],
  "files.trimTrailingWhitespace": true
}

Part 4: MCP Configuration

What is MCP?

Model Context Protocol — enables Claude to use tools

graph LR
    User --> Claude[Claude Code]
    Claude --> MCP[MCP Server]
    MCP --> Tools[Shell, Git, Audit, ...]

    style MCP fill:#004E89

Benefits:

  • Safe command execution

  • File operations

  • Test running

  • Custom audit tools

Clone Course Repository

# Navigate to your projects directory
cd ~/Documents

# Clone repository
git clone <repository-url> claude-lectures
cd claude-lectures

# Verify structure
ls -la
# Expected: lectures/, tools/, templates/, Makefile

MCP Configuration File

File: tools/mcp/config.json

Already created in repository:

{
  "mcpServers": {
    "local-shell": {
      "command": "python3",
      "args": ["tools/mcp/tools.d/shell/server.py"],
      "description": "Safe shell with whitelisted commands"
    },
    "code-audit": {
      "command": "python3",
      "args": ["tools/mcp/tools.d/audit/server.py"],
      "description": "Code audit tool"
    }
  }
}

Enable MCP in Claude Code

Method 1: Web Interface

  1. Open Claude Code settings

  2. Navigate to MCP Configuration

  3. Upload tools/mcp/config.json

  4. Reload Claude Code

Method 2: Environment Variable

export CLAUDE_MCP_CONFIG="$(pwd)/tools/mcp/config.json"

Verify MCP Tools

Prompt Claude Code:

List all available MCP tools with descriptions.

Expected response:

Available MCP tools:
1. local-shell: Safe shell with whitelisted commands
2. code-audit: Code audit tool (ruff, flake8, bandit)

Part 5: First Run

Test 1: Simple Query

Prompt:

Explain what MCP is and how it helps with code development.

Expected: Claude provides explanation (no tools used)

Test 2: File Operations

Prompt:

Use the local-shell tool to list files in the current directory.

Expected: Claude executes ls via MCP and shows results

What's happening:

  1. Claude receives your request

  2. Decides to use local-shell tool

  3. Calls MCP server with ["ls"]

  4. MCP validates command (whitelisted)

  5. Executes and returns output

  6. Claude formats response for you

Test 3: Run Tests

Create test file:

mkdir -p playground/src
cat > playground/src/test_simple.py << 'EOF'
def test_addition():
    assert 1 + 1 == 2

def test_subtraction():
    assert 5 - 3 == 2
EOF

Prompt:

Use the local-shell tool to run pytest on playground/src/test_simple.py

Expected: Tests run and pass

Test 4: Code Audit (Preview)

Create sample file with issue:

cat > playground/src/example.py << 'EOF'
import os

def run_cmd(cmd):
    os.system(cmd)  # Security issue!
EOF

Prompt:

Use the code-audit tool to scan playground/src/ for security issues.

Expected: Identifies os.system() vulnerability

Part 6: Context Control

The .claudeignore File

Purpose: Exclude files from Claude's context

Why important:

  • Reduces token usage

  • Speeds up analysis

  • Avoids irrelevant files

Verify Context Exclusion

Before .claudeignore:

Prompt: "How many files do you see?"
Claude: "I see 347 files..."

After .claudeignore:

Prompt: "How many files do you see?"
Claude: "I see 42 files (excluding build artifacts, media, etc.)"

Result: Faster, more focused responses

Part 7: Troubleshooting

Common Issue 1: MCP Tools Not Loading

Symptoms:

  • Prompt mentions tools, but Claude says "not available"

Solutions:

# 1. Check config file syntax
python3 -m json.tool tools/mcp/config.json

# 2. Verify Python scripts exist
ls -la tools/mcp/tools.d/*/server.py

# 3. Make scripts executable
chmod +x tools/mcp/tools.d/*/server.py

# 4. Test manually
echo '{"tool":"exec","args":["ls"]}' | \
  python3 tools/mcp/tools.d/shell/server.py

Common Issue 2: Permission Denied

Symptoms:

Error: Permission denied: tools/mcp/tools.d/shell/server.py

Solution:

chmod +x tools/mcp/tools.d/shell/server.py
chmod +x tools/mcp/tools.d/audit/server.py

Common Issue 3: Tool Timeout

Symptoms:

Error: Command timed out after 30s

Solutions:

  1. Increase timeout in server.py:

    TIMEOUT = 60  # Increase from 30
  2. Run command separately first:

    # Test if command is slow
    time ruff check src/

Common Issue 4: Import Errors

Symptoms:

ModuleNotFoundError: No module named 'ruff'

Solution:

# Ensure tools installed in correct environment
source ~/claude-env/bin/activate
pip install ruff flake8 bandit

# Verify
which ruff
# Should show path in virtual environment

Common Issue 5: VS Code Extension Issues

Symptoms:

  • Python not detected

  • Tasks not available

Solutions:

# 1. Reload VS Code
Cmd+Shift+P"Developer: Reload Window"

# 2. Select Python interpreter
Cmd+Shift+P"Python: Select Interpreter"
# Choose ~/claude-env/bin/python3

# 3. Verify tasks
Cmd+Shift+P"Tasks: Run Task"
# Should show "Build Reveal Slides", "Run Audit"

Part 8: Quick Reference

Daily Workflow

# 1. Activate environment
source ~/claude-env/bin/activate

# 2. Navigate to project
cd ~/Documents/claude-lectures

# 3. Open in VS Code
code .

# 4. Start Claude Code (web)
# Visit: https://claude.ai/code

# 5. Run audit
make build:reveal LECTURE_DIR=lectures/lecture1_agents

Essential Commands

Task Command
List lectures make list
Build slides make build:reveal LECTURE_DIR=...
Build pages make build:site LECTURE_DIR=.../pages
Run tests pytest src/
Audit code ruff check src/
Security scan bandit -r src/
Clean artifacts make clean

Help Resources

Documentation:

Getting help:

  • Instructor: olivier.vitrac@adservio.fr

  • Course repository: Check README.md

  • Claude Code support: support@anthropic.com

Summary

What You've Accomplished

✅ Installed Python 3.10+, VS Code, Pandoc ✅ Configured Claude Code (Pro/Max) ✅ Set up VS Code with extensions ✅ Enabled MCP tools ✅ Ran first audit ✅ Configured .claudeignore ✅ Troubleshooting checklist ready

Verification Checklist

Before moving to Lecture 1:

Next Steps

Immediate:

  1. Complete verification checklist

  2. Bookmark Claude Code interface

  3. Review lectures/lecture0_install/pages/ for details

Lecture 1 Preview:

  • Assistant vs Agent paradigms

  • MCP deep dive

  • Code auditing workflows

  • Agent chaining

Lecture 2 Preview:

  • Technical debt strategies

  • ISO/IEC 25010 compliance

  • Enterprise audit patterns

Resources

Created for you:

  • lectures/lecture0_install/slides.md — These slides

  • lectures/lecture0_install/pages/ — Detailed guides

  • lectures/lecture0_install/content.md — Summary document

Repository structure:

claude-lectures/
├── lectures/
│   ├── lecture0_install/
│   ├── lecture1_agents/
│   └── lecture2_audit/
├── tools/
└── templates/

Questions?

Contact: Olivier Vitrac, PhD, HDR olivier.vitrac@adservio.fr

Ready for Lecture 1? See you in the next session!

Thank You!

You're now ready to:

  • Use Claude Code effectively

  • Configure MCP tools

  • Run code audits

  • Build lecture materials

Next: Lecture 1 — From Assistants to Agents