validate

v0.1.2
io.github.machinegrade/validate Checked 13 hours ago Published 4 months ago

Deterministic validation for AI-generated artifacts: JSON Schema, OpenAPI response, SQL syntax.

Values you need

VariableWhat it is
SANDBOX_URLoptional Base URL of the validate API Default: https://api.machinegrade.dev
SANDBOX_API_KEYrequired secret API key issued via POST https://api.machinegrade.dev/keys (free tier: 500 calls/month)

npm (npx) discovery passed

Requires Node.js 18+

Run in a terminal
claude mcp add validate -e 'SANDBOX_API_KEY=<SANDBOX_API_KEY>' -- npx -y --package=@machinegrade/validate@0.1.2 machinegrade-validate-mcp
Add to claude_desktop_config.json
{
  "mcpServers": {
    "validate": {
      "args": [
        "-y",
        "--package=@machinegrade/validate@0.1.2",
        "machinegrade-validate-mcp"
      ],
      "command": "npx",
      "env": {
        "SANDBOX_API_KEY": "<SANDBOX_API_KEY>"
      }
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "validate": {
      "args": [
        "-y",
        "--package=@machinegrade/validate@0.1.2",
        "machinegrade-validate-mcp"
      ],
      "command": "npx",
      "env": {
        "SANDBOX_API_KEY": "<SANDBOX_API_KEY>"
      }
    }
  }
}
Add to .vscode/mcp.json
{
  "inputs": [
    {
      "description": "SANDBOX_API_KEY",
      "id": "sandbox-api-key",
      "password": true,
      "type": "promptString"
    }
  ],
  "servers": {
    "validate": {
      "args": [
        "-y",
        "--package=@machinegrade/validate@0.1.2",
        "machinegrade-validate-mcp"
      ],
      "command": "npx",
      "env": {
        "SANDBOX_API_KEY": "${input:sandbox-api-key}"
      },
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.validate]
command = "npx"
args = ["-y", "--package=@machinegrade/validate@0.1.2", "machinegrade-validate-mcp"]
env = { "SANDBOX_API_KEY" = "<SANDBOX_API_KEY>" }

Remote (hosted)

Run in a terminal
claude mcp add --transport http validate https://api.machinegrade.dev/mcp
Add to Settings → Connectors → Add custom connector (or claude_desktop_config.json via mcp-remote)
{
  "mcpServers": {
    "validate": {
      "args": [
        "-y",
        "mcp-remote",
        "https://api.machinegrade.dev/mcp"
      ],
      "command": "npx"
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "validate": {
      "url": "https://api.machinegrade.dev/mcp"
    }
  }
}
Add to .vscode/mcp.json
{
  "servers": {
    "validate": {
      "type": "http",
      "url": "https://api.machinegrade.dev/mcp"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.validate]
command = "npx"
args = ["-y", "mcp-remote", "https://api.machinegrade.dev/mcp"]

For AI agents

  1. Ask the user for: SANDBOX_API_KEY. Never invent or guess these values; secrets go into the client config, not into chat logs.
  2. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  3. Restart or reload the client so it starts the server.
  4. Verify: the server should expose these tools: validate.
  5. If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.

Machine-readable: install.md · manifest.json