# Python Code Validator (remote · api.statemind.ai)

Validates AI-generated Python: syntax, lint, security scan and deterministic repair.

- Trust score: 61/100 (medium)
- Registry status: active
- Liveness: live
- Owner verified: no
- Last scored: 2026-08-08

## Components

- remote · `api.statemind.ai`: 61/100 (this document), [markdown](https://verifymcp.io/servers/jkanselaar-python-code-validator/api.md), [page](https://verifymcp.io/servers/jkanselaar-python-code-validator/api)

## Channel facts

- Endpoint: `https://api.statemind.ai/mcp`
- Transports: `streamable-http`
- Auth: `required`
- Version: `1.1.1`

## Trust breakdown

How this component scores in each security and reliability category. Every signal is checked automatically against the live server, and we only credit what we can confirm. Scores are 0–100 per category. Scoring method: https://verifymcp.io/docs/scoring (what has changed: https://verifymcp.io/docs/scoring/changelog)

Scored 2026-08-08.

- **Endpoint Security**: 83/100
  - The endpoint's TLS certificate is valid, in date, and uses a strong key.
  - Authorisation is enforced on tool calls, but the challenge carries no valid RFC 9728 metadata, so a client cannot discover where to get a token.
  - HTTPS is enforced; there's no plaintext access path.
  - HSTS check failed: the Strict-Transport-Security header is absent.
  - DNSSEC check failed: this domain isn't protected by DNSSEC.
- **Transport & Reachability**: 100/100
  - Verified streamable-http transport via a live MCP handshake.
- **Schema Quality & AI Usability**: 38/100
  - AI-judged instruction clarity (fair).
  - Context-footprint check failed: tool/resource definitions use about 318 tokens (~318/item across 1 items; 1 tools + 0 resources), over budget; trim descriptions and params.
  - Usage-examples check failed: none of the tools include examples.
- **Stability & Change Management**: 3/100
  - Stability observed for 1 of 30 days with no destabilising changes; credit accrues until the full window elapses.
- **Tool Coverage**: 71/100
  - 100% of tools have a non-trivial description (not blank, and not just the tool's name).
  - 0% of tool parameters carry a description.
  - Structured output schemas are declared (100% of tools); any adoption earns full credit.
- **Capabilities**: 60/100
  - Spec-recency check failed: implements MCP spec 2025-06-18; the latest is 2026-07-28.

## Install

### Claude

```bash
claude mcp add --transport http jkanselaar-python-code-validator https://api.statemind.ai/mcp
```

### Codex

```toml
[mcp_servers.jkanselaar-python-code-validator]
url = "https://api.statemind.ai/mcp"
```

### opencode

```json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "jkanselaar-python-code-validator": {
      "type": "remote",
      "url": "https://api.statemind.ai/mcp",
      "enabled": true
    }
  }
}
```

### OpenClaw

```bash
openclaw mcp add jkanselaar-python-code-validator --url https://api.statemind.ai/mcp --transport streamable-http
```

### Hermes

```yaml
mcp_servers:
  jkanselaar-python-code-validator:
    url: "https://api.statemind.ai/mcp"
```

### Other

```json
{
  "mcpServers": {
    "jkanselaar-python-code-validator": {
      "type": "http",
      "url": "https://api.statemind.ai/mcp"
    }
  }
}
```

The mcpServers block is a cross-client convention. Remote transports vary, so check your client's docs.

## Changelog

Every change recorded for this component, newest first. Days that predate change tracking, or that we cannot explain, say so: "we were watching and nothing happened" and "we were not watching" are different claims.

### 2026-08-08 (score 61, 0)

- [functional improvement] Stability: unverified → 0.03

### 2026-08-07 (score 61, +28)

- [security improvement] Transport: unverified → pass
- [security] Authorization: Authorisation is enforced on tool calls, but the challenge carries no valid RFC 9728 metadata, so a client cannot discover where to get a token.
- [functional regression] MCP protocol: unverified → fail
- [functional improvement] Tool coverage: unverified → 100
- [functional] First check of Tool coverage: 0
- [functional] First check of Schema quality: fair
- [functional] First check of Schema quality: fail
- [functional] First check of Tool coverage: 100
- [functional] First check of Schema quality: fail

### 2026-08-06 (score 33)

First indexed and scored.

## MCP tools (1)

### `python_code_validator` (~318 tokens)

Python code validator

Validates, repairs and hardens AI-generated Python: syntax and lint diagnostics, security scanning (bandit, AST policy, credential scan), deterministic auto-fixes and optimisation via SMIRE, optional sandboxed execution and Python-to-JavaScript transpilation.

mode=static (default) never runs the submitted code: it parses it, lints it (ruff), type-checks it (mypy), applies an AST security policy and scans for credentials. mode=repair adds deterministic fixes and returns the rewritten source in fixed_code, keeping the original when it cannot prove the fix. mode=execute additionally runs the code in a container sandbox — no network, read-only filesystem, killed at options.timeout_s — and reports its exit code, stdout and stderr; treat that as a side effect and do not submit code you do not want executed.
Auth: a key is required for every call and static is free (100 calls per day, then HTTP 429); repair, execute need a paid key and answer 402 without one. Nothing outside the sandbox is written, and the code plus its verdict are retained to improve the service.
Returns valid, score 0..1, diagnostics (rule, message, line, column), security findings, fixes, fixed_code and runtime; see outputSchema. Use it on Python you generated or edited before writing it to disk, and prefer static unless you need the fix or proof that it runs.

Input parameters:

- `code` (string, required)
- `language`
- `mode`
- `options`

Output parameters:

- `diagnostics` (array)
- `fixed_code`
- `fixes` (array)
- `meta`
- `runtime`
- `score` (number)
- `security` (array)
- `transpiled`
- `valid` (boolean)

## Diagnostics

Captured diagnostic sections: TLS, DNSSEC, Authorisation, Transports. The full working is on the page: https://verifymcp.io/servers/jkanselaar-python-code-validator/api#diagnostics

## Score history

- 2026-08-08: 61
- 2026-08-07: 61
- 2026-08-06: 33

## Links

- Remote endpoint: https://api.statemind.ai/mcp
- Authorisation metadata: https://api.statemind.ai/.well-known/oauth-protected-resource/mcp
- Repository: https://github.com/jkanselaar/python-code-validator
- Changelog RSS feed: https://verifymcp.io/servers/jkanselaar-python-code-validator/api.xml
- Changelog JSON feed: https://verifymcp.io/servers/jkanselaar-python-code-validator/api.json
- HTML version of this page: https://verifymcp.io/servers/jkanselaar-python-code-validator/api
