# Cline

Open-source AI coding agent for VS Code (plus CLI and SDK) with Plan/Act modes, MCP support, and human-in-the-loop approval of every file change and command.

Schema: 1.0 · Data: ee5de863c30bdbe4fe7dd3e07c7e22ea9bf4ab2248dbc7c35cdbf60bc28be1db

## Configuration

### MCP

Status: supported

Configure MCP servers in cline_mcp_settings.json under the mcpServers key (editable via the MCP Servers panel). Supports local stdio servers and remote servers over Streamable HTTP or legacy SSE.

- global: `~/.cline/data/settings/cline_mcp_settings.json` (json) — key: mcpServers — Shared by the VS Code extension, CLI, and SDK. Open via MCP Servers > Configure > Configure MCP Servers in the extension.
- global: `~/.cline/mcp.json` (json) — key: mcpServers — CLI MCP config (cline mcp wizard).
- project: `.cline/mcp.json` (json) — key: mcpServers — Project-level MCP server config (documented in the CLI reference).
- `command`: string — Command to start a local (stdio) server.
- `args`: string[] — Arguments passed to the command.
- `env`: record<string, string> — Environment variables for the server.
- `url`: string — Endpoint URL for a remote server.
- `type`: "streamableHttp" | "sse" — Remote transport type. Defaults to legacy sse when omitted. Values: streamableHttp, sse
- `headers`: record<string, string> — HTTP headers for a remote server (e.g. Authorization).
- `disabled`: boolean — Toggle a server off without deleting it.
- `autoApprove`: string[] — Tool names that run without per-call approval.
- transports: stdio, http, sse
- auth: headers, oauth
- Tools: supported
- Resources: supported — Auto Approve's 'Use MCP servers' setting covers MCP tools and resources.
- Omitting type on a remote server defaults to the legacy sse transport; set type to streamableHttp explicitly for the recommended transport.
- The Cline CLI reads ~/.cline/mcp.json and .cline/mcp.json (project) with the same server definitions; the extension shares config under ~/.cline/data/.
- Legacy installs stored the file in VS Code globalStorage (saoudrizwan.claude-dev/settings/cline_mcp_settings.json); the extension migrates it to ~/.cline/data/settings/.
- OAuth credentials for remote servers are stored under each server's oauth key (managed by the extension, verified from source).
- Per-tool auto-approval via the autoApprove array; the Auto Approve setting 'Use MCP servers' gates MCP tools and resources globally.

Local stdio server
```json
{
  "mcpServers": {
    "local-server": {
      "command": "node",
      "args": ["/path/to/server.js"],
      "env": { "API_KEY": "your_api_key" },
      "disabled": false,
      "autoApprove": []
    }
  }
}

```


Remote server (Streamable HTTP)
```json
{
  "mcpServers": {
    "remote-server": {
      "type": "streamableHttp",
      "url": "https://example.com/mcp",
      "headers": { "Authorization": "Bearer your-token" },
      "disabled": false,
      "autoApprove": []
    }
  }
}

```

Source: https://docs.cline.bot/mcp/mcp-overview
Checked: 2026-07-12

### Skills

Status: supported

SKILL.md skill folders with progressive loading: only name and description (~100 tokens) load at startup; the full instructions load when Cline triggers the skill via the use_skill tool or you invoke it as a slash command.

- project: `.cline/skills/<name>/SKILL.md` (markdown) — Recommended project location; commit to share with your team. .clinerules/skills/ and .claude/skills/ are also discovered.
- global: `~/.cline/skills/<name>/SKILL.md` (markdown) — Global skills available across all projects.
- `name`: string (required) — Skill identifier; must exactly match the directory name. Use kebab-case.
- `description`: string (required) — Tells Cline when to use the skill (max 1024 characters). Determines automatic triggering.
- invocation: automatic, /skill-name
- Skills can bundle supporting files (docs/, templates/, scripts/) that load only as needed; script output enters context, not the script itself.
- Every skill has an enable/disable toggle in the Skills menu; skills are enabled by default when discovered.
- When a global and project skill share a name, the global skill takes precedence.
- Keep SKILL.md under ~5k tokens; split detail into docs/ files referenced from the instructions.

