MCP Setup
Add q-ring as an MCP server so AI agents can manage secrets natively - same single binary, every host. New to q-ring? Start with Getting Started.
Server config
Configure MCP
Point your editor at the qring-mcp binary. Config snippets for every supported host.
Since v0.15, qring setup cursor (or kiro / claude) writes these configs for you - merged non-destructively, so existing servers are preserved. The snippets below are the manual equivalent.
Diagram: your AI editor talks to the q-ring airlock, which applies policy.wrap rules, strips the environment of spawned servers, scrubs known secret values (whole or encoded) from results, errors and progress, and audits every call before anything reaches the third-party MCP server.
Since v0.16, q-ring can also stand between your agent and other MCP servers: qring mcp wrap -- npx some-mcp-server runs a third-party server behind the airlock - spawned with a stripped environment and every tool call audited, with tool arguments deliberately never logged. Since v0.17.5 the airlock also proxies resources and prompts, wraps remote servers with --url, scrubs known secret values from every result, and enforces the project's policy.wrap rules - allow/deny globs, approval-gated tools, rate limits. Since v0.19 the scrub covers errors, progress messages and URIs too, matches each value whole and in its base64, hex, URL and JSON-escaped forms, and replaces it with a token that names the key, such as [QRING:REDACTED:GITHUB_TOKEN]. Unlike qring exec, the airlock never matches partial slices of a secret: an agent could otherwise read one out a character at a time through a tool that echoes its input. If redaction cannot be set up, results are withheld.
The q-ring server also exposes read-only MCP resources, so state an agent should look at costs no extra tools (still 46). Every resource is JSON, never contains a secret value, and goes dark when .q-ring.json policy denies the tool that exposes the same information.
qring://sessions- Per-agent session summaries from the audit chain, last 7 days (canary trips stripped; hidden when audit_log is denied)qring://sessions/{id}- One session's event timeline, key names and actions onlyqring://policy- The active .q-ring.json policy as the agent may see it; says so when there is none or the file is corrupt (hidden when get_policy_summary is denied)qring://rotation- The rotate:due --all list: scheduled secrets with state, interval and due date, most overdue first (hidden when list_secrets is denied)qring://canaries- Planted canaries with trip counts and alert channels; off by default, listed only when the server starts with QRING_MCP_EXPOSE_CANARIES=1
Cursor / Kiro
{
"mcpServers": {
"q-ring": {
"command": "qring-mcp"
}
}
}Claude Code
// Fastest: the native plugin (MCP + commands + skills + hooks)
// /plugin marketplace add I4cTime/q-ring
// /plugin install qring@q-ring
// Or MCP-only via project .mcp.json:
{
"mcpServers": {
"q-ring": {
"type": "stdio",
"command": "qring-mcp"
}
}
}VS Code
{
"servers": {
"q-ring": {
"command": "qring-mcp"
}
}
}Optional
Editor Plugins
One install that pre-wires Cursor, Kiro, or Claude Code with the full q-ring toolkit.
The q-ring editor plugins bundle rules, skills, agents, slash commands, hooks, and the MCP connector - pre-wired to the 46 tools, packaged natively for each editor (Cursor rules, Kiro steering docs, Claude Code skills plus a SessionStart hook that loads the always-on rules).
3 Rules
Always-on guidance: secret hygiene, q-ring workflow, and .env file safety.
5 Skills
Auto-triggered by context: management, scanning, rotation, exec-with-secrets, and project onboarding (Claude Code adds a sixth carrying the always-on rules).
2 Agents
Security auditor for proactive monitoring and secret-ops for daily management.
8 Commands
Slash commands for the most common operator tasks: scan, rotate, validate, exec, teleport, and more.
3 Hooks
After-file-edit scan, session-start project context loading, and a pre-shell guard against exposing .env files.
MCP Connector
Auto-connects to qring-mcp via stdio. All 46 tools available in-IDE.
# One command per editor: $ qring setup cursor # or kiro / claude # Claude Code marketplace, or manual build from a checkout: $ /plugin marketplace add I4cTime/q-ring $ pnpm run plugin:sync
MCP cookbook
Prompt cookbook
Every MCP tool with a one-sentence prompt example you can paste into any agent chat.
get_secretRetrieve `OPENAI_API_KEY` from project scope for `prod` and return just the raw value.
promote_secretPromote `DATABASE_URL` from `staging` to `prod`, and tell me first if prod already holds a different value.
diff_environmentsCompare `staging` and `prod` key by key and list what differs or is missing on one side - statuses only, no values.
list_secretsList project secrets tagged `payments` and show only stale entries matching `STRIPE_*`.
set_secretSet `STRIPE_SECRET_KEY` in project scope with tags `payments,prod` and a TTL of 86400 seconds.
delete_secretDelete `LEGACY_TOKEN` from global scope and confirm whether it existed.
has_secretCheck whether `GITHUB_TOKEN` exists in project scope and return true/false.
export_secretsExport only `OPENAI_API_KEY` and `STRIPE_KEY` as `.env` for `prod`.
import_dotenvImport this `.env` content into project scope in dry-run mode and report what would change.
check_projectValidate `.q-ring.json` at this path and show missing, stale, and expired required keys.
env_generateGenerate `.env` content from the project manifest for `staging` without writing files.
inspect_secretInspect `DB_PASSWORD` and summarize scope, decay state, tags, and entanglement metadata.
detect_environmentDetect current environment for this project path and include the detection source.
generate_secretGenerate an `api-key` with prefix `sk-` and save it as `OPENAI_API_KEY` in project scope.
entangle_secretsEntangle `API_KEY` in this project with `API_KEY_BACKUP` in another project path.
disentangle_secretsRemove entanglement between `API_KEY` and `API_KEY_BACKUP` and confirm success.
tunnel_createCreate an ephemeral tunnel value with TTL 300 and maxReads 1, then return the tunnel ID.
tunnel_readRead tunnel `tun_abc123` once and return value or not-found/expired status.
tunnel_listList all active tunnels with read counts and time remaining.
tunnel_destroyDestroy tunnel `tun_abc123` immediately and confirm whether it existed.
teleport_packPack keys `OPENAI_API_KEY` and `STRIPE_KEY` into an encrypted bundle using this passphrase.
teleport_unpackUnpack this teleport bundle in dry-run mode and list keys and scopes that would be imported.
audit_logReturn last 100 `read` audit events for `OPENAI_API_KEY` in reverse chronological order.
detect_anomaliesDetect anomalies for `OPENAI_API_KEY` and include recommendations.
health_checkRun a project-scope health check and summarize healthy/stale/expired plus anomaly count.
validate_secretValidate `OPENAI_API_KEY` with provider auto-detection and return provider + latency.
list_providersList available validation providers with descriptions and known key prefixes.
register_hookRegister an HTTP hook for `DB_PASSWORD` rotate events to this URL with a clear description.
list_hooksList all registered hooks and include type, match criteria, and enabled status.
remove_hookRemove hook `hk_abc123` and return a not-found error if it does not exist.
exec_with_secretsRun `npm test` with only `OPENAI_API_KEY` injected using restricted profile.
scan_codebase_for_secretsScan `./src` for hardcoded secrets and return file, line, key name, and entropy.
get_project_contextReturn redacted project context for this path including manifest and recent actions.
agent_rememberRemember the note `rotated Stripe keys after release` under key `release_notes`.
agent_recallRecall key `release_notes`; if omitted, list all memory keys and update times.
agent_forgetForget memory key `release_notes` and report whether it was present.
lint_filesLint these files for hardcoded secrets in fix mode and return structured fix results.
analyze_secretsAnalyze project secrets for unused keys, stale entries, and top read frequency.
status_dashboardStart the live status dashboard on port 9876 and return the local URL - page surfaces KPIs, manifest gaps, policy posture, approvals, hooks, anomalies, and a filterable 24h audit feed without ever rendering secret values.
agent_scanRun one agent scan with auto-rotate enabled across these project paths and return report JSON.
verify_audit_chainVerify audit hash-chain integrity and show first break location if tampering is detected.
export_auditExport audit events as JSON from 2026-03-01 until now.
rotate_secretAttempt provider-native rotation for `OPENAI_API_KEY` and store the new value if rotated.
ci_validate_secretsRun CI batch validation for project scope and return pass/fail summary JSON.
check_policyCheck whether command `npm publish` is allowed by exec policy for this project path.
get_policy_summaryReturn governance policy summary for this project, including tool and secret lifecycle rules.