---
title: Coding agents (MCP)
description: Claude Code, Cursor, Codex and other agents working on your app through Sluurp's MCP server, with the admin's tools.
section: AI
order: 3
---

# Coding agents (MCP)

Claude Code, Cursor, Codex and other agents working on your app through Sluurp's MCP server, with the admin's tools.

Sluurp is an MCP server. Claude Code, Cursor, Codex, Claude Desktop or any agent that speaks the Model Context Protocol can work on your app with it: make and change components, see them at every size, press and type in them, review their design, run their tests, and use any admin screen. To connect Claude Code:

```sh title="Terminal"
claude mcp add --transport http sluurp http://localhost:8090/mcp
```

Cursor, Windsurf, Claude Desktop and others take it in their `mcp.json`:

```json title="mcp.json"
{ "mcpServers": { "sluurp": { "url": "http://localhost:8090/mcp" } } }
```

Features include:

- Sign-in with OAuth, with no key to copy
- Tools to read and write the app's files, collections and content
- Pages seen at a phone's, a tablet's and a desktop's width at once
- The admin's screens and a person's hands on the page, even with no admin open
- Every call listed as it happens, and files an agent wrote put back with **Undo**

## Sign the agent in

The agent signs in with OAuth: it opens a page here where you, signed in to the admin, allow it to read and write, or only to read. Its key is listed in **AI → Agents** under its name, and removing it there signs it out.

You can also make a key by hand in **AI → Agents** (named, read-only or read-write) and send it as `Authorization: Bearer <key>`.

## When nobody has the admin open

An agent doesn't need you to keep the admin open. When it asks for the admin's tools and no admin is open, Sluurp starts the browser on its machine (Chrome, Edge or Chromium, or the one `SLUURP_BROWSER` names) without a window. It signs the browser in as the project's first superuser with a link that works once, and opens the UI Kit there. The browser closes after ten minutes without a call. Opening the admin yourself takes over from it.

## The admin's own agent

With a model set up (**AI**), the sparkles button in every screen's header opens an agent in the admin itself. It has the same tools as an outside agent: any screen, the admin's API, a person's hands on the page, and whatever the screen you're on offers.

## Watch and undo

**AI → Agents → Activity** lists every call agents make, as they make them, with what it came to. A file an agent wrote has **Undo**, which puts it back as it was, or takes it away if it was new. While an agent works in the admin, a pill at its foot says what it's doing, and whatever it presses or types into is outlined for a moment.

When an agent writes a component, its tests run in the open Storyboard, and the results come back with the answer.

## Tools

The server's own tools are always there:

| Tool | What it does |
|---|---|
| `describe` | The app at a glance: its collections, fields and rules, and its files by kind. Agents read this first. |
| `list_components` | Every component's story file. |
| `list_files` | Every file of the app, by the path the other tools take. |
| `read_file`, `search_file` | A file by the path it's served at, numbered. |
| `write_file`, `edit_file` | A new file, or exact edits to one. Nothing is written that doesn't compile. Only while developing. |
| `check_compile` | Whether some TSX compiles, and the kit's warnings. |
| `data_model` | The app's collections and their fields. |
| `create_collection`, `update_collection` | Make or change a collection: its fields and rules, checked as the admin checks them. |
| `look_at_page`, `measure_page` | A page of the app at several widths at once (a phone, a tablet, a desktop), as pictures or as numbers. |
| `design_guide` | How to design a Sluurp site or app so it looks good at every size. |
| `find_photos`, `add_photo`, `illustrate` | Free photos from Unsplash, saved into the app, and SVG illustrations in the page's colours. |
| `translate` | The app's missing translations, written for a person to review in **Translations**. |
| `content_model`, `list_entries`, `read_entry`, `list_drafts`, `list_media` | The site's content: what is published, drafts, pictures. With the `content` plugin. |
| `save_draft` | A draft of content, sent for a person to review and publish. Agents never publish. With the `content` plugin; see [Drafts and publishing](/docs/content). |

### The admin's tools

While the admin is open in a browser, its tools come too, run there as a person would use them:

- **Any screen:** `admin_screens`, `open_admin_screen`, `read_admin_page`, and `admin_api` for any call the admin makes.
- **Hands on a page:** `press`, `hover`, `type_text`, `press_key`, `drag`, `scroll`, `inspect` (classes, box, computed style, and the source line it came from) and `screenshot` (given to the agent as an image). They work on a frame by its id, or on the admin's own page with `frame: "admin"`, finding elements by CSS selector, by their words, or by a point.
- **The Storyboard, while it's open:** the tools its own agent has, including `open_component`, `look` at every frame, `review_design`, `run_tests`, the Playground's code and props, its frames and `zoom_canvas`.
- **Hawkeye, while it's open:** `list_screens`, `go_to_screen` (signed out too), `list_frames` and `read_frame`, and the same hands on the site's frames.

### Prompts

Prompts come with it, as slash commands in the agent: `new-component`, `improve-component`, `fix-design`, `design` and `translate`.

## Security

- Without a key, `/mcp` answers nothing but where to sign in.
- Keys are kept only as their SHA-256, and each works on one project.
- A read-only key sees and calls only the tools that change nothing.
- Files are written only while developing, and only TSX or TypeScript under the kit or the app.
- The admin's tools run as the superuser whose admin is open, in their browser.
