---
title: MCP server
description: Let your AI assistant manage your Zeitlos project — tables, fields and settings — while it writes your code.
---

Zeitlos exposes an MCP server, so an AI assistant can manage your project directly: create
tables, add fields, define profile fields and read your project's configuration.

## Connect

The server is at:

```text
https://mcp.zeitlos.app/mcp
```

Add it to your assistant. For Claude Code:

```bash title="Terminal"
claude mcp add --transport http zeitlos https://mcp.zeitlos.app/mcp
```

Or in an `.mcp.json` file:

```json title=".mcp.json"
{
  "mcpServers": {
    "zeitlos": {
      "type": "http",
      "url": "https://mcp.zeitlos.app/mcp"
    }
  }
}
```

You'll need to authenticate the MCP before using it, e.g. running `/mcp` in Claude.

## What it can do

| Area           | Examples                                                                           |
| -------------- | ---------------------------------------------------------------------------------- |
| Database       | List tables, describe a table, create tables, add fields, query and create records |
| Authentication | List and add profile fields, read auth settings                                    |
| Project        | Read project details and configuration                                             |

Tools are gated on what the project actually has — database tools appear once the database
is enabled, auth tools once authentication is.

## A typical flow

Ask for the schema you need in plain language:

:::prompt
Create a `posts` table with a `title` text field, a `published` boolean and a `author`
relation to the `users` table.
:::

Then write the code against it. Because the assistant created the schema, the code it
writes and the database it writes to stay in sync.

> [!TIP]
> The `@zeitlosapp/sdk` package ships an `AGENTS.md` alongside it. If your assistant reads
> the package, it picks up the SDK conventions without you explaining them.

## Local development

`npx @zeitlosapp/cli dev` runs a local Zeitlos emulator — database, auth and its own MCP server — on
your machine. It prints the local MCP port on startup:

```bash title="Terminal"
claude mcp add --transport http zeitlos-local http://localhost:7312/mcp
```

The local server announces itself as the local project, so an assistant connected to both
this and the production server won't mix them up.

Because schema lives in the project and not in your repository, a local project starts
empty. Either ask your assistant to create the tables your code needs, or have it mirror an
existing cloud project:

:::prompt
Using the production Zeitlos MCP, list the tables in project `my-app` and describe each
one. Then recreate that exact schema in the local database via the `zeitlos-local` MCP.
:::

That copies **schema, not data** — ask for specific rows too if you want sample data.

See [Local development](/database/local-development/) for the rest of the local database
workflow, including generating types.
