# Zektor MCP server

> Allows an AI client to manage managed Postgres databases and Valkey caches, including provisioning, scaling, and storage adjustments.

- Repository: https://github.com/m-akcan/zektor-cli
- Page: https://hostedmcp.org/servers/m-akcan/zektor-cli
- Transport: stdio
- Stars: 1
- License: MIT
- Latest version: 1.7.1

## Install

### Claude Code

```sh
claude mcp add --env 'ZEKTOR_TOKEN=<YOUR_ZEKTOR_TOKEN>' zektor-cli -- npx -y zektor
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "zektor-cli": {
      "command": "npx",
      "args": [
        "-y",
        "zektor"
      ],
      "env": {
        "ZEKTOR_TOKEN": "<YOUR_ZEKTOR_TOKEN>"
      }
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "zektor-cli": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "zektor"
      ],
      "env": {
        "ZEKTOR_TOKEN": "<YOUR_ZEKTOR_TOKEN>"
      }
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"zektor-cli","type":"stdio","command":"npx","args":["-y","zektor"],"env":{"ZEKTOR_TOKEN":"<YOUR_ZEKTOR_TOKEN>"}}'
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "zektor-cli": {
      "command": "npx",
      "args": [
        "-y",
        "zektor"
      ],
      "env": {
        "ZEKTOR_TOKEN": "<YOUR_ZEKTOR_TOKEN>"
      }
    }
  }
}
```

### Codex

```sh
codex mcp add zektor-cli --env 'ZEKTOR_TOKEN=<YOUR_ZEKTOR_TOKEN>' -- npx -y zektor
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.zektor-cli]
command = "npx"
args = ["-y", "zektor"]

[mcp_servers.zektor-cli.env]
ZEKTOR_TOKEN = "<YOUR_ZEKTOR_TOKEN>"
```

### Gemini CLI

```sh
gemini mcp add -s user -e 'ZEKTOR_TOKEN=<YOUR_ZEKTOR_TOKEN>' zektor-cli npx -- -y zektor
```

### Gemini settings.json (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "zektor-cli": {
      "command": "npx",
      "args": [
        "-y",
        "zektor"
      ],
      "env": {
        "ZEKTOR_TOKEN": "<YOUR_ZEKTOR_TOKEN>"
      }
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `ZEKTOR_TOKEN` | no | yes | Access token from Settings → Access tokens. Without one, the server can still create trial databases. |

## Tools (9)

- `create_trial_database`
- `get_action`
- `get_connection`
- `get_storage`
- `create_instance`
- `scale_instance`
- `resize_storage`
- `set_autoscale`
- `delete_instance`

## FAQ

### Can I try Zektor without an account?

Yes, you can create a free Postgres database that lasts for one hour with no account required using the 'zektor try' command.

### How do I prevent the AI from accidentally deleting my databases?

The delete tool is disabled by default and only becomes available if you explicitly set the ZEKTOR_MCP_ALLOW_DESTRUCTIVE environment variable to 1.

### Can I shrink my Postgres storage if I am paying for too much?

No, storage can only be grown and never shrunk. To pay for less, you must migrate your data to a new database and delete the old one.

### How does the MCP server authenticate?

It uses the same authentication token you have already configured via the Zektor CLI login process.