Data analysis skill
```markdown
---
name: data-analysis
description: Analyze data files and generate insights. Use when working with CSV, Excel, or JSON data files that need exploration, cleaning, or visualization.
---

# Data Analysis

When analyzing data files, follow this process:

## 1. Understand the Data
- Read a sample of the file to understand its structure
- Identify column types and data quality issues

```

Source: https://docs.cline.bot/customization/skills
Checked: 2026-07-12

### Rules

Status: supported

Markdown rule files in .clinerules/ (workspace) and a global Cline Rules directory, with per-file enable/disable toggles and optional paths frontmatter for conditional activation. Cursor rules, Windsurf rules, and AGENTS.md are auto-detected.

- project: `.clinerules/` (markdown) — Primary format: directory of .md/.txt rule files at the project root (a single .clinerules file also works).
- project: `AGENTS.md` (markdown) — Standard cross-tool format, auto-detected at the project root.
- global: `~/Documents/Cline/Rules/` (markdown) — Global rules directory (Windows: Documents\Cline\Rules). ~/.cline/rules/ is also read.
- global: `~/.agents/AGENTS.md` (markdown) — Cross-tool global AGENTS instructions.
- `paths`: string[] — Frontmatter glob patterns that scope the rule; it activates when any pattern matches a file in the current context. Empty array disables the rule.
- Cline processes all .md and .txt files inside .clinerules/, combining them into a unified rule set; workspace rules win over global rules on conflict.
- Conditional rules use YAML frontmatter with a paths array of globs, matched against open tabs, visible files, files mentioned in your prompt, and files Cline edits. Rules without frontmatter are always active.
- Cross-tool formats are auto-detected: .cursorrules, .windsurfrules, AGENTS.md, and global ~/.agents/AGENTS.md.
- The /newrule slash command creates a rule interactively; the CLI/SDK also read global rules from ~/.cline/rules/.
- On Linux/WSL the global directory may be ~/Cline/Rules if ~/Documents/Cline/Rules does not exist.

Conditional rule scoped to React code
```markdown
---
paths:
  - "src/components/**"
  - "src/hooks/**"
---

# React Component Guidelines

When creating or modifying React components:
- Use functional components with React hooks
- Extract reusable logic into custom React hooks

```

Source: https://docs.cline.bot/customization/cline-rules
Checked: 2026-07-12

### Hooks

Status: supported

Executable hook scripts named after lifecycle events, placed in .clinerules/hooks/ (workspace) or the global hooks directory. Hooks receive event JSON on stdin and return JSON on stdout that can block execution or inject context.

- project: `.clinerules/hooks/<EventName>` (executable) — Executable script in any language with a shebang. File name must equal the event name, e.g. .clinerules/hooks/PreToolUse.
- global: `~/Documents/Cline/Hooks/<EventName>` (markdown) — Executable script, applies to all workspaces (see format caveat above). The CLI also reads ~/.cline/hooks/.
- `cancel`: boolean (required) — Hook output: false to continue, true to block execution and surface errorMessage.
- `contextModification`: string — Hook output: context added to the conversation for future AI decisions (max 50KB).
- `errorMessage`: string — Hook output: error details shown when blocking.
- events: TaskStart, TaskResume, TaskCancel, TaskComplete, UserPromptSubmit, PreToolUse, PostToolUse, PreCompact
- Hooks must be enabled via the 'Enable Hooks' checkbox in Cline settings (Feature Settings).
- Hook files carry no extension, need a shebang, and must be executable; Windows is not currently supported. Verified from the official repo's .clinerules/hooks/README.md.
- Output JSON: { cancel, contextModification, errorMessage }. cancel: true blocks execution; contextModification (max 50KB) affects future AI decisions, not the current tool call.
- TaskComplete and PreCompact are documented as 'coming soon'. All matching hooks (global + workspace) run concurrently; if any returns cancel: true, the action is blocked.
- Default timeout is 30 seconds. The CLI also reads ~/.cline/hooks/ and a directory set via --hooks-dir / CLINE_HOOKS_DIR; the docs site's hooks page additionally covers SDK plugin lifecycle hooks (beforeTool, afterRun, etc.).

