Skip to content

Arcjet Plugin

The Arcjet plugin turns any supported AI coding agent into a security expert. It pre-loads agents with knowledge of the Arcjet security platform and automatically injects the right guidance based on what you’re working on — framework-specific SDK patterns, protection rules, and best practices.

Install the plugin with a single command:

Terminal window
npx plugins add arcjet/arcjet-plugin

The plugin activates automatically after installation. There are no additional setup steps or commands to learn.

The plugin includes four main components that work together to enhance your AI coding agent:

ComponentDescription
MCP integrationConnects to the Arcjet MCP server for traffic analysis, request inspection, IP investigation, and remote rule management
Security-aware coding rulesFramework-specific guidance that auto-activates when you’re working in relevant files
SkillsTask-oriented workflows for implementing protection
Security analyst agentMonitors threats, analyzes traffic patterns, and manages rules

After installing, the plugin detects what you’re working on from your tool calls, file paths, and project configuration, then injects the right expertise at the right time. You use your AI agent as you normally would and the plugin handles the rest.

Guidance triggers automatically in specific contexts:

ContextFile patternsWhat it provides
SDK patterns**/lib/arcjet*Single instance setup, protect() usage, decision handling
Next.jsapp/**/route.ts, pages/api/**Import validation, handler vs. component distinctions
Express / Node**/server.tsAdapter packages, configuration patterns
Python**/*.pySnake case API conventions, async/sync client handling
AI apps**/chat/**, **/api/chat*Layered protection, token budgets, PII blocking

Invoke skills directly within your AI coding agent:

SkillPurpose
/arcjet:protect-routeDesigned for web apps. Adds protection to route handlers with automatic framework detection
/arcjet:add-ai-protectionDesigned for AI apps. Implements prompt injection detection, PII blocking, and token budget rate limiting

The Arcjet Plugin supports all the languages and frameworks supported by the Arcjet SDKs:

JavaScript / TypeScript: Next.js, Express, Node.js, Fastify, NestJS, SvelteKit, Remix, React Router, Astro, Nuxt, Hono, Bun, Deno

Python: FastAPI, Flask

The plugin connects to the Arcjet MCP server to give your agent access to your Arcjet account. When connected via OAuth, agents can:

  • Inspect requests and explain allow/deny decisions
  • Analyze traffic patterns and detect anomalies
  • Investigate suspicious IPs with geolocation and threat intelligence
  • Create and promote remote rules without code changes
  • Generate security briefings

The plugin is open source: github.com/arcjet/arcjet-plugin

Discussion