# claude-code

> For the complete documentation index, see [llms.txt](https://docs-stg.ringleader.dev/llms.txt).


> Claude Code works on a workstation with no configuration. This is for when you want MCP servers, your own settings, or to change a default.


Install the [`claude-code` devtool](https://docs-stg.ringleader.dev/reference/tools/devtools/claude-code/) and
Claude Code is ready to use, with the defaults listed under
[Claude Code defaults](https://docs-stg.ringleader.dev/workstations/coding-agents/coding-agent-setup/#claude-code-defaults). You do not need a toolconfig for them.

Add a toolconfig when you want more:

```yaml
toolconfigs:
  - id: claude-code
    name: claude-code
    config:
      mcpServers:
        linear:
          type: http
          url: https://mcp.linear.app/mcp
```

That gives every developer on the workstation the Linear MCP server, in both the
terminal `claude` and the editor panels. The rest of this page covers
[MCP servers](#mcp-servers) in full, [your own settings](#settings),
[changing a default](#claude-code-defaults),
[claude.ai connectors](#claudeai-connectors), and [the field list](#config-fields).

## MCP servers

`mcpServers` is a map of server name to definition.
[MCP servers for coding agents](https://docs-stg.ringleader.dev/workstations/coding-agents/mcp-servers/#mcp-servers-in-claude-code)
explains where Ringleader adds them and how to sign in to one.

| Field | Type | Description |
|-------|------|-------------|
| `type` | `string` | `http`, `sse`, or `stdio`. Defaults to `stdio` when `command` is set, otherwise `http`. |
| `url` | `string` | Required for `http` and `sse`. |
| `headers` | `object` | Header name to value, for `http`/`sse`. May carry secret references. |
| `command` | `string` | Required for `stdio`. |
| `args` | `array` of `string` | Arguments for `stdio`. |
| `env` | `object` | Environment for a `stdio` server. May carry secret references. |

```yaml
toolconfigs:
  - id: claude-code
    name: claude-code
    config:
      mcpServers:
        linear:
          type: http
          url: https://mcp.linear.app/mcp
        github:
          type: http
          url: https://api.githubcopilot.com/mcp/
          headers:
            Authorization: "Bearer ${secret:gh-token/token}"
```

Servers are applied the first time the workstation sets itself up and again only when
the declared set changes, so a login you completed interactively (with `/mcp` in
Claude) is not disturbed by a routine re-apply. When the set changes, each declared
server is re-added and any server Ringleader previously added that you have since
removed is removed. Servers you added yourself are never touched. An empty
`mcpServers: {}` is valid: manage zero servers, which removes the ones Ringleader added.

## Settings

Claude Code reads two settings files, and this toolconfig can write both:

- `settings` is the **user** layer, `~/.claude/settings.json`, owned by the login user.
  Ringleader writes only the keys you declare and leaves every other key alone, so a
  setting a developer changed inside Claude Code survives every configuration pass.
  Remove a key from your declaration and it is removed from the file on the next pass.
- `managedSettings` is the **managed** layer, `/etc/claude-code/managed-settings.json`,
  owned by root. It is the same file a corporate device-management policy would write,
  it takes precedence over the user layer, and Ringleader writes it in full.

Put a preference in `settings` and a rule in `managedSettings`.

## Claude Code defaults

Ringleader writes its Claude Code defaults into the managed layer.
[Claude Code defaults](https://docs-stg.ringleader.dev/workstations/coding-agents/coding-agent-setup/#claude-code-defaults)
lists them and the key that sets each one. To change a default, set its key in
`managedSettings`, and your value replaces Ringleader's.

## claude.ai connectors

`claudeAiConnectors: deny` writes `disableClaudeAiConnectors: true` and
`disableSideloadFlags: true` into the managed layer.
[claude.ai connectors in Claude Code](https://docs-stg.ringleader.dev/workstations/coding-agents/mcp-servers/#claudeai-connectors-in-claude-code)
shows an example and explains what each key does.

## Workspace trust

Folders in `sources[].path` and `trustedFolders` are pre-trusted for the CLI, so it
never opens with a trust prompt on the code the workstation exists to work on.
Ringleader merges those flags into Claude's own state file; a folder already trusted is
left alone.

## `config` fields

| Field | Type | Description |
|-------|------|-------------|
| `mcpServers` | `object` | MCP servers to add at user scope, as above. |
| `settings` | `object` | The user settings layer; only the keys you declare are managed. |
| `managedSettings` | `object` | The managed settings layer, written in full, root-owned. |
| `claudeAiConnectors` | `string` | `allow` (the default) or `deny`: whether the signed-in account's claude.ai connectors may be used, as above. `allow` writes nothing. Any other value fails the toolconfig. |

## Notes

- `mcpServers` needs the `claude` CLI on the workstation; declare the
  [`claude-code` devtool](https://docs-stg.ringleader.dev/reference/tools/devtools/claude-code/) or the
  apply step fails with a clear message.
- Secret-bearing headers and environment values reach Claude through the environment
  and are never written into a script or a diagnostic record.
- The editor panels ignore the CLI's managed settings. To set panel behavior, use the
  [`vscode-web`](https://docs-stg.ringleader.dev/reference/tools/tool-configuration/vscode-web/) or
  [`vscode-server`](https://docs-stg.ringleader.dev/reference/tools/tool-configuration/vscode-server/) toolconfig.

