NativeAIHub
โš™๏ธ

settings.json

The user level settings file for Claude Code. Controls permissions, environment variables, hooks, and MCP server configurations that apply across all projects.

Configurationยท2 sectionsยท1 min read
codingdevopsworkflow
Install Prompt

Paste this into Claude Code to set it up:

The settings file lives at ~/.claude/settings.json. It controls tool permissions (which tools can run without asking), environment variables, hook definitions, and MCP server configurations. Edit it directly or use Claude Code's /settings command. Changes take effect after restarting Claude Code.

01What It Does

Your global control panel

The settings.json file at ~/.claude/settings.json is where you define the default behavior of Claude Code across all projects. It controls which tools can execute without prompting, which environment variables are injected into sessions, which hooks fire on specific events, and which MCP servers are available globally. Think of it as the operating system configuration for your Claude Code environment. Every session reads this file on startup, and the settings cascade into every project unless overridden at the project level.

02Key Sections

๐Ÿ”’
PermissionsDefine which tools Claude Code can use without asking for confirmation. Allow trusted tools like Read, Grep, and Glob globally, and leave sensitive tools like Write and Bash to prompt each time. Supports regex patterns for fine grained Bash command control.
๐ŸŒ
Environment VariablesInject environment variables into every Claude Code session. Useful for API keys, default paths, feature flags, and any value your hooks or MCP servers need at runtime without hardcoding them in project files.
๐Ÿช
HooksDefine shell commands that fire on specific events: after file edits, before tool execution, on session start, and more. Hooks are deterministic and always execute, making them ideal for auto formatting, linting, and safety checks.
๐Ÿ”Œ
MCP ServersRegister MCP (Model Context Protocol) servers that extend Claude Code with external tool access. Each server gets a type (stdio or http), connection details, and optional environment variables. These servers appear as additional tools in every session.