MCP Server · jsguardian

Protect JS from inside
your AI coding assistant

The JSGuardian MCP server exposes protection as tools that Claude Code, Cursor, and any MCP-compatible AI can call. Ask in plain English — no switching context, no manual steps.

Requires Fortress plan · Generate an API key from your account

🔒

Backups are always created before any file is modified

The JSGuardian MCP server will never overwrite or modify a file without creating a backup first. Backups are saved to a .jsguardian-backups/ folder next to each protected file.

See it in action

Claude Code
You type:
Protect the file src/licensing.js using the Maximum preset
JSGuardian responds:
✅ File protected successfully
Input:   /project/src/licensing.js
Output:  /project/src/licensing.protected.js
Backup:  /project/src/.jsguardian-backups/licensing.js.bak
Size:    4,521 bytes → 87,432 bytes (×19.3)
Preset:  maximum

Tool Reference

5 tools available. Your AI will call them automatically based on your instructions.

Signature
protect_file(file_path, preset?, overwrite?, output_path?)
Parameters
file_path*
string

Absolute or relative path to the .js file. Must exist and end in .js.

preset
"maximum"|"stealth"default: "maximum"

All users get maximum protection. stealth = same protection, no visible markers (Fortress only).

overwrite
booleandefault: false

If true, replaces the original file. A backup is ALWAYS created first regardless.

output_path
string

Custom output path. Defaults to <original>.protected.js next to the original.

Returns

Success message with: input path, output path, backup path, original size, protected size, size ratio, preset used.

Example
// Claude prompt:
"Protect src/licensing.js using the Maximum preset"

// What happens:
// 1. File is read from src/licensing.js
// 2. Backup created: src/.jsguardian-backups/licensing.js.2026-06-02T14-30-00.bak
// 3. API call: POST /api/v1/protect with code + preset=maximum
// 4. Protected code written to: src/licensing.protected.js
// 5. Result reported with sizes + backup location

Installation

Choose your AI tool. The MCP server runs via node.

1

Generate an API key

Go to Account → API Keys and create a key starting with jsg_live_.

jsg_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
2

Add to your AI tool config

// Add to ~/.claude/settings.json
{
  "mcpServers": {
    "jsguardian": {
      "command": "node",
      "args": ["/root/criptor/mcp/index.js"],
      "env": {
        "JSGUARDIAN_API_KEY": "jsg_live_your_key_here"
      }
    }
  }
}
3

Restart and verify

Restart Claude Code (quit and reopen), then type /mcp to verify jsguardian appears.

4

Test it

“Check my JSGuardian account”

REST API

Use directly in CI/CD pipelines, build scripts, or any language.

POST https://jsguardian.com/api/v1/protect
Authorization: Bearer jsg_live_your_key_here
Content-Type: application/json

{
  "code": "function add(a, b) { return a + b; }\nmodule.exports = { add };",
  "filename": "math.js"
}

// Response 200:
{
  "jobId": "uuid",
  "filename": "math.protected.js",
  "originalSize": 52,
  "protectedSize": 38204,
  "code": "...(full protected JavaScript)..."
}
Node.js
const res = await fetch('https://jsguardian.com/api/v1/protect', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer jsg_live_...',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ code }),
});
const { code: protected } = await res.json();
Python
import requests
res = requests.post(
  'https://jsguardian.com/api/v1/protect',
  headers={'Authorization': 'Bearer jsg_live_...'},
  json={'code': code},
)
protected = res.json()['code']
curl
curl -X POST https://jsguardian.com/api/v1/protect \
  -H "Authorization: Bearer jsg_live_..." \
  -H "Content-Type: application/json" \
  -d '{"code":"..."}' \
  | jq .protectedSize

Rate limits & quotas

API requests10 req/min per key
Max code size10 MB per request
Monthly KB quotaFree: 2 MB/mo · Fortress: unlimited
Concurrent jobsQueued, priority by plan
Key limitUnlimited keys per account
Key expiryNever (unless you set one)