# Codata — agent directory (connect your coding agent)

Tested setup per client. Codata is a backend worker your agent delegates to over
MCP: it designs and operates the data, auth, storage, email, AI agents, the AI
Gateway, and hosting, while your agent builds the app.

**Before anything else, fetch the skill file — it is the authoritative protocol:**
https://codata.io/skill.md

**MCP endpoint:** `https://mcp.codata.io/mcp` (streamable HTTP; OAuth login opens
in the browser on first use). Raw-primitives surface: `https://mcp.codata.io/mcp/full`.
Legacy tool names: `https://mcp.codata.io/mcp/compat/v1`.

## The one prompt that sets everything up

Paste this into your agent (works in any MCP-connected client):

> I'm using Codata as my backend platform. Fetch https://codata.io/skill.md and
> follow it: connect to the Codata MCP server at https://mcp.codata.io/mcp,
> call `link_project` to declare yourself, then read `fetch-docs` (getting-started)
> for capabilities and limits before planning anything.

## One-liner setup (any editor)

```bash
npx @codata-io/cli init        # auto-detects your editor and writes the MCP config
```

Variants: `codata init -e cursor` (target a specific editor) · `codata init -g`
(global user settings) · `codata init -y --skip-login` (non-interactive).

## Claude Code

`.mcp.json` in the project root:

```json
{
  "mcpServers": {
    "codata": {
      "url": "https://mcp.codata.io/mcp"
    }
  }
}
```

Or: `claude mcp add --transport http codata https://mcp.codata.io/mcp`

## Cursor

`.cursor/mcp.json`:

```json
{
  "mcpServers": {
    "codata": {
      "type": "http",
      "url": "https://mcp.codata.io/mcp"
    }
  }
}
```

## VS Code (Copilot Chat)

`.vscode/mcp.json`:

```json
{
  "servers": {
    "codata": {
      "type": "http",
      "url": "https://mcp.codata.io/mcp"
    }
  }
}
```

Or install the **Codata for VS Code** extension — Copilot Chat gets the tools
immediately; use `@codata` in chat. Details: https://codata.io/docs/vscode-extension

## Claude Desktop

Settings → Connectors → Add custom connector → URL `https://mcp.codata.io/mcp`.
Claude Desktop is a chat client (no repo write access) — declare
`clientKind: "chat"` in `link_project` and Codata builds and hosts the app itself.

## Windsurf

`~/.codeium/windsurf/mcp_config.json`:

```json
{
  "mcpServers": {
    "codata": {
      "serverUrl": "https://mcp.codata.io/mcp"
    }
  }
}
```

## Codex

`~/.codex/config.toml`:

```toml
[mcp_servers.codata]
url = "https://mcp.codata.io/mcp"
```

## After connecting — the protocol in one breath

`link_project` (declare code_agent vs chat) → `plan_backend_change({intent})` with
the WHOLE backend need → poll `get_task` → `apply_backend_plan({planId})` →
`get_project_context` for your obligations → build against `inspect_contract` +
`generate_client` → `publish_app` → go live (free domain + managed email included).
The full contract, rules, and limits live in https://codata.io/skill.md — read it first.

Third-party API keys the app reads via `process.env` are **workspace secrets**:
check `workspaces-listSecrets` (status `needs_value` = declared but empty),
register a missing key with `workspaces-declareSecret` (name only — values never
cross MCP), and hand the user the `workspaces-getSecretsUrl` link to enter the
value. It injects as a server-only env var at deploy. Never hardcode a key,
never ask for one in chat.

More: docs index for agents at https://codata.io/llms.txt · MCP setup page
https://codata.io/docs/mcp-setup · CLI https://codata.io/docs/cli
