Skip to content

Configuration Files

Fig manages six Claude Code configuration files. This reference documents each file’s location, structure, and role.

FileScopePurpose
~/.claude.jsonGlobalUser preferences, project history, global MCP servers
~/.claude/settings.jsonGlobalGlobal settings and permissions
<project>/.claude/settings.jsonProjectProject-specific settings (shared)
<project>/.claude/settings.local.jsonProjectLocal overrides (gitignored)
<project>/.mcp.jsonProjectProject MCP server configuration
<project>/.claude/CLAUDE.mdProjectProject instructions for Claude Code

When the same setting exists in multiple files, the most specific scope wins:

Project Local > Project Shared > Global

Different setting types have different merge behaviors:

  • Permissions — union across all tiers (rules combine)
  • Environment variables — more specific tiers override less specific
  • Hooks — concatenate across tiers (all hooks run)
  • Disallowed tools — union (disabled at any level stays disabled)

The global configuration file stores user preferences and project history.

{
"projects": {
"/path/to/project": {
"lastOpened": "2025-01-15T10:30:00Z"
}
},
"mcpServers": {
"server-name": {
"command": "npx",
"args": ["-y", "some-mcp-server"],
"env": {}
}
}
}

Key fields:

  • projects — map of project paths to metadata (last opened, etc.)
  • mcpServers — globally configured MCP servers

Global settings that apply to all projects.

{
"permissions": {
"allow": ["Read(**)"],
"deny": ["Bash(rm -rf *)"]
},
"env": {
"EDITOR": "vim"
},
"hooks": {},
"disallowedTools": []
}

Key fields:

  • permissions — global allow and deny rules (glob pattern arrays)
  • env — environment variables (key-value strings)
  • hooks — event-keyed hook groups
  • disallowedTools — array of tool names to disable

Project-specific settings at <project>/.claude/settings.json. Same schema as the global settings file, scoped to a single project. This file is typically committed to version control.

{
"permissions": {
"allow": ["Write(src/**)"],
"deny": []
},
"env": {
"NODE_ENV": "development"
},
"hooks": {
"PostToolUse": [
{
"matcher": "Write",
"commands": ["npm run lint"]
}
]
}
}

Local overrides at <project>/.claude/settings.local.json. Same schema as settings.json. This file is gitignored and used for machine-specific settings.

{
"env": {
"API_KEY": "sk-local-development-key"
}
}

Project MCP server configuration at the project root.

{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "."],
"env": {}
},
"remote-api": {
"type": "http",
"url": "https://api.example.com/mcp",
"headers": {
"Authorization": "Bearer token"
}
}
}
}

Each server entry supports:

  • Stdio servers: command, args, env
  • HTTP servers: type: "http", url, headers

Markdown instruction files at <project>/.claude/CLAUDE.md (or ~/.claude/CLAUDE.md for global). These are free-form Markdown files with no required schema.

Fig preserves unknown JSON keys during editing. If a configuration file contains fields that Fig doesn’t directly manage, those fields are retained when Fig saves the file. This prevents data loss when Claude Code adds new configuration options.