Superagent
SkillSecuritySet up Superagent Context Guardrails at coding-agent tool boundaries, configure and safely use the remote MCP server, and manage signed webhooks for findings, security reports, Contributor Trust, and Runtime Guardrails. Use when the user asks to enable context scanning before an agent consumes URLs, files, email, skills, or MCP repositories; integrate coding-agent hooks; or install, connect, configure, troubleshoot, or operate Superagent from Cursor, Claude Code, Codex CLI, or another MCP client.
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the Superagent skill
What this skill tells your AI
The instructions your AI receives, as published by superagent-ai/skills in skills/superagent/SKILL.md and read by ahel’s review.
Set up Context Guardrails so external context is checked before a coding agent consumes it, connect the agent to Superagent over MCP, or configure signed webhooks. Keep credentials protected and avoid surprising the user with remote, billable, destructive, or policy-changing actions.
Superagent MCP is an authenticated remote service. Do not connect to it, send it data, or change an MCP client configuration unless the user explicitly asks.
Route setup requests by intent:
- Context Guardrails setup or coding-agent hooks: follow Context Guardrails integration. Connecting MCP alone does not enforce pre-consumption checks.
- Connect or troubleshoot Superagent MCP: follow MCP setup workflow.
- Signed event delivery: follow Webhook setup.
MCP setup workflow
- Identify the MCP client and whether the user wants a new connection, troubleshooting, or an operation on an existing connection.
- For setup, direct the user to create an organization API key at Superagent Settings. Never ask them to paste the key into chat.
- Store the key as
SUPERAGENT_API_KEYin the user's shell or system environment. Never put it in a repository, tracked.envfile, command output, or response. - Use the exact endpoint
https://www.superagent.sh/mcp. The bare domain redirects, and some MCP clients fail on redirected POST requests. - Show the proposed configuration and obtain approval before editing client configuration or running a setup command.
- Verify that the client connects and exposes Superagent tools before attempting a product operation.
An organization API key can access the entire organization. Prefer a dedicated, revocable key for agent use and revoke it immediately if it is exposed.
Client configuration
Cursor
Add this server to mcp.json. Remote servers cannot read envFile, so
SUPERAGENT_API_KEY must exist in the environment that launches Cursor.
{
"mcpServers": {
"superagent": {
"url": "https://www.superagent.sh/mcp",
"headers": {
"Authorization": "Bearer ${env:SUPERAGENT_API_KEY}"
}
}
}
}
Claude Code
After confirming that SUPERAGENT_API_KEY is exported, propose:
claude mcp add --transport http --scope user superagent https://www.superagent.sh/mcp \
--header "Authorization: Bearer $SUPERAGENT_API_KEY"
Run /mcp in Claude Code to confirm the connection.
Codex CLI
Add the following to ~/.codex/config.toml. The feature flag must appear above
every [mcp_servers.*] block. The token setting is the environment variable's
name, not the token itself.
experimental_use_rmcp_client = true
[mcp_servers.superagent]
url = "https://www.superagent.sh/mcp"
bearer_token_env_var = "SUPERAGENT_API_KEY"
Export the variable before launching Codex, then use /mcp to verify.
Other MCP clients
Configure Streamable HTTP with:
- URL:
https://www.superagent.sh/mcp - Header:
Authorization: Bearer $SUPERAGENT_API_KEY
Keep the token in the client's supported secret or environment-variable store, not in a tracked configuration file.
Operating Superagent
Inspect the connected server's available tools rather than assuming a fixed tool list. Match the user's request to these capability groups:
- Findings: list and inspect findings, update manual triage, or request automated triage.
- Reports: list or inspect repository, Web app, agent, and package reports; create a new report only after confirmation.
- Contributor Trust: retrieve a cached result or start and check a scan.
- Context Guardrails: score Web pages, email, files, skills, and public MCP repositories before an agent consumes them.
- Runtime Guardrails: manage endpoint clients, groups, rules, built-in rule modes, and alerts.
Prefer the smallest read-only call that answers the question. Summarize the result and preserve identifiers the user needs for a follow-up. For asynchronous operations, report the returned status or identifier and avoid tight polling.
Context Guardrails integration
Distinguish a one-off scan from enforcement:
- For "scan/check this URL, file, email, skill, or MCP repository," use the corresponding MCP tool.
- For "add/enable/integrate Context Guardrails," install a check at the tool
boundary before the agent consumes the context. A
SKILL.md,AGENTS.md, rule, or system prompt is guidance, not enforcement.
Use this setup workflow:
- Ask which context origins to protect, whether the setup is project-local or global, and whether an unavailable scanner should block the action. Recommend fail-closed for security-sensitive workflows and user-level or managed hooks for controls that use an organization API key. Use project hooks only in a trusted repository.
- Inspect the client's current hook configuration and supported events. Merge with existing configuration; never replace it wholesale.
- Gate the action that introduces context, before consumption: web-fetch and
curl/wgetactions for pages, download actions for public files, skill installation for skills, MCP add/install configuration for MCP repositories, and the inbound-message wrapper for email. Do not treat every later MCP tool call as a repository scan. - Map each selected origin to the narrowest client pre-execution boundary:
- Cursor:
preToolUse,beforeShellExecution, orbeforeMCPExecution. - Claude Code:
PreToolUsematched toWebFetch,Bash,Skill, or the relevant MCP tool. - Codex CLI:
PreToolUsefor supported local and MCP tools. HostedWebSearchis not hookable, so disclose that gap instead of claiming full coverage. - Other clients: their equivalent before-tool hook, wrapper, middleware, or enforced rule plus an approved wrapper.
- Cursor:
- Show the exact hook, helper, paths, scope, verdict policy, outage behavior, and known coverage gaps. Obtain approval before writing files, changing client configuration, or sending a test target to Superagent.
- For enforced hooks, install a small local helper that calls the Context
Guardrails REST API with
SUPERAGENT_API_KEY. Some clients support MCP-backed hook handlers, but a scan tool's result is not automatically a client-specific allow or deny decision, and MCP errors may fail open. Use MCP directly for interactive scans, not as the cross-client enforcement adapter. Keep the key in the environment, never in the helper or hook configuration. Prefer a user-controlled helper outside the repository and reference it by absolute path so repository code cannot silently replace it. - Test one allowed target and one blocked or unresolved target, then restart or reload the client if its hook system requires it. Use the client's hook inspector when available and verify the action itself was blocked, not merely that the helper printed a warning.
The helper must call the matching /api/v1/context/* endpoint:
- Web page URL ->
GET /context/web_page/{identifier} - Public text or PDF URL ->
POST /context/file - Raw RFC 822 email ->
POST /context/email - skills.sh or public GitHub skill ->
POST /context/skill - Public GitHub MCP repository ->
POST /context/mcp
Skill and MCP scans support public GitHub targets only and require an active Superagent Security GitHub App installation. Verify that prerequisite before claiming those hook paths are enforced. Keep agent lifecycle hooks distinct from package, Git, or other install hooks found inside scanned content; the latter are threat signals.
Do not upload local private files through the public-URL file scanner, and get explicit authorization before sending raw email or other user content. Package and general repository scanning are not Context Guardrails origins: use Superagent supply-chain scanning for packages and repository reports for source repositories. Do not port an old package-install hook and claim that Context Guardrails scanned the package.
For an enforcement decision, parse the JSON response rather than relying only on score headers. Apply the selected tolerance consistently:
safe: allow.caution: require user review unless the user explicitly chose a different policy.suspiciousordangerous: deny.pending_deep_scan: true, unscannable results, malformed responses, and scanner timeouts: treat as unresolved and follow the approved outage policy.
Do not let a preliminary identity score silently allow consumption while the
deep scan is pending. Either request mode=full with a hook timeout long enough
for completion, or block/ask and tell the agent to retry after the asynchronous
scan finishes. Exempt the Superagent scanner calls themselves from generic MCP
gates to avoid recursive checks.
Hook safety requirements
Follow the installed client's current hook schema rather than copying one client's JSON response into another:
- Use narrow, anchored tool matchers and command predicates. Broad hooks add latency and create bypasses or accidental blocks.
- Parse stdin as structured JSON. Never use
eval, shell interpolation, or string-built commands with untrusted tool input. URL-encode identifiers and pass values as quoted arguments or request bodies. - Emit only the client's documented decision JSON on stdout; send diagnostics to stderr. Treat malformed input and output as a security failure under the chosen outage policy.
- Use one bounded HTTPS request with explicit connection and total timeouts. Do not log authorization headers, raw email, or response bodies containing user content.
- Do not let hook configuration auto-approve an action that the client's normal permission system denies. Context Guardrails should only add restrictions.
Apply platform failure behavior explicitly:
- Cursor: security hooks fail open on crashes, timeouts, and invalid JSON
unless the hook sets
failClosed: true. Set it for enforced boundaries.permission: "ask"is not enforced forpreToolUse; when review is required, use a boundary that supports asking or deny with a clear review instruction. - Claude Code: use a
PreToolUsedenial response or exit code2for a hard block. A timed-out command, HTTP, or MCP-tool hook continues through normal permission flow, so timeout alone is not fail-closed. Keep normal permission rules in place as defense in depth. - Codex CLI: use the documented
PreToolUsedenial JSON or exit code2with the reason on stderr. Invalid fields and hook failures can continue the tool call. Hosted tools such asWebSearchremain outside hook coverage.
Webhook setup
Use webhooks when the user wants Superagent events delivered to an agent, ticketing system, or remediation workflow. Webhook targets are configured at the organization level in Superagent Settings, not through the current MCP tool surface. Do not claim that an MCP call created or changed a webhook.
Before setup:
- Ask which public HTTPS endpoint should receive events and which event types the user needs.
- Confirm that the endpoint can preserve the raw request body, return a quick
2xxresponse, and move longer work to an asynchronous queue. - Show the proposed target name, URL, and subscriptions. Obtain approval before using browser tools or another authenticated interface to create or modify the organization-wide target.
Guide the user through Settings → Webhooks → Add webhook. Enter the approved target name and HTTPS URL, select subscriptions, save, and copy the signing secret. The secret is shown only once. Never ask the user to paste it into chat, and never place it in source control, command output, logs, or a response. Store it in the receiver's secret manager or environment.
Supported subscriptions include:
report.startedandreport.finishedfinding.created,finding.triage_completed, andfinding.acceptedcontributor_trust.finishedagent.finding_createdandagent.action_blocked
The receiver must:
- verify
X-Superagent-Signaturewith HMAC-SHA256 over<X-Superagent-Timestamp>.<raw-json-body>using the signing secret; - compare signatures with a timing-safe operation;
- deduplicate deliveries by
X-Superagent-Event-Idor the payloadid; - return a
2xxquickly, because network errors,408,429, and5xxresponses are retried.
After saving, send a test event from Settings and verify the signature, deduplication, and response path before enabling downstream automation. If the secret is exposed, regenerate it immediately and update the receiver.
Confirmation gates
Get explicit confirmation immediately before:
- creating any report or running automated finding triage, because these consume organization credits;
- permanently deleting a finding;
- creating, updating, assigning, or deleting Runtime Guardrails clients, groups, or rules;
- changing or restoring a built-in rule mode, because endpoint policy changes immediately;
- creating, changing, disabling, rotating, or deleting an organization webhook target or its event subscriptions;
- sending a target or content the user has not already authorized for remote analysis.
State the exact action, target, and consequence in the confirmation request. Tool annotations are hints, not a substitute for this gate.
Troubleshooting
401 invalid_token: verify the key is present, active, and sent asAuthorization: Bearer ....404or failed connection onsuperagent.sh/mcp: switch tohttps://www.superagent.sh/mcp.- Connected server with no tools: verify a proxy is not stripping the authorization header.
- Codex server unavailable: put
experimental_use_rmcp_client = trueabove all MCP server blocks and ensurebearer_token_env_varcontains the variable name. 429: wait for the server'sRetry-Afterinterval. Do not retry aggressively.
Documentation
Signals
- GitHub stars
- 76
- Forks
- 12
- Last commit
- Aug 2026
Advanced
- Catalog kind
- skill
- Gateway key
superagent- Source
- github.com/superagent-ai/skills