🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@securecode/mcp-server

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@securecode/mcp-server

SecureCodeHQ MCP Server - Let Claude Code access your secrets securely

Source
npmnpm
Version
0.14.0
Version published
Weekly downloads
26
-40.91%
Maintainers
1
Weekly downloads
 
Created
Source

@securecode/mcp-server

MCP Server for SecureCodeHQ. Lets Claude Code access your secrets securely — without ever seeing them.

Zero-Knowledge AI Access

By default, secret values are never shown to the AI. When Claude reads a secret, the value is written to a local file on your machine. The AI gets the file path but never sees the actual value.

You: "Get my Stripe API key"
Claude: ✓ STRIPE_KEY injected → ~/.securecode/.session/a1b2c3d4.env

The value is NOT in this conversation.

This is inject mode — the default. If you explicitly need the AI to see the value, use reveal: true.

Setup (2 minutes)

1. Get your API key from securecodehq.com > Settings > API Keys

2. Add to your Claude Code config:

Edit ~/.claude.json:

{
  "mcpServers": {
    "securecode": {
      "command": "npx",
      "args": ["@securecode/mcp-server"],
      "env": {
        "SECURECODE_API_KEY": "sc_your_key_here"
      }
    }
  }
}

3. Restart Claude Code. That's it.

What Claude Can Do

Once connected, Claude Code can:

"Get my Stripe API key"              -> injects to local file (AI never sees value)
"Get my DB_URL with reveal"          -> reveals value to AI (audited)
"List my production secrets"         -> shows names and tags, never values
"Save this API key as OPENAI_KEY"    -> creates a new secret
"Import my .env.production file"     -> bulk import with auto-tagging
"Lock my session"                    -> blocks all access until you wake it
"Set up SecureCode"                  -> guided onboarding: signup, import, configure
"byebye"                            -> locks session + cleans secrets from disk

Available Tools

ToolDescription
get-secretGet a secret — inject to file by default, reveal: true to show to AI, cleanup: true to remove files
list-secretsList all secrets with tags, expiry status, and descriptions
create-secretCreate a new secret with tags, TTL, and domain
update-secretUpdate value, description, tags, or domain
delete-secretSoft-delete a secret
renew-secretRenew expired secrets or change TTL
import-envImport from .env or CSV content (with preview mode)
export-envExport secrets as .env or CSV format
get-statusCheck plan, usage limits, secrets count, and MCP server version
wake-sessionUnlock session with optional tag scope and auto-sleep timer
sleep-sessionLock session immediately, block all access, clean injected files
session-statusCheck session status, scope, and time remaining
byebyeEnd session: lock + clean all injected secrets from disk + goodbye
get-active-rulesList active MCP access rules (read-only)
onboardGuided setup: sign up, import .env, auto-create API key, configure MCP — all from Claude Code
helpGet SecureCode documentation: tools, SDK setup, sessions, rules, troubleshooting

Guided Onboarding

New to SecureCode? Just tell Claude:

You: "Set up SecureCode for this project"
Claude: [calls onboard]

Step 1: Open this link to create your account → (opens signup popup)
Step 2: Open this link to import your .env   → (opens import popup)
Step 3: API key created and MCP configured    → (Claude does it automatically)

The entire setup takes under 3 minutes without leaving your terminal:

  • Your .env files stay untouched — SecureCode is for your AI agent to access secrets without reading .env directly.
  • The API key is auto-created and configured — it never appears in the conversation if you let the agent do it.
  • After restart, all SecureCode tools work immediately.

MCP Access Rules

Control how AI agents access your secrets with tag-based policies. Rules are created from the dashboard and enforced server-side.

ActionEffect
Block AlwaysSecret is only accessible from the dashboard
Require ConfirmationAgent must acknowledge before accessing
Require SessionRequires an active session (wake-session)
Block ModelsOnly allows specific AI models
NotifySends email notification on access (non-blocking)
You: "Read my STRIPE_LIVE_KEY"
Claude: [MCP Rule: "Block production secrets"]
        Access blocked. This secret is only accessible from the dashboard.

Rules are evaluated by priority: Block Always > Require Session > Block Models > Require Confirmation > Notify.

Auto-Update Check

The MCP server checks for updates on first use. If your version is outdated, you'll see a warning with every tool response:

⚠ Your SecureCode MCP server is outdated (v0.6.1 → v0.7.0).
To update, restart Claude Code — it will fetch the latest version automatically if you use npx.

Security Tips (Tip Engine)

The MCP server includes an adaptive Tip Engine that educates developers about security best practices:

  • First session: Welcome message with best practices (shown before first secret)
  • Production access: Warning when accessing production-tagged secrets (shown before secret)
  • Stale secrets: Reminder to rotate credentials older than 90 days
  • Generic names: Suggestion to use descriptive secret names
  • No TTL: Recommendation to set expiration on frequently-used secrets

Tips are throttled (max 3 per session, 1-week cooldown per secret) so they inform without annoying.

Session Lock

Control access to your secrets per session:

You: "Wake my session for the acme project staging"
Claude: [calls wake-session with scope [{project:"acme", env:"staging"}]]
       -> Session unlocked. Only acme/staging secrets accessible.

You: "Lock my session"
Claude: [calls sleep-session]
       -> Session locked. All access blocked. Injected files cleaned.

You: "byebye"
Claude: -> Session locked & secrets cleaned from disk. See you next time!

Sessions auto-sleep after configurable inactivity (default: 2 hours).

How It Works

  • Zero-knowledge by default: Secret values are written to a local file — the AI never sees them
  • Reveal mode: Explicit reveal: true returns value to AI (audited as conscious action)
  • Auto-cleanup: Injected files are removed on sleep, byebye, process exit (SIGINT/SIGTERM), or next inject
  • Parallel sessions: Multiple Claude Code instances don't collide (file hash based on API key + PID)
  • Secrets are encrypted with AES-256-GCM using envelope encryption (Cloud KMS)
  • Every access is logged with AI model, IP, machine identity, access mode (inject/reveal), and timestamp
  • API keys are scoped to your account with sc_ prefix
  • The MCP server runs locally via stdio transport — secrets never pass through third parties
  • Device approval required on first use from each machine
  • MCP Access Rules enforce tag-based policies server-side before secret delivery

Requirements

  • Node.js >= 18
  • A SecureCodeHQ account with an API key

License

MIT

Keywords

mcp

FAQs

Package last updated on 11 Mar 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts