# Castov
Deterministic local tooling for Claude Desktop, Cursor, Windsurf, and Local LLMs via the Model Context Protocol (MCP) — backed by a high-performance CLI, Docker image, IDE extension, and 61 client-first browser utilities.
--- ## ⚡ What is Castov? Modern AI agents and developer workflows suffer from two critical flaws: 1. **Agent Hallucinations on Exact Operations**: LLMs frequently blunder arithmetic for CIDR network masks, time zone offsets, epoch milliseconds, and cryptographic key derivations. 2. **Data & Secret Leakage**: Sending system logs, environment variables, or tokens to third-party cloud APIs presents unacceptable security hazards. **Castov solves both.** It acts as an **in-situ Execution Layer** for developer environments. It provides deterministic, offline, and instant utilities delivered directly to your terminal, editor, Docker containers, and AI agents through the **Model Context Protocol (MCP)**. Everything runs **100% locally**. No external analytics, no telemetry, and zero cloud roundtrips. --- ## 🤖 AI Agent Setup (Model Context Protocol - MCP) Castov ships with a built-in, production-grade JSON-RPC 2.0 stdio MCP server supporting both `Content-Length` framed and `ndjson` stream protocols. ### 1. Claude Desktop Add Castov to your `claude_desktop_config.json`: * **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json` * **Windows**: `%APPDATA%\Claude\claude_desktop_config.json` * **Linux**: `~/.config/Claude/claude_desktop_config.json` ```json { "mcpServers": { "castov": { "command": "npx", "args": ["-y", "castov", "mcp"] } } } ``` ### 2. Cursor IDE & Windsurf Go to **Settings** → **Features** → **MCP Servers** → **Add New MCP Server**: * **Name**: `castov` * **Type**: `command` * **Command**: `npx -y castov mcp` Alternatively, add to your project's `.cursor/mcp.json`: ```json { "mcpServers": { "castov": { "command": "npx", "args": ["-y", "castov", "mcp"] } } } ``` ### Native Tools Exposed to Agents (10 Tools — All 100% Local & Read-Only) | MCP Tool | Capability | Example Agent Prompt | |---|---|---| | `castov_port` | Identifies listening services, protocol mappings, and inspects process collision | *"Why is port 3000 busy and what service uses it?"* | | `castov_cidr` | Calculates IPv4 subnet masks, wildcard, broadcast, and usable host count | *"Calculate usable IP range and subnet mask for 10.240.0.0/22"* | | `castov_detect_id` | Decodes embedded creation timestamps from UUIDv7, ULID, ObjectId, Snowflake | *"When was this MongoDB ObjectId or Snowflake ID created?"* | | `castov_timestamp` | Bidirectional epoch conversion to ISO 8601, UTC, and localized representations | *"Convert 1713456789 to human UTC and ISO format"* | | `castov_cron` | Parses 5-field cron schedules into plain English and computes next 5 runs | *"Explain cron `0 9 * * 1-5` and show the next 5 runs in `America/New_York`"* | | `castov_timezone` | Converts timestamps across IANA time zones with DST transition warnings | *"Convert `2026-03-29 14:30` from `America/New_York` to `Europe/Paris`"* | | `castov_secret` | Generates CSPRNG 256-bit Hex, Base64URL, API keys, and sortable UUIDv7 secrets | *"Generate a 256-bit cryptographic secret for `AUTH_SECRET` and `JWT_SECRET`"* | | `castov_jwt_decode` | Decodes JWT headers, payloads, and `exp` status offline with zero network calls | *"Decode this JWT offline and check if it is expired"* | | `castov_hash` | Computes SHA-256/384/512, SHA-1, MD5 digests and Base64/Base64URL encodings | *"Compute the SHA-256 hex digest and Base64URL encoding of this webhook payload"* | | `castov_scan_secrets` | Audits code snippets, git diffs, or `.env` blocks for leaked API keys & private keys | *"Scan this git diff for any accidentally hardcoded AWS, Stripe, or OpenAI keys"* | --- ## 📦 Multi-Channel Distribution Castov is available everywhere modern engineering happens: ### 1. Terminal CLI (Node.js / npm) Run instantly without installation: ```bash npx castov --help ``` Or install globally: ```bash npm install -g castov castov --help ``` ### 2. Docker Container (Docker Hub) Lightweight Alpine Linux container (`node:20-alpine`) running under a non-root `node` user: ```bash # Run one-off command docker run --rm castovdev/castov:latest uuid --v7 # Interactive diagnostic shell docker run -it --rm castovdev/castov:latest ``` ### 3. Homebrew Tap (macOS & Linux) Install natively via Brew: ```bash brew tap castovdev/castov brew install castov # Verify installation castov --version ``` ### 4. VS Code, Cursor & Windsurf Extensions Install the official extension directly within your editor: * **VS Code Marketplace**: Search `Castov` or install `Castov.castov-vscode` * **Open VSX Registry**: Available for Cursor, Windsurf, VSCodium: `castov/castov-vscode` ```bash # Command line installation code --install-extension Castov.castov-vscode ``` ### 5. GitHub Action (CI/CD Pipelines) Automate security scans, secret leakage audits, and environment checks in your GitHub workflows: ```yaml - name: Run Castov Secret Scanner uses: castovdev/castov-action@v1.0.0 with: command: 'scan .' ``` --- ## 🛠️ CLI Quickstart & Core Commands ```text castov