# Agent & MCP

[← Back to README](../README.md)

K3 Studio drives **Claude Code** (the `claude` CLI) in its stream-JSON mode. `Ctrl+L` toggles the panel.

## Agent panel

![Agent panel with an edit hunk](images/agent.png)

- Chat, with each step shown as it happens (Read, Edited…)
- **Edits are hunks** you accept or reject, or you can turn on *Always accept edits*
- The composer wraps and grows. You can attach images, and the open file and the console come along as context chips.
- Model and effort pickers (changing them resumes the same conversation)
- Sessions you can switch between and resume
- Claude Code starts warming up while you're still typing

![Slash commands](images/agent_slash.png)

Type `/` to get suggestions for Claude Code commands and skills.

## Permissions

When the agent wants to use a tool, you get a card in the panel: **Ask** each time, or **Always allow** for the rest of the session.

## K3 Studio as an MCP server

K3 Studio runs an MCP server over HTTP on `127.0.0.1`, protected by a token, and attaches it to Claude Code. Your own MCP servers still load as usual.

| Tool | What it does |
|---|---|
| `server_status` | Is the server running, and from which folder |
| `server_console` | Recent console lines |
| `server_command` | Run a console command |
| `runtime_errors` | Errors the error lens has collected |
| `diagnostics` | Problems from the language servers |
| `open_file` | Open a file in K3 Studio |
