# Connect your AI coding tool to Aymu (MCP)

> Let Claude Code, Codex, Cursor or VS Code search the Aymu library and install templates and sections into your project.

Canonical page: <https://aymu.dev/mcp>

Server address (Streamable HTTP, sign in through the browser; no API key goes in the URL): <https://mcp.aymu.dev/mcp>

Full guide: <https://aymu.dev/docs/mcp>

## How it works

MCP (Model Context Protocol) is an open standard for connecting AI tools to outside services. The Aymu MCP server lets an
AI coding tool, like Claude Code, Codex or Cursor, search the design library, read the details of a template or
section and, with your permission, prepare an install. You ask in plain words; the tool does the searching and
setup.

The server never writes to your computer. Files are written only by the command-line installer that runs in your own
terminal, after it has checked the download and shown you every file it will add.

You only need this for Astro projects in tools that can run commands. In Lovable, Bolt, Replit or any other AI
builder, copy the AI prompt from the design's page instead.

## Connecting

Add the server to your AI tool with the command or configuration on the [MCP page](/mcp), then start a session. The
tool opens a browser page where you sign in and choose what it may do. No API key or password goes into any
configuration file. Each connection is listed in your dashboard, where you can disconnect it.

## Permissions

| Permission    | What it allows                                                                                                         |
| ------------- | ---------------------------------------------------------------------------------------------------------------------- |
| `mcp:read`    | Search templates and sections, read product details, list categories and recent releases, read your favorites and plan |
| `mcp:write`   | Create a selection board of candidate products for you to review, and add or remove favorites                          |
| `mcp:install` | Prepare an install of designs your purchase or plan covers, as a short-lived single-use grant for the installer        |

You can leave `mcp:install` unticked. The tool can then still search and suggest designs, but not prepare installs.

## Search

Search is keyword search over titles, summaries, tags and categories, with a fixed list of synonyms. When nothing
matches, the server says so and returns popular products instead, marked as a fallback.

## Selection boards

When your AI tool suggests several designs, it creates a selection board. You open the board's link, tick the items
you want and submit it. Only the items you selected can be installed together.

## Installing

1. Your AI tool runs the installer with `--begin` to create a one-time challenge on your machine.
2. It asks the server to prepare the install for the designs you chose. The server checks your access for each
   item and returns a single-use grant.
3. The installer redeems the grant and downloads each release (the published, versioned files of a design). It
   checks the signature and every file's checksum, shows the planned file changes and writes them only if nothing
   would be overwritten.

Hosted chat apps cannot run commands on your computer. There you run the installer yourself in a terminal, paste the
printed challenge into the chat, and pipe the returned grant back to the installer.

## What the server can and cannot see

The server records tool calls, access decisions, grants and downloads, and the installer's own report of the result.
It cannot see your files, your project, whether a build succeeded, or your conversation with the agent.

## Testing the connection

The official MCP Inspector lists the tools a server offers. Without signing in it shows the authorization challenge,
which is the expected first response. Replace `<server-url>` with the address on the [MCP page](/mcp).

```sh
npx @modelcontextprotocol/inspector --cli <server-url> --transport http --method tools/list
```

In your client, ask: "List the Astro section categories you can search."

## Troubleshooting

- **The client says it is not authorized.** Start the client's sign-in again (for example `/mcp` then
  Authenticate). Connections also end when you disconnect them from the dashboard.
- **An item is refused.** The reason is returned for each item: for example the design is not part of your
  purchases or plan, your email is not verified, or the daily fair-use limit was reached.
- **The installer refuses to write.** It found an existing file at a target path, an unexpected or unsafe archive
  entry, or a checksum that does not match the manifest (the signed list of files that ships with every release).
  Nothing has been written. Read the message, then retry.

## Disconnecting

Disconnect a client from **Dashboard → Connections**. Its tokens stop working, and installs it prepared but did not
finish are canceled.

## Questions

### Is the download the same as what my AI tool installs?

Yes. The website download, an install from your AI coding tool and the npx aymu command all deliver the same files for each version of a design. Each download also has a checksum you can compare to confirm nothing changed on the way. The downloads guide shows how to check it.

### Does it work with Claude Code, Cursor or Codex?

Yes. Paste the AI prompt and the tool installs the original Astro source code into your project, through the Aymu MCP server or the npx aymu command. You see every file before anything is written, and existing files are never overwritten.

### Does it work with Lovable, Bolt or other AI builders?

Only if the tool can connect an MCP server or run terminal commands. The AI prompt holds no code: your tool signs in to your Aymu account through the MCP server or the CLI, and Aymu checks your access at install time. In a tool that can do neither, download the code from the product page instead.

### Will installing a section overwrite my files?

No. The installer shows every file it would add before it writes anything, and it refuses to overwrite a file you already have. It stops if a download looks unsafe, for example a file that points outside your project. If a section needs npm packages, it lists them for you to install instead of installing them itself.

### Which AI tools can install designs for me?

Tools that can run commands in your terminal can run the installer themselves: Claude Code, Codex, and Cursor or VS Code with terminal commands turned on. Chat apps that can't run commands can still search the library, and you run the install command in your own terminal. The MCP page lists each tool.

### Do I paste an API key into my AI tool?

No. Connecting a tool opens a sign-in page in your browser (OAuth). No permanent key goes into any settings file, and you can disconnect a tool from your dashboard at any time.

### What can the Aymu MCP server see?

It records what your tool asks for, whether access was allowed, which installs and downloads happened, and the result the installer reports. It can't see your files, your project, whether your build worked, or your conversation with the AI tool. The server never writes to your computer. Only the installer you run does.

### My app says it is not authorized or shows no tools. What now?

Sign in again from the app (in Claude Code, run /mcp and choose Authenticate), then start a new session. If an install is refused, your tool gets the reason for each design, for example it is not in your purchases or plan, your email is not verified yet, or the daily fair-use limit was reached.

### How do I disconnect an app?

Open Dashboard → Connections and disconnect it. Its access ends at once, and any install it started but did not finish is canceled.
