{"id":48645472,"url":"https://github.com/getaxonflow/axonflow-cursor-plugin","last_synced_at":"2026-05-23T18:01:01.044Z","repository":{"id":349518792,"uuid":"1202664503","full_name":"getaxonflow/axonflow-cursor-plugin","owner":"getaxonflow","description":"AxonFlow governance for Cursor IDE — block dangerous commands, govern MCP queries and command execution, and keep audit trails for production coding agents","archived":false,"fork":false,"pushed_at":"2026-05-18T22:39:27.000Z","size":32122,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-05-19T00:51:40.895Z","etag":null,"topics":["agent-governance","ai-control-plane","ai-governance","ai-plugin","coding-agents","cursor","cursor-ide","llm-security","mcp","production-ai","responsible-ai","runtime-control"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/getaxonflow.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-06T09:11:21.000Z","updated_at":"2026-05-18T22:39:29.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/getaxonflow/axonflow-cursor-plugin","commit_stats":null,"previous_names":["getaxonflow/axonflow-cursor-plugin"],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/getaxonflow/axonflow-cursor-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getaxonflow%2Faxonflow-cursor-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getaxonflow%2Faxonflow-cursor-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getaxonflow%2Faxonflow-cursor-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getaxonflow%2Faxonflow-cursor-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/getaxonflow","download_url":"https://codeload.github.com/getaxonflow/axonflow-cursor-plugin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getaxonflow%2Faxonflow-cursor-plugin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33406444,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-23T04:15:53.637Z","status":"ssl_error","status_checked_at":"2026-05-23T04:15:53.242Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent-governance","ai-control-plane","ai-governance","ai-plugin","coding-agents","cursor","cursor-ide","llm-security","mcp","production-ai","responsible-ai","runtime-control"],"created_at":"2026-04-10T03:30:52.931Z","updated_at":"2026-05-23T18:01:01.036Z","avatar_url":"https://github.com/getaxonflow.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AxonFlow Plugin for Cursor IDE\n\n**Runtime governance for Cursor: block dangerous commands before they run, scan every tool output for PII and secrets, and keep a compliance-grade audit trail — without leaving the editor.**\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](./LICENSE)\n\n\u003e **→ Full integration walkthrough:** **[docs.getaxonflow.com/docs/integration/cursor](https://docs.getaxonflow.com/docs/integration/cursor/)** — architecture, policy examples, latency numbers, troubleshooting, and the 15 MCP tools the platform exposes.\n\n\u003e **Upgrade strongly recommended.** AxonFlow ships substantial monthly security and quality hardening; staying on the latest major is the security-supported release line. [Latest release](https://github.com/getaxonflow/axonflow-cursor-plugin/releases/latest) · [Security advisories](https://github.com/getaxonflow/axonflow-cursor-plugin/security/advisories)\n\n---\n\n## Why you'd add this\n\nCursor is the fastest-growing AI code editor — VS Code with deep AI integration, native MCP support, terminal execution, multi-file edits. It's excellent at developer productivity. It was never designed to be the layer where your security and compliance team lives.\n\nThe gaps start surfacing the moment Cursor moves from one developer's laptop to a team or production setting:\n\n| Production requirement | Cursor alone | With this plugin |\n|---|---|---|\n| Policy enforcement before tool execution | Hooks available, no governance logic | **80+ built-in policies evaluated on every governed tool call** |\n| Dangerous command blocking in the terminal | Terminal runs anything | **Reverse shells, `rm -rf /`, `curl \\| bash`, cloud metadata, credential access — all blocked** |\n| PII / secrets detection in tool outputs | Developer responsibility | **Auto-scan; agent instructed to use redacted version** |\n| SQL-injection detection on MCP queries | MCP server's problem | **30+ patterns evaluated on every MCP tool call** |\n| Compliance-grade audit trail | Session logs, not compliance-formatted | **Every governed call recorded with policies, decision, duration** |\n| Decision explainability after a block | Generic hook failure message | **`decision_id` surfaced in stderr; `explain_decision` MCP tool returns the full record** |\n| Self-service, time-bounded exceptions | Not available | **`create_override` with mandatory justification, fully audited** |\n| File-write protection for editor config | Not addressed | **`.cursor/settings.json` and `.cursorrules` protected by policy** |\n\nYou get all of that with no change to how developers use Cursor. Hooks fire on every governed tool call, the deny message tells you why, and MCP tools are there when you want to investigate or unblock.\n\n---\n\n## How it works\n\n```\nCursor selects a tool (Shell, Write, Edit, MCP, etc.)\n    │\n    ▼\nPreToolUse hook fires automatically\n    │ → check_policy(\"cursor.Shell\", \"curl 169.254.169.254\")\n    │\n    ├─ BLOCKED (exit 2) → Cursor receives denial with decision_id + risk_level\n    │                     in stderr; agent can call explain_decision / create_override\n    │\n    └─ ALLOWED (exit 0) → Tool executes normally\n                      │\n                      ▼\n                 PostToolUse hook fires automatically\n                      │ → audit_tool_call(tool, input, output)  [non-blocking]\n                      │ → check_output(tool result for PII/secrets)\n                      │\n                      ├─ Sensitive data found → agent instructed to use\n                      │                          redacted version in its reply\n                      └─ Clean → Silent\n```\n\n**Governed tools:** `Shell`, `Write`, `Edit`, `Read`, `Task`, `NotebookEdit`, and all MCP tools (`mcp__*`). Cursor maps Claude Code's `Bash` tool to `Shell`.\n\n**Fail behavior:**\n- AxonFlow unreachable (network) → fail-open, tool execution continues\n- AxonFlow auth/config error → fail-closed (exit 2), tool call blocked until config is fixed\n- PostToolUse failures → never block (audit and PII scan are best-effort)\n\n---\n\n## Where this kicks in during daily IDE use\n\n### 1. The governed-unblock workflow\n\nYour IDE is where developers feel the tension between safety and speed most sharply. A terse \"blocked\" on a shell command wastes minutes every time.\n\n**With the plugin:** the deny message carries `decision_id` and `risk_level` in stderr. The developer can ask Cursor to call `explain_decision` to see exactly which policy family triggered. If the decision is overridable, `create_override` produces a time-bounded, audit-logged exception with mandatory justification — without leaving the IDE or opening a separate admin surface.\n\n### 2. The MCP query that returns too much\n\nA dev connects Cursor to a production PostgreSQL MCP server for debugging. Results stream into the conversation with customer names, emails, and phone numbers. Session logs aren't structured for audit.\n\n**With the plugin:** `check_policy` fires before the query runs (SQL-injection scan, sensitive-operation scan), `check_output` scans the result for PII, and `audit_tool_call` records everything with matched policies and decision ID. Search via `search_audit_events` later.\n\n### 3. The editor config that shouldn't be writable\n\nGovernance has to survive the *next* developer too. Cursor's `.cursor/settings.json` and `.cursorrules` shape agent behavior — if an agent can rewrite them, governance is one hook modification away from being bypassed.\n\n**With the plugin:** Cursor-specific integration policies activate when `AXONFLOW_INTEGRATIONS=cursor` (or automatically on detection) — `.cursor/settings.json` writes are blocked, `.cursor-plugin/*.json` and `.mdc` rule modifications are flagged.\n\n---\n\n## Try AxonFlow on a real plugin rollout\n\nWe're opening limited **Plugin Design Partner** slots.\n\n30-minute hook lifecycle review, policy pack scoping, override workflow design, and IDE/CLI rollout pattern walkthrough — for solo developers and small teams putting governance on Cursor.\n\n[Apply here](https://getaxonflow.com/plugins/design-partner?utm_source=readme_plugin_cursor) or email [design-partners@getaxonflow.com](mailto:design-partners@getaxonflow.com). Personal email is fine — solo developers welcome.\n\n### See AxonFlow in Action\n\nThree short videos covering different angles of the platform:\n\n- **[Community Quickstart Demo (Code + Terminal, 2.5 min)](https://youtu.be/BSqU1z0xxCo)** — governed calls, PII block, Gateway Mode with LangChain/CrewAI, and MAP from YAML\n- **[Runtime Control Demo (Portal + Workflow, 3 min)](https://youtu.be/6UatGpn7KwE)** — approvals, retry safety, execution state, and the audit viewer\n- **[Architecture Deep Dive (12 min)](https://youtu.be/Q2CZ1qnquhg)** — how the control plane works, policy enforcement flow, and multi-agent planning\n\n### Plugin Evaluation Tier (Free 90-day License)\n\nOutgrown Community on a real plugin install? Evaluation unlocks the capacity and features that matter for plugin users — without moving to Enterprise yet:\n\n| Capability | Community | Evaluation (Free) | Enterprise |\n|---|---|---|---|\n| Tenant policies | 20 | 50 | Unlimited |\n| Org-wide policies | 0 | 5 | Unlimited |\n| Audit retention | 3 days | 14 days | Up to 10 years |\n| HITL approval gates | — | 25 pending, 24h expiry | Unlimited, 24h |\n| Evidence export (CSV/JSON) | — | 5,000 records · 14d window · 3/day | Unlimited |\n| Policy simulation | — | 300/day | Unlimited |\n| Session overrides (self-service unblock) | — | — | Enterprise-only |\n\nOrg-wide policies and session overrides are **Enterprise-only** — those are the actual upgrade triggers for plugin users.\n\n[Get a free Plugin Evaluation license](https://getaxonflow.com/plugins/evaluation-license?utm_source=readme_plugin_cursor_eval)\n\n---\n\n## Privacy notice\n\n**Read before installing.** AxonFlow [Community SaaS](https://docs.getaxonflow.com/docs/deployment/community-saas/) at `try.getaxonflow.com` is the zero-config endpoint the plugin uses if neither `AXONFLOW_ENDPOINT` nor `AXONFLOW_AUTH` is configured. In that mode, governed tool inputs (tool name + arguments) and outbound message bodies are checked by AxonFlow's policy enforcement endpoint. **Community SaaS is for early exploration only** — not for production workloads, regulated environments, real user data, personal data, or any other sensitive information. It is offered \"as is\" on a best-effort basis with no SLA, no warranties, and no commitment to retention, deletion, or incident-response timelines.\n\nFor any serious use, choose one of the following instead:\n\n1. **[Self-host AxonFlow Community Edition](https://docs.getaxonflow.com/docs/deployment/self-hosted/)** — runs entirely on your infrastructure and keeps data within your boundary. Recommended for any real workload. The in-README quick start is in [Step 1](#step-1-install-the-axonflow-platform) below.\n2. **Community Edition with an [Evaluation License](https://docs.getaxonflow.com/docs/deployment/evaluation-rollout-guide/)** — for production use with real users or clients on the open core; adds production-fit limits and license-gated features. Free 90-day [evaluation license](https://getaxonflow.com/plugins/evaluation-license).\n3. **[AxonFlow Enterprise](https://docs.getaxonflow.com/docs/deployment/community-to-enterprise-migration/)** — production-grade governance, regulatory-grade controls, SLOs, and contractual commitments suitable for regulated industries. Contact [hello@getaxonflow.com](mailto:hello@getaxonflow.com).\n\nTo skip Community SaaS entirely: set `AXONFLOW_ENDPOINT` to a self-hosted AxonFlow URL. That alone flips the plugin into self-hosted mode — the Community SaaS auto-bootstrap is not attempted, and no env var is required. Get the AxonFlow platform from [getaxonflow/axonflow](https://github.com/getaxonflow/axonflow) and follow the [Getting Started](https://docs.getaxonflow.com/docs/getting-started/) guide for the Docker Compose setup. For air-gapped environments where AxonFlow is not yet reachable but you want to suppress the bootstrap attempt, set `AXONFLOW_COMMUNITY_SAAS=0`; set `AXONFLOW_TELEMETRY=off` to also disable the anonymous 7-day heartbeat.\n\nLLM provider keys never leave the user's machine in any mode — Cursor handles every LLM call; AxonFlow only enforces policies and records audit trails.\n\n---\n\n## Install\n\nThis is a **three-step** install: stand up the AxonFlow platform, add the plugin to Cursor, then point the plugin at the platform. The plugin alone does not enforce policy — its hook scripts are thin clients that talk to an AxonFlow agent gateway. If the platform is not installed and reachable, governed tool calls have nothing to evaluate against. **Skipping Step 3 is the most common mistake**: the platform is running locally but the plugin still falls back to Community SaaS because no `AXONFLOW_ENDPOINT` is configured.\n\n### Prerequisites\n\n- [Cursor IDE](https://cursor.com)\n- `jq` and `curl` on `PATH`\n\n### Step 1: install the AxonFlow platform\n\nFor any real workload, run AxonFlow on your own infrastructure via Docker Compose:\n\n```bash\ngit clone https://github.com/getaxonflow/axonflow.git\ncd axonflow \u0026\u0026 docker compose up -d\n\n# verify\ncurl -s http://localhost:8080/health | jq .\n```\n\nFollow the [Getting Started](https://docs.getaxonflow.com/docs/getting-started/) guide for prerequisites (Docker Engine or Desktop, Docker Compose v2, 4 GB RAM, 10 GB disk) and the [Self-Hosted Deployment Guide](https://docs.getaxonflow.com/docs/deployment/self-hosted/) for production options. For production with real users or clients, run Community Edition with a free 90-day [Evaluation License](https://docs.getaxonflow.com/docs/deployment/evaluation-rollout-guide/) or [AxonFlow Enterprise](https://docs.getaxonflow.com/docs/deployment/community-to-enterprise-migration/).\n\n\u003e Skipping Step 1 makes the plugin fall back to the [Community SaaS](https://docs.getaxonflow.com/docs/deployment/community-saas/) endpoint at `try.getaxonflow.com` for early exploration only. **Do not skip Step 1 for any real workload** — see the [Privacy notice](#privacy-notice) above.\n\n### Step 2: install the plugin\n\n```bash\n# 1. Clone\ngit clone https://github.com/getaxonflow/axonflow-cursor-plugin.git\n\n# 2. Install into Cursor's local plugin directory\ncp -r axonflow-cursor-plugin ~/.cursor/plugins/local/axonflow-cursor-plugin\n\n# 3. Reload Cursor (Cmd+Shift+P → \"Developer: Reload Window\")\n# 4. Verify in Settings (Cmd+Shift+J) → Plugins → \"Axonflow Cursor Plugin\"\n```\n\nSymlinks don't work — Cursor requires a real copy.\n\n### Step 3: point the plugin at the platform\n\nWithout this step the plugin auto-registers with Community SaaS regardless of whether you ran Step 1 — it does not auto-detect a locally-running AxonFlow. Set `AXONFLOW_ENDPOINT` (and `AXONFLOW_AUTH` if you have credentials):\n\n```bash\n# Self-hosted local agent — that alone flips mode to self-hosted, no other env var needed\nexport AXONFLOW_ENDPOINT=http://localhost:8080\n\n# Self-hosted remote agent with credentials\nexport AXONFLOW_ENDPOINT=https://axonflow.your-company.com\nexport AXONFLOW_AUTH=$(echo -n \"your-client-id:your-client-secret\" | base64)\n\n# Optional: longer request timeout for remote / VPN deployments\nexport AXONFLOW_TIMEOUT_SECONDS=12\n```\n\nEvery hook invocation logs a one-line canary on stderr confirming the active mode:\n\n```\n[AxonFlow] Connected to AxonFlow at http://localhost:8080 (mode=self-hosted)\n```\n\nIf the canary says `mode=community-saas` after you ran Step 1, the plugin is still hitting `try.getaxonflow.com` because Step 3 was skipped or `AXONFLOW_ENDPOINT` is unset. Fix Step 3 and reload.\n\n---\n\n## Mode-specific reference\n\nThe recommended self-hosted path is covered in [Install Step 1](#step-1-install-the-axonflow-platform). Two more modes worth knowing about:\n\n### Community SaaS — for early exploration only\n\nThe plugin's zero-config fallback when neither `AXONFLOW_ENDPOINT` nor `AXONFLOW_AUTH` is configured. The plugin registers a tenant with `try.getaxonflow.com` on first run and persists credentials at `~/.config/axonflow/try-registration.json` (mode `0600`).\n\n**Use only for early exploration of the plugin's behaviour. Not for production workloads, regulated environments, real user data, personal data, or any other sensitive information.**\n\n| What goes to `try.getaxonflow.com` | What does NOT |\n|---|---|\n| Tool name + arguments before each governed call | LLM provider API keys |\n| Outbound message bodies before delivery (PII/secret scan) | Cursor conversation history outside governed tools |\n| Anonymous 7-day heartbeat (plugin version, OS, runtime) | Files outside the Cursor runtime |\n\nThe endpoint runs against shared Ollama models, rate-limits at 20 req/min · 500 req/day per tenant, and is offered \"as is\" on a best-effort basis with no SLA, no warranties, no commitment to retention or deletion timelines, and may be modified or discontinued without notice. Read the [Try AxonFlow — Free Trial Server](https://docs.getaxonflow.com/docs/deployment/community-saas/) page for the full disclosure, including [data retention](https://docs.getaxonflow.com/docs/deployment/community-saas/#limitations-and-disclaimers) and [registration mechanics](https://docs.getaxonflow.com/docs/deployment/community-saas/#registration).\n\n### Air-gapped: zero outbound\n\nFor environments where no outbound traffic is permitted at all — air-gapped labs, regulated networks, classified deployments — set both env vars before the Cursor process starts:\n\n```bash\nexport AXONFLOW_COMMUNITY_SAAS=0   # disable Community SaaS auto-bootstrap\nexport AXONFLOW_TELEMETRY=off      # disable the anonymous 7-day heartbeat\nexport AXONFLOW_ENDPOINT=http://your-internal-axonflow:8080\n```\n\nWith both env vars set and `AXONFLOW_ENDPOINT` pointing at a same-network instance, no traffic leaves your environment.\n\n---\n\n## Configure\n\n[Step 3](#step-3-point-the-plugin-at-the-platform) above covers `AXONFLOW_ENDPOINT`, `AXONFLOW_AUTH`, and `AXONFLOW_TIMEOUT_SECONDS`. Other connection options:\n\nFor Evaluation License or Enterprise credentials, set both endpoint and auth:\n\n```bash\nexport AXONFLOW_ENDPOINT=https://your-axonflow.example.com\nexport AXONFLOW_AUTH=$(echo -n \"your-client-id:your-client-secret\" | base64)\n```\n\n## Pro tier license token (`AXONFLOW_LICENSE_TOKEN`)\n\nPlugin Pro extends the Free baseline (3-day audit retention, 200 governed events / day, 2 active custom policies, 1 HITL approval per rolling 7d) to **30-day retention**, **2,000 events / day**, **unlimited active custom policies**, **unlimited HITL approvals**, and adds the **LLM cost pre-flight** tool (estimate token cost for a multi-step plan before it runs). 90-day window, one-time **$9.99 USD** payment, no auto-renewal, 14-day no-questions refund. See [getaxonflow.com/pricing](https://getaxonflow.com/pricing/) for the full breakdown and the Stripe buy button.\n\nTo activate Pro on this Cursor install:\n\n1. **Find your client ID.** From the plugin install root, run:\n\n    ```bash\n    cd ~/.cursor/plugins/local/axonflow-cursor-plugin\n    bash scripts/status.sh\n    ```\n\n    The output includes a `client_id:  cs_\u003cuuid\u003e` line — that's the value Stripe Checkout needs. Copy it. (Same value the v1.4.x output called `tenant_id`; renamed in v1.5.0 for consistency with the rest of AxonFlow's v9 terminology.) Or ask the agent in chat: \"what is my AxonFlow client ID?\" (both \"client ID\" and \"tenant ID\" still work) — the [`axonflow-status` skill](#cursor-skills) will run the script for you and surface the value.\n\n2. **Buy at the pricing page.** Visit [getaxonflow.com/pricing](https://getaxonflow.com/pricing/) and click **Buy Plugin Pro — $9.99**. At Stripe Checkout, paste your `client_id` into the **AxonFlow tenant ID** custom field. (The Stripe form's field label is still \"AxonFlow tenant ID\" — same value, the label will be renamed in a future release.)\n\n3. **Install the issued license token.** After checkout you'll receive an `AXON-...` token by email. The plugin forwards it as the `X-License-Token` header on every governed agent call once it's loaded. Two ways to load it (token-resolution order described below):\n\nThe plugin reads the token in this order — first match wins:\n\n1. `AXONFLOW_LICENSE_TOKEN` environment variable (drop into your shell profile for cross-session persistence).\n2. `~/.config/axonflow/license-token` file (mode `0600` inside the same `0700` directory the community-saas registration lives in). Convenient when you don't want the token in your shell history; safe-mode-only — files with looser permissions are refused with a stderr warning.\n\nWhen a token is loaded, the mode-clarity canary appends a `Pro tier active` suffix so it's visible at a glance:\n\n```\n[AxonFlow] Connected to AxonFlow at http://localhost:8080 (mode=self-hosted) — Pro tier active\n```\n\nThe free / community tier behaviour is unchanged when no token is set — the plugin sends no `X-License-Token` header and the agent treats the request as free-tier.\n\n### Check status (`scripts/status.sh`)\n\nNeed your `client_id` (to paste into the Stripe Checkout custom field at `https://getaxonflow.com/pricing/`)? Want to confirm whether your Pro license token is loaded? Run:\n\n```bash\ncd ~/.cursor/plugins/local/axonflow-cursor-plugin\nbash scripts/status.sh\n```\n\nSample output (free tier):\n\n```\nAxonFlow Cursor plugin — status\n\n  endpoint           https://try.getaxonflow.com\n  mode               community-saas\n  client_id:         cs_a1b2c3d4-...  (formerly tenant_id)\n  registration file  /home/you/.config/axonflow/try-registration.json\n  license token      unset\n  tier               Free\n  upgrade            https://getaxonflow.com/pricing/\n\nTo upgrade to Pro, copy your client_id above, visit\nhttps://getaxonflow.com/pricing/, paste the client_id into the Stripe checkout custom field\n(currently labeled \"Your AxonFlow tenant ID\" on the Stripe form),\nand complete checkout. ...\n```\n\nSample output (Pro tier):\n\n```\n  license token      set (AXON-...wxyz, source=env)\n  tier               Pro\n```\n\nThe license token is **always** redacted to its last 4 chars. The full token is never printed — output is safe to screen-share or paste into a support ticket.\n\nIn the chat, use the `/axonflow-status` skill to have the agent run this for you and surface the `client_id` and tier.\n\n\u003e **Tip:** the same information is available without spawning a shell — just ask the agent \"what's my AxonFlow client ID?\" (or \"tenant ID\" — both phrasings still work) and it will call the agent-side `axonflow_get_tenant_id` MCP tool (the wire name keeps its `_tenant_id` suffix for backwards compatibility), which returns the same identifier, the server-resolved tier, and the upgrade URLs. Other agent-callable Pro-related tools include `axonflow_list_pro_features` (\"what would I get if I upgraded?\") and `axonflow_get_cost_estimate` (Pro-only LLM cost pre-flight). Auto-discovered via the existing MCP HTTP transport — no extra wiring.\n\n### Free-tier limits and upgrade prompts\n\nWhen the plugin's hooks hit a Free-tier cap (200 events/day, 2 active custom policies, 1 HITL approval per rolling 7d, or a Pro-only feature), the agent returns a structured upgrade envelope. The plugin parses it and prints a single-line nudge to stderr — visible in Cursor's hook log:\n\n```\n[AxonFlow] Daily limit reached on Free tier (200 events). Pro raises this to 2,000/day. Resets at midnight UTC.\n[AxonFlow] Upgrade: https://buy.stripe.com/bJe28qbztcdVchjdkw8k800\n```\n\nThe plugin also stamps a local back-off file from the response's `Retry-After` header so subsequent governed calls fall through immediately (no thundering herd against the agent) until the cap clears. The upgrade nudge is shown at most once per UTC day so it doesn't spam every hook.\n\n### Recovering lost credentials (`scripts/recover-credentials.sh`)\n\nIf you lose your `~/.config/axonflow/try-registration.json` (deleted by mistake, switched machines, hit the unsafe-permissions guard, etc.), run the recovery helper from the plugin install directory:\n\n```bash\ncd ~/.cursor/plugins/local/axonflow-cursor-plugin\nbash scripts/recover-credentials.sh\n```\n\nThe script prompts for the email the tenant was originally registered with, requests a magic link via `POST /api/v1/recover` (which always returns `202` to defend against email enumeration), waits for you to paste either the magic-link URL or the bare token from the email, calls `POST /api/v1/recover/verify`, and writes the new credentials to `~/.config/axonflow/try-registration.json` with mode `0600`. The community-saas bootstrap picks them up on the next governed tool call — no shell re-export, no Cursor reload.\n\nIn the chat, use the `/recover-credentials` skill to have the agent walk you through the same flow. The skill instructs the agent to invoke the script via the Shell tool; you fill in the email and token in the integrated terminal.\n\nRecovery is for **free-tier credential loss only**. If you lose your Pro `AXONFLOW_LICENSE_TOKEN`, recover it from the original Stripe / billing email rather than this script.\n\n---\n\n## What gets checked\n\nAxonFlow ships with **80+ built-in system policies** that apply to Cursor automatically. No configuration required — new policies added to the platform are immediately enforced.\n\n| Category | Coverage |\n|---|---|\n| **Dangerous commands** | Reverse shells, `rm -rf /`, `curl \\| bash`, credential file access (`cat ~/.ssh/`, `cat ~/.aws/`), path traversal |\n| **SQL injection** | 30+ patterns including UNION injection, stacked queries, auth bypass, encoding tricks |\n| **PII detection** | SSN, credit card, Aadhaar, PAN, email, phone, NRIC/FIN (Singapore), and more — with redaction |\n| **Secrets exposure** | API keys, connection strings, hardcoded credentials, code secrets |\n| **SSRF** | Cloud metadata endpoint (`169.254.169.254`) and internal-network blocking |\n| **Prompt injection** | Instruction override, jailbreak attempts, role hijacking |\n| **Cursor-specific** | `.cursor/settings.json` write protection, `.cursorrules` and `.mdc` rule-file modification warnings |\n\nCustom policies are easy — `POST /api/v1/dynamic-policies` or the Customer Portal. See [Policy Enforcement](https://docs.getaxonflow.com/docs/mcp/policy-enforcement/).\n\n---\n\n## The 15 MCP tools Cursor can call\n\nBeyond automatic hooks, the agent's MCP server exposes **15 tools** Cursor can invoke directly. All served by the platform at `/api/v1/mcp-server` — the plugin's `mcp.json` just points Cursor there. New platform tools are auto-discovered via the existing MCP HTTP transport.\n\n### Governance (6)\n\n| Tool | Purpose |\n|------|---------|\n| `check_policy` | Evaluate specific inputs against policies |\n| `check_output` | Scan specific content for PII/secrets |\n| `audit_tool_call` | Record an additional audit entry |\n| `list_policies` | List active governance policies |\n| `get_policy_stats` | Summary of governance activity |\n| `search_audit_events` | Search individual audit records for debugging and compliance |\n\n### Decision explainability \u0026 session overrides (4)\n\n| Tool | Purpose |\n|------|---------|\n| `explain_decision` | Return the full [DecisionExplanation](https://docs.getaxonflow.com/docs/governance/explainability/) for a decision ID |\n| `create_override` | Create a time-bounded, audit-logged session override (mandatory justification) |\n| `delete_override` | Revoke an active session override |\n| `list_overrides` | List active overrides scoped to the caller's tenant |\n\n### Tenant identity \u0026 tier capability (5 — V1 Plugin Pro)\n\n| Tool | Free access | Pro access |\n|------|-------------|------------|\n| `axonflow_get_tenant_id` | Visible + callable — returns tenant_id, server-resolved tier, upgrade URL | Same |\n| `axonflow_list_pro_features` | Visible + callable — locked Pro feature list (5 differentiators + $9.99 / 90-day pricing) | Same |\n| `axonflow_request_approval` | Visible + 1 per rolling 7d | Unlimited |\n| `axonflow_create_tenant_policy` | Visible + 2 active max | Unlimited |\n| `axonflow_get_cost_estimate` | Filtered out of `tools/list` — Pro-only | Visible + callable |\n\nWhen a Free-tier cap is hit on these tools, the agent returns a structured upgrade envelope (same shape as the 429 daily-quota envelope) and the plugin surfaces the upgrade prompt to stderr — see [Free-tier limits and upgrade prompts](#free-tier-limits-and-upgrade-prompts).\n\nSee [Session Overrides](https://docs.getaxonflow.com/docs/governance/overrides/).\n\n---\n\n## Free-tier limits and upgrade prompts\n\nWhen the plugin's hooks hit a Free-tier cap (200 events/day, 2 active custom policies, 1 HITL approval per rolling 7d, or a Pro-only feature), the agent returns a structured upgrade envelope. The plugin parses it and prints a single-line nudge to stderr — for example:\n\n```\n[AxonFlow] Daily limit reached on Free tier (200 events). Pro raises this to 2,000/day. Resets at midnight UTC.\n[AxonFlow] Upgrade: https://buy.stripe.com/bJe28qbztcdVchjdkw8k800\n```\n\nThe plugin also stamps a local back-off file from the response's `Retry-After` header so subsequent governed calls fall through immediately (no thundering herd against the agent) until the cap clears. The upgrade nudge is shown at most once per UTC day so it doesn't spam every hook.\n\n---\n\n## Skills and rules\n\nThe plugin ships skills (invocable explicitly) and `.mdc` rules (always-on context):\n\n**Skills:** `check-governance`, `audit-search`, `policy-stats`, `pii-scan`, `governance-status`, `policy-list`, `axonflow-status`\n\n**Rules:** `axonflow-governance.mdc` — injected into every conversation so Cursor knows governance is active and how to react when tools are blocked or PII is detected.\n\n---\n\n## Latency\n\n| Operation | Typical overhead |\n|-----------|-----------------|\n| Policy pre-check | 2–5 ms |\n| PII detection | 1–3 ms |\n| SQL-injection scan | 1–2 ms |\n| Audit write (async) | 0 ms (non-blocking) |\n| **Total per-tool overhead** | **3–10 ms** |\n\nImperceptible in an IDE session.\n\n---\n\n## Sister integrations\n\nSame governance platform, same 80+ policies, same 15 MCP tools — different agent hosts:\n\n| Integration | Repo | Docs |\n|---|---|---|\n| Cursor IDE | *this repo* | [cursor](https://docs.getaxonflow.com/docs/integration/cursor/) |\n| Claude Code | [axonflow-claude-plugin](https://github.com/getaxonflow/axonflow-claude-plugin) | [claude-code](https://docs.getaxonflow.com/docs/integration/claude-code/) |\n| OpenAI Codex | [axonflow-codex-plugin](https://github.com/getaxonflow/axonflow-codex-plugin) | [codex](https://docs.getaxonflow.com/docs/integration/codex/) |\n| OpenClaw | [axonflow-openclaw-plugin](https://github.com/getaxonflow/axonflow-openclaw-plugin) | [openclaw](https://docs.getaxonflow.com/docs/integration/openclaw/) |\n\n---\n\n## Plugin structure\n\n```\naxonflow-cursor-plugin/\n├── .cursor-plugin/\n│   └── plugin.json         # Plugin metadata\n├── mcp.json                # MCP server connection (points at the platform)\n├── hooks/\n│   └── hooks.json          # PreToolUse + PostToolUse hook definitions\n├── skills/\n│   ├── check-governance/\n│   ├── audit-search/\n│   ├── policy-stats/\n│   ├── pii-scan/\n│   ├── governance-status/\n│   └── policy-list/\n├── rules/\n│   └── axonflow-governance.mdc  # Always-on governance context\n├── scripts/\n│   ├── pre-tool-check.sh    # Policy enforcement (PreToolUse)\n│   ├── post-tool-audit.sh   # Audit + PII scan (PostToolUse)\n│   ├── mcp-auth-headers.sh  # Basic-auth header generation for MCP\n│   └── telemetry-ping.sh    # Anonymous telemetry (fires once per install)\n└── tests/\n    ├── test-hooks.sh        # Regression tests (mock + live)\n    ├── E2E_TESTING_PLAYBOOK.md\n    └── e2e/                 # Smoke E2E against live AxonFlow\n```\n\n---\n\n## Testing\n\n```bash\n# Hook regression tests (no live stack required)\n./tests/test-hooks.sh\n\n# Smoke E2E against a live AxonFlow at localhost:8080\nbash tests/e2e/smoke-block-context.sh\n```\n\nThe smoke scenario runs the plugin's `pre-tool-check.sh` against a running platform, feeds a SQLi-bearing Bash tool invocation through it, and asserts Cursor's deny semantics (exit 2 + stderr prefix `AxonFlow policy violation`) carry the richer-context markers (`decision:`, `risk:`). Exits 0 with `SKIP:` if no stack is reachable.\n\nFor the broader validation story — explain-decision, override lifecycle, audit-filter parity, cache invalidation — see the [Cursor integration guide](https://docs.getaxonflow.com/docs/integration/cursor/).\n\n---\n\n## Troubleshooting\n\n**Plugin doesn't show in settings?** Cursor loads local plugins from `~/.cursor/plugins/local/`. The plugin must be a real copy (symlinks do not work). After copying, run \"Developer: Reload Window\" or restart Cursor.\n\n**Hooks not firing?** Check the Hooks tab in Cursor Settings. Common issues: missing `\"version\": 1` in `hooks/hooks.json`; hook matcher using `Bash` instead of `Shell` (Cursor uses `Shell`); plugin directory not at `~/.cursor/plugins/local/axonflow-cursor-plugin`.\n\n**PII in file writes not detected?** Cursor writes files via shell commands (`printf \u003e file`). The `beforeShellExecution` hook scans write content for PII. Set `PII_ACTION` to control behavior: `redact` (default — blocks and instructs the agent to rewrite), `block`, `warn`, or `log`.\n\nMore troubleshooting in the [integration guide](https://docs.getaxonflow.com/docs/integration/cursor/#troubleshooting).\n\n---\n\n## Telemetry\n\nAnonymous heartbeat at most once every 7 days per machine: plugin version, OS, architecture, bash version, AxonFlow platform version, deployment mode (community-saas / self-hosted production / self-hosted development). **Never** tool arguments, message contents, or policy data. The stamp file mtime advances only after the HTTP POST returns 2xx, so a transient network failure does not silence telemetry until the next window.\n\nOpt out: set `AXONFLOW_TELEMETRY=off` in the environment Cursor runs in.\n\n### Scope of `AXONFLOW_TELEMETRY=off`\n\n`AXONFLOW_TELEMETRY=off` disables the anonymous heartbeat described above. On **self-hosted** and **in-VPC** deployments, that heartbeat is the only data the plugin sends to AxonFlow, so setting `=off` means we receive nothing. On **Community SaaS** (`try.getaxonflow.com`) the hosted service also processes operational data — registrations, audit logs, policy enforcement records, workflow state, plan data, and request-header metadata aggregated for usage analytics — as part of running the platform; that operational data flow is governed by the [Privacy Policy](https://getaxonflow.com/privacy/), not by `AXONFLOW_TELEMETRY`.\n\n`DO_NOT_TRACK` is **not** honored as an opt-out for AxonFlow telemetry. It is commonly inherited from host tools and developer environments, which makes it an unreliable expression of user intent.\n\nGuarded by a stamp file at `$HOME/.cache/axonflow/cursor-plugin-telemetry-sent` (delete to re-send). Details: [docs.getaxonflow.com/docs/telemetry](https://docs.getaxonflow.com/docs/telemetry/).\n\n---\n\n## Links\n\n- **[Cursor Integration Guide](https://docs.getaxonflow.com/docs/integration/cursor/)** — the full walkthrough (recommended starting point)\n- [AxonFlow Documentation](https://docs.getaxonflow.com)\n- [Policy Enforcement](https://docs.getaxonflow.com/docs/mcp/policy-enforcement/)\n- [Decision Explainability](https://docs.getaxonflow.com/docs/governance/explainability/)\n- [Session Overrides](https://docs.getaxonflow.com/docs/governance/overrides/)\n- [Self-Hosted Deployment](https://docs.getaxonflow.com/docs/deployment/self-hosted/)\n- [Security Best Practices](https://docs.getaxonflow.com/docs/security/best-practices/)\n- Sister plugins: [Claude Code](https://github.com/getaxonflow/axonflow-claude-plugin) · [Codex](https://github.com/getaxonflow/axonflow-codex-plugin) · [OpenClaw](https://github.com/getaxonflow/axonflow-openclaw-plugin)\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetaxonflow%2Faxonflow-cursor-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgetaxonflow%2Faxonflow-cursor-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetaxonflow%2Faxonflow-cursor-plugin/lists"}