open this note in the tree

config

File Location Scope / Use
~/.claude.json Home directory Main global config. Holds projects-map, MCP servers, tool permissions, etc. Anthropic+3Scott Spence+3Reddit+3
~/.claude/settings.json ~/.claude subdirectory in home User global settings. Overrides defaults but is over‐ridden by more specific project settings. Anthropic+1
~/.claude/settings.local.json ~/.claude subdirectory in home User local preferences. Not committed. More specific than settings.json. Anthropic+1
.claude/settings.json Inside project directory Shared project settings (committed). Overrides user global/local. Anthropic+1
.claude/settings.local.json Inside project directory Project‐specific non-shared settings. For experimenting, private overrides. Anthropic

MCP & Tools-Related Files

File Location Purpose
.mcp.json Project root (when MCP servers defined with project scope) Stores MCP server definitions shared across team. Anthropic+1
MCP entries in ~/.claude.json or other user/project settings files As above For MCP servers in user or global scope. Anthropic+1

Other Supporting Files

Here’s the override and load order hierarchy Claude Code follows when resolving configuration. Think of it as layers, from lowest precedence (defaults) up to highest (your local overrides).


1. Built-in defaults

Hardcoded in the Claude Code binary. Provides baseline behavior if no config files exist.


2. Global (user) configs

Applied to all projects.


3. Global local overrides

Take precedence over global shared. Private to your machine.


4. Project configs

Checked into the repo, shared across the team.


5. Project local overrides

Not shared, ignored by VCS. Highest precedence.


6. Runtime / ephemeral

Not configs you edit, but saved state.


Final Rule

When the same key exists in multiple layers, Claude Code merges them in order above.

  Built-in defaults
│
├── Global (user) configs [shared]
│   ├── ~/.claude.json
│   ├── ~/.claude/settings.json
│   ├── ~/.claude/tools.json
│   ├── ~/.claude/hooks.json
│   ├── ~/.claude/agents/*.json
│   └── ~/.claude/CLAUDE.md
│
├── Global local overrides [private]
│   ├── ~/.claude/settings.local.json
│   ├── ~/.claude/hooks.local.json
│   └── ~/.claude/CLAUDE.local.md
│
├── Project configs [shared, in repo]
│   ├── .claude/settings.json
│   ├── .claude/tools.json
│   ├── .claude/hooks.json
│   ├── .claude/workflows.json
│   ├── .claude/agents/*.json
│   └── .claude/CLAUDE.md
│
└── Project local overrides [private, gitignored]
    ├── .claude/settings.local.json
    ├── .claude/hooks.local.json
    └── .claude/CLAUDE.local.md

Special case (not config, just state):

.claude/state.json
.claude/connections.json