🛠️

Claude Code Configuration Guide

Aug 29, 2025

Summary

  • The document outlines detailed configuration procedures for Claude Code, including API key setup, model selection, MCP server integration, tool permissions, and multi-directory workflows.
  • Key features covered are model switching, workspace expansion, and real-time permission management.
  • Recommendations emphasize using ~/.claude.json for reliable and centralized configuration.
  • Guidance is provided for both new users and advanced workflow orchestration across multiple projects and repositories.

Action Items

  • No dated action items noted; all instructions in the document are to be performed as needed by the user.

API Key Setup

  • Claude Code requires an Anthropic API key, which can be set as an environment variable or in your shell profile.
  • Recommended method: export ANTHROPIC_API_KEY="your-api-key-here".
  • No action required unless deploying or initializing Claude Code for the first time.

Model Selection and Switching

  • Supports multiple models: Claude 4 Sonnet, Claude 4.1 Opus, Claude 4 Opus, Claude 3.5 Haiku.
  • Models can be set via environment variable (ANTHROPIC_MODEL) or at runtime with the CLI --model option.
  • During a session, models can be switched interactively using the /model command, offering several presets including "Default", "Opus", "Sonnet", and "Opus Plan Mode".
  • Opus Plan Mode automatically uses Opus 4.1 for planning/research and Sonnet 4 for execution.

MCP Server Configuration

  • MCP servers extend Claude's capabilities by connecting it with external tools and services.
  • Configuration locations include project-specific, user-local/global, and main config files (e.g., ~/.claude.json).
  • Example JSON snippets provided for setting up MCP servers such as filesystem, memory, or fetch.
  • Users are advised to update the correct project configuration when setting MCP servers.

Tool Permissions and Management

  • Allowed tools can be configured in the same files as MCP servers.
  • Tools include core commands (Task, Bash, Git log, Glob, Grep, LS, etc.) and can be allowed or restricted as needed.
  • Recommend using ~/.claude.json for consistent tool permission management.
  • Permissions can also be managed interactively using the /permissions command, which launches a UI for viewing and changing allowed/denied tools in real time.
  • No restart is needed after updating permissions via the UI.

Multi-Directory Workflows & Workspace Expansion

  • Claude Code can operate across multiple directories using --add-dir (CLI) at startup or /add-dir mid-session.
  • Enables workflows that span several repositories, shared resources, or project directories without restarting sessions.
  • The main working directory is always included by default.
  • CLAUDE.md files are not read from additional directories added via --add-dir.
  • Typical use cases: cross-repository edits, accessing shared configs, dynamic context expansion.

Decisions

  • Centralize configuration in ~/.claude.json — Recommended for reliability and compatibility across features.

Open Questions / Follow-Ups

  • None documented; all configuration instructions are provided as self-serve guidance.