Claude Code
CLIAnthropic
Anthropic's agentic command-line coding tool, deeply integrated with the terminal and your codebase.
MCP
SupportedAdd MCP servers via claude mcp add or .mcp.json. Three scopes (local/project/user), stdio/HTTP/SSE/WebSocket transports, OAuth, and tool search.
Config files
| Path | Scope | Format | Key |
|---|---|---|---|
.mcp.json | Project | json | mcpServers |
~/.claude.jsonLocal scope nests under projects.<path>.mcpServers; user scope is top-level. | Global | json | mcpServers |
Fields
| Field | Type | Description |
|---|---|---|
type | "stdio" | "http" | "sse" | "ws" | Transport type. 'streamable-http' is accepted as an alias for 'http'. |
command | string | Executable for a stdio server. |
args | string[] | Arguments for the stdio command. |
env | record<string, string> | Environment variables. Supports ${VAR} and ${VAR:-default} expansion. |
url | string | Endpoint for HTTP/SSE/WebSocket servers. |
headers | record<string, string> | Static HTTP headers (e.g. Authorization). Supports env expansion. |
headersHelper | string | Command that prints a JSON object of headers at connect time (dynamic auth). |
oauth | { clientId?, callbackPort?, scopes?, authServerMetadataUrl? } | OAuth configuration for remote servers. |
timeout | number | Per-server tool execution timeout in milliseconds. |
alwaysLoad | boolean | Exempt this server's tools from deferral so they load at session start. |
Capabilities
Examples
{
"mcpServers": {
"api-server": {
"type": "http",
"url": "${API_BASE_URL:-https://api.example.com}/mcp",
"headers": { "Authorization": "Bearer ${API_KEY}" }
}
}
}- •Project scope uses .mcp.json (checked into version control, requires approval).
- •Local and user scopes are stored in ~/.claude.json; type 'streamable-http' is an alias for 'http'.
- •SSE transport is deprecated in favor of HTTP.
Skills
SupportedSKILL.md skills with rich frontmatter, invoked with /name or loaded automatically by Claude. Custom commands are merged into skills.
Config files
| Path | Scope | Format | Key |
|---|---|---|---|
.claude/skills/<name>/SKILL.md | Project | markdown | — |
~/.claude/skills/<name>/SKILL.mdPersonal skills, available across all projects. | Global | markdown | — |
Fields
| Field | Type | Description |
|---|---|---|
name | string | Display name. Defaults to the directory name. |
description | string | What the skill does and when to use it. Recommended. |
when_to_use | string | Extra trigger context appended to description in the skill listing. |
argument-hint | string | Autocomplete hint for expected arguments. |
arguments | string | string[] | Named positional arguments for $name substitution. |
disable-model-invocation | boolean | When true, only the user can invoke (not Claude). Default false. |
user-invocable | boolean | When false, hide from the / menu (Claude-only). Default true. |
allowed-tools | string | string[] | Tools usable without approval while the skill is active. |
disallowed-tools | string | string[] | Tools removed from the pool while the skill is active. |
model | string | Model to use while the skill is active, or 'inherit'. |
effort | "low" | "medium" | "high" | "xhigh" | "max" | Effort level override while the skill is active. |
context | "fork" | Run the skill in a forked subagent context. |
agent | string | Subagent type to use when context: fork is set. |
hooks | object | Hooks scoped to the skill's lifecycle. |
paths | string | string[] | Glob patterns that limit when the skill auto-activates. |
shell | "bash" | "powershell" | Shell for inline !`command` blocks. Default bash. |
Examples
---
name: deploy
description: Deploy the application to production
disable-model-invocation: true
allowed-tools: Bash(git add *) Bash(git commit *)
---
Deploy $ARGUMENTS to production:
1. Run the test suite
2. Build and push- •Live change detection reloads SKILL.md edits within a session.
- •Project skills load from .claude/skills/ up the directory tree and from nested dirs on demand.
Rules
SupportedCLAUDE.md memory files (project/user/managed) plus modular .claude/rules/*.md with optional path scoping. Auto memory accumulates learnings.
Config files
| Path | Scope | Format | Key |
|---|---|---|---|
CLAUDE.mdAlso reads ./.claude/CLAUDE.md. CLAUDE.local.md for gitignored personal notes. | Project | markdown | — |
.claude/rules/*.mdModular topic rules; recursive. Path-scope with the paths frontmatter field. | Project | markdown | — |
~/.claude/CLAUDE.mdPersonal instructions for all projects. ~/.claude/rules/*.md also supported. | Global | markdown | — |
/Library/Application Support/ClaudeCode/CLAUDE.mdManaged policy (macOS). Linux/WSL: /etc/claude-code/CLAUDE.md; Windows: C:\Program Files\ClaudeCode\CLAUDE.md. | Enterprise | markdown | — |
Fields
| Field | Type | Description |
|---|---|---|
paths | string | string[] | Glob patterns; a rule file applies only when matching files are in context. |
Examples
---
paths:
- "src/api/**/*.ts"
---
# API Development Rules
- All API endpoints must include input validation
- Use the standard error response format- •Claude Code reads CLAUDE.md, not AGENTS.md. Import an existing AGENTS.md with @AGENTS.md inside CLAUDE.md.
- •Auto memory is stored per repo in ~/.claude/projects/<project>/memory/MEMORY.md.
- •Use @path/to/file imports (max depth 4) to compose instructions.
Hooks
SupportedShell commands that fire on lifecycle events, configured in settings.json under the hooks key (or scoped to a skill/subagent).
Config files
| Path | Scope | Format | Key |
|---|---|---|---|
.claude/settings.json | Project | json | hooks |
~/.claude/settings.json | Global | json | hooks |
Fields
| Field | Type | Description |
|---|---|---|
matcher | string | Pattern matched against tool name (for PreToolUse/PostToolUse) to scope the hook. |
hooks[].type | "command" | Hook handler type. |
hooks[].command | string | Shell command to run. Receives event JSON on stdin. |
hooks[].timeout | number | Optional timeout in seconds for the hook command. |
Examples
{
"hooks": {
"PostToolUse": [
{
"matcher": "Edit|Write",
"hooks": [{ "type": "command", "command": "prettier --write \"$CLAUDE_FILE_PATHS\"" }]
}
]
}
}Commands
SupportedCustom slash commands as markdown files. Merged into Skills — a command and a skill of the same name behave identically; skills add supporting files and auto-invocation.
Config files
| Path | Scope | Format | Key |
|---|---|---|---|
.claude/commands/<name>.md | Project | markdown | — |
~/.claude/commands/<name>.md | Global | markdown | — |
Fields
| Field | Type | Description |
|---|---|---|
description | string | What the command does. |
argument-hint | string | Autocomplete hint for expected arguments. |
allowed-tools | string | string[] | Tools the command may use without approval. |
model | string | Model override while the command runs. |
- •.claude/commands/<name>.md creates /<name> and supports the same frontmatter as skills.
- •Skills are recommended for new workflows since they support supporting files and model invocation.
Settings
SupportedHierarchical settings.json controls permissions, environment, hooks, model, and skill behavior across user, project, local, and managed scopes.
Config files
| Path | Scope | Format | Key |
|---|---|---|---|
.claude/settings.jsonShared project settings (checked in). | Project | json | — |
.claude/settings.local.jsonPersonal project settings (gitignored). | Project | json | — |
~/.claude/settings.jsonUser settings for all projects. | Global | json | — |
managed-settings.jsonManaged policy settings deployed by IT/DevOps. | Enterprise | json | — |
Fields
| Field | Type | Description |
|---|---|---|
permissions | { allow?: string[], deny?: string[], ask?: string[], additionalDirectories?: string[] } | Allow/deny/ask rules governing tool and command use. |
env | record<string, string> | Environment variables applied to every session. |
hooks | object | Lifecycle hook configuration (see Hooks). |
model | string | Default model for sessions. |
disableBundledSkills | boolean | Disable the built-in bundled skills (/code-review, /debug, etc.). |
skillOverrides | record<string, "on" | "name-only" | "user-invocable-only" | "off"> | Override skill visibility without editing SKILL.md frontmatter. |
autoMemoryEnabled | boolean | Toggle auto memory. Default true. |
claudeMd | string | Managed CLAUDE.md content (managed/policy scope only). |