# Configuration

Configure CrabTalk — config.toml, models, MCP servers, and agents.

The recommended way to configure CrabTalk is with `crabtalk config`, which walks you through model setup interactively. On first run, `crabtalk` prompts you automatically.

You can also edit the configuration file directly at `~/.crabtalk/config.toml`.

## Quick setup

```
crabtalk config
```

This adds or edits model providers, API keys, and MCP servers. Run it again any time you want to change your configuration.

## Configuration file

The file at `~/.crabtalk/config.toml` can be edited directly for full control. See the [full example config](https://github.com/crabtalk/crabtalk/blob/main/crates/daemon/config.toml) for all available options.

### Default agent

The `[system.crab]` section configures the daemon's default agent:

```
[system.crab]
model = "deepseek-chat"
thinking = false
```

The `model` field references a model name from a `[provider.*]` section.

### Providers

Each provider gets a `[provider.<name>]` section with a `models` list:

```
[provider.deepseek]
models = ["deepseek-chat", "deepseek-thinking"]
api_key = "sk-..."

[provider.anthropic]
models = ["claude-sonnet-4-20250514"]
api_key = "sk-ant-..."
kind = "anthropic"
```

Supported kinds: `openai` (default), `anthropic`, `google`, `ollama`, `azure`. See [providers](/content/docs/crabtalk/providers/index.html) for the full list.

### MCP servers

Register external tool servers in `~/.crabtalk/local/CrabTalk.toml`:

```
[mcps.filesystem]
command = "npx"
args = ["-y", "@modelcontextprotocol/server-filesystem", "/home/user/docs"]
```

### Agents

Define sub-agents in `~/.crabtalk/local/CrabTalk.toml` (in addition to Markdown files in `local/agents/`):

```
[agents.researcher]
description = "Research specialist"
model = "claude"
max_iterations = 32
thinking = true
members = ["writer"]
```

## What's next

- [Commands](/content/docs/crabtalk/commands/index.html) — gateway and search setup
- [Agents](/content/docs/crabtalk/agents/index.html) — agent configuration and delegation
- [MCP Servers](/content/docs/crabtalk/mcp-servers/index.html) — connect external tool servers

### Tutorials

Step-by-step guides for setting up and extending CrabTalk.

### REPL

Interactive chat with your agent — slash commands, tab completion, streaming output.