PreToolUse hook blocking .js files in a TypeScript project
```bash
#!/usr/bin/env bash
input=$(cat)
tool_name=$(echo "$input" | jq -r '.preToolUse.toolName')
path=$(echo "$input" | jq -r '.preToolUse.parameters.path // ""')

if [[ "$tool_name" == "write_to_file" && "$path" == *.js ]]; then
  echo '{"cancel": true, "errorMessage": "Use .ts files only"}'
  exit 0
fi

echo '{"cancel": false}'

```

Source: https://docs.cline.bot/customization/hooks
Checked: 2026-07-12

### Commands

Status: supported

Built-in slash commands (/newtask, /smol, /newrule, /deep-planning, /reportbug), plus user-defined workflows: markdown files invoked by filename (e.g. /release.md) and enabled skills triggered as slash commands.

- project: `.clinerules/workflows/*.md` (markdown) — Workspace workflows, version-controlled with the repo.
- global: `~/Documents/Cline/Workflows/*.md` (markdown) — Global workflows for all projects (Windows: Documents\Cline\Workflows).
- invocation: /command, /workflow-name.md, /skill-name
- Workflows are manual-only markdown step lists; type / in chat to see autocomplete for built-ins, workflows, and enabled skills.
- Workflow files can reference Cline's built-in tools (e.g. ask_followup_question), CLI tools, and MCP tools, and chain steps in sequence.
- Workspace workflows take precedence over global workflows with the same name; each workflow has an enable/disable toggle in the Workflows tab.
- Workspace workflow location .clinerules/workflows/ verified from the official repo; the CLI/SDK also resolve global workflows from ~/.cline/data/workflows/.
- /smol has alias /compact.

PR review workflow (.clinerules/workflows/pr-review.md)
```markdown
1. Check out the PR branch: `gh pr checkout [id]`
2. Run the test suite and note any failures
3. Review the diff against our coding standards
4. Summarize findings and suggest changes

```

Source: https://docs.cline.bot/core-workflows/using-commands
Checked: 2026-07-12

### Settings

Status: partial

Extension behavior (Auto Approve permissions, YOLO Mode, feature toggles) is configured through the Cline settings UI; persistent configuration lives under ~/.cline/ in documented settings files shared by the IDE extension, CLI, and SDK.

- global: `~/.cline/data/settings/global-settings.json` (json) — Global settings shared across Cline applications (IDE, CLI, SDK).
- global: `~/.cline/data/settings/providers.json` (json) — API keys and model provider configuration.
- project: `.cline/` (json) — Project config root (rules/, skills/, hooks/, plugins/, mcp.json); directories hold markdown/scripts rather than a single JSON settings file.
- `CLINE_COMMAND_PERMISSIONS`: string (JSON) — Environment variable restricting shell commands: { allow: string[], deny: string[], allowRedirects: boolean }.
- `CLINE_DATA_DIR`: string — Environment variable overriding the data directory (default ~/.cline/data).
- Auto Approve is evaluated per tool call with per-category permissions (read/edit project or all files, safe/all commands, browser, MCP); YOLO Mode auto-approves everything.
- Field-level schemas for global-settings.json and providers.json are not documented; the directory layout is.
- CLINE_COMMAND_PERMISSIONS env var applies a JSON allow/deny policy for shell commands, e.g. {"allow": ["npm *"], "deny": ["rm -rf *"]}; deny overrides allow.
- CLINE_DATA_DIR overrides the data directory; enterprise deployments add remote-managed provider config and controls (YOLO Mode lockdown, MCP allowlists).

Command permission policy
```json
{
  "allow": ["npm *", "git *"],
  "deny": ["rm -rf *"],
  "allowRedirects": false
}

```

Source: https://docs.cline.bot/getting-started/config
Checked: 2026-07-12

## Search, browser & identification

Not researched. Unknown does not mean unsupported.
