Skip to main content
Relic includes a built-in MCP server that lets AI assistants manage your secrets without ever seeing the actual values. Run relic mcp to start the server over stdio.

Setup

You must be authenticated before using the MCP server. Run relic login if you haven’t already.

Cursor

Add this to .cursor/mcp.json in your project root or global Cursor settings. This applies to both Cursor IDE and Cursor CLI.

Claude Code

This registers the server globally in ~/.claude.json. To scope it to the current project, add the --scope project flag:

Codex

Run the CLI command:
Or add it manually to ~/.codex/config.toml (global) or .codex/config.toml (project-scoped):

Zed

Add this to your Zed settings.json:
Zed supports MCP Tools and Prompts only. Resources and Sampling are not yet implemented.

OpenCode

Add this to your opencode.jsonc or opencode.json:

Claude Desktop

Add this to claude_desktop_config.json:

Available Tools

whoami

Returns the authenticated user’s name, email, and plan.

list-projects

Lists all projects (owned and shared) with their environments and folders.

list-secrets

Lists secret key names, and scopes for a given project environment.
This tool returns secret names only, never decrypted values. This is by design. Because Relic is end-to-end encrypted on your device, secret values should never appear in an AI context window.

get-current-project

Reads relic.toml from the current directory and returns the project ID and config path. Useful for the AI to understand which project it’s working in.

run-with-secrets

Runs a command with decrypted secrets injected as environment variables. Returns the command’s exit code, stdout, and stderr, with secret values redacted on a best-effort basis.
  • Redaction: every decrypted secret value of 4 or more characters is replaced with [REDACTED:KEY] in stdout and stderr before the output is returned.
  • Env-dump gate: bare env / printenv / set, shell prefixes (exec / command / builtin), process wrappers (nice / stdbuf / busybox), alternate builtins (export -p, declare -x / -p, typeset -x, compgen -e), /proc/*/environ, PowerShell Env: listings, and opaque PowerShell -EncodedCommand (including inside sh -c / pwsh -c) are refused unless allowDangerousEnvDump is true. env FOO=bar cmd is still allowed.
  • Credentials: the command inherits the MCP server’s environment minus all RELIC_* variables, so RELIC_PASSWORD, RELIC_API_KEY, and RELIC_SERVICE_TOKEN are not visible to it.
  • Limits: each stream is capped at 50,000 characters. On timeout the command (and its child processes) is killed and the partial output is returned with timedOut: true.
Redaction is best effort. It only catches verbatim values: a command that encodes, splits, or transforms a secret (for example base64, or printing it character by character) can still reveal it to the AI. Common env dumps are blocked by default for that reason, but the gate is not a sandbox — interpreters such as python -c / node -e that print os.environ / process.env are still residual. Only let the assistant run commands you would be comfortable sharing the output of — Relic does not claim that AI agents never see secret values.

Security Model

The MCP server inherits Relic’s client-side encryption. All decryption happens locally on your machine, and the server communicates with the AI assistant over stdio (no network exposure).

Example Usage

Once configured, you can ask your AI assistant things like:
  • “What secrets are in my production environment?”
  • “List all my Relic projects”
  • “Run my test suite with staging secrets”
  • “Which project is this directory linked to?”
The assistant will use the appropriate MCP tool and return the results with secret values redacted.
Last modified on October 26, 2026