Metadata-Version: 2.4
Name: pdtk-val-mcp
Version: 0.1.2
Summary: MCP server for Predictika Validator/Configurator
Requires-Python: >=3.12
Description-Content-Type: text/markdown
Requires-Dist: mcp<2,>=1.10
Requires-Dist: requests>=2.31
Requires-Dist: pyyaml>=6.0

# Predictika Validator MCP

An MCP (Model Context Protocol) server for validating Predictika models and launching Predictika Validator/Configurator servers on the Predictika platform.

Note: the MCP server itself runs locally (or wherever you host it), but the validator/configurator servers it launches and deletes are **remote** -- they are provisioned on and torn down from Predictika's own infrastructure, not on the machine running this MCP server.

## Installation

```bash
uv tool install pdtk-val-mcp
```

## Configuration

The server uses the following environment variables.

### Required

| Variable                  | Description                          |
| ------------------------- | ------------------------------------- |
| `PREDICTIKA_API_KEY`      | Predictika API key used for authentication. |
| `PREDICTIKA_API_BASE_URL` | Predictika validator endpoint, e.g. `https://partner.predictika.com/validator`. |

Example:

```bash
export PREDICTIKA_API_KEY=<your-api-key>
export PREDICTIKA_API_BASE_URL=<your-validator-base-url>
```

### Optional

| Variable                   | Default           | Description                              |
| --------------------------- | ----------------- | ---------------------------------------- |
| `PREDICTIKA_MCP_LOG_FILE`  | Logging disabled  | Write server logs to the specified file. |
| `PREDICTIKA_MCP_LOG_LEVEL` | `INFO`            | Logging level.                           |

## MCP Client Setup

### Claude Code

```bash
claude mcp add predictika-validator \
  --env PREDICTIKA_API_KEY="$PREDICTIKA_API_KEY" \
  --env PREDICTIKA_API_BASE_URL="$PREDICTIKA_API_BASE_URL" \
  -- predictika-validator-mcp
```

### Codex CLI

```bash
codex mcp add predictika-validator \
  --env PREDICTIKA_API_KEY="$PREDICTIKA_API_KEY" \
  --env PREDICTIKA_API_BASE_URL="$PREDICTIKA_API_BASE_URL" \
  -- predictika-validator-mcp
```

## Updating

To upgrade to the latest released version:

```bash
uv tool upgrade pdtk-val-mcp
```

## Tools

The server exposes the following MCP tools:

* `validate_model` — Validates a Predictika model.
* `launch_validator` — Launches a **remote** Predictika Validator/Configurator server for a Predictika project, on Predictika's infrastructure.
* `validate_choices` — Validates a set of user choices against a running Predictika Validator/Configurator session.
* `reset_session` — Resets a running Predictika Validator/Configurator session.
* `delete_validator` — Deletes a launched **remote** Predictika Validator/Configurator server for a project. Destructive and not reversible.
