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

phantom-secrets-mcp

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

phantom-secrets-mcp

MCP server for Phantom Secrets — lets AI coding tools manage API keys safely without ever seeing real values. 25 tools for Claude Code, Cursor, Windsurf, and Codex.

latest
Source
npmnpm
Version
0.6.0
Version published
Weekly downloads
65
103.13%
Maintainers
1
Weekly downloads
 
Created
Source

Phantom Secrets MCP Server

MCP server for AI-safe secrets management. Lets Claude Code, Cursor, Windsurf, and Codex manage API keys without ever seeing real values.

npm License: MIT

Part of Phantom Secrets -- the CLI that replaces real secrets with inert phm_ tokens so AI agents never see your API keys.

Install

Claude Code

claude mcp add phantom-secrets-mcp -- npx phantom-secrets-mcp

Cursor

Add to Cursor Settings > Features > MCP Servers:

  • Name: phantom
  • Command: npx phantom-secrets-mcp

Windsurf

Add to ~/.codeium/windsurf/mcp_config.json:

{
  "phantom": {
    "command": "npx",
    "args": ["phantom-secrets-mcp"]
  }
}

Codex / Other MCP Clients

Add to your MCP configuration:

{
  "phantom": {
    "command": "npx",
    "args": ["phantom-secrets-mcp"]
  }
}

Works with any tool that supports the Model Context Protocol.

25 MCP Tools

Read-only tools (safe to call anytime):

ToolDescription
phantom_list_secretsList secret names in the vault (never exposes values)
phantom_statusCheck project configuration, vault health, and proxy state
phantom_doctorDiagnose configuration and vault health
phantom_whyExplain why a key is or is not protected
phantom_checkScan for unprotected secrets (pre-commit-style)
phantom_envList environment variables with protection status (no values)
phantom_syncPreview deployment-platform sync (Vercel, Railway)
phantom_cloud_statusCheck cloud authentication and sync status

Mutating tools (modify vault or .env):

ToolDescription
phantom_initProtect secrets in .env files -- store in vault, rewrite with phantom tokens
phantom_add_secret_interactiveStart a terminal prompt for adding a secret without passing the value through MCP
phantom_remove_secretRemove a secret from the vault
phantom_rotateRegenerate all phantom tokens (invalidates old ones)
phantom_copy_secretCopy a secret from this project to another project's vault
phantom_wrapWrap a plaintext .env value into a vaulted phm_ token
phantom_unwrapReverse a wrap (restore plaintext to .env from vault)
phantom_cloud_pushPush encrypted vault to Phantom Cloud (E2E encrypted)
phantom_cloud_pullPull and decrypt vault from Phantom Cloud

Team vault tools (Pro plan; multi-developer shared vaults):

ToolDescription
phantom_team_listList teams the user belongs to (read-only)
phantom_team_createCreate a new team. Caller becomes owner
phantom_team_membersList members of a team (read-only)
phantom_team_inviteInvite someone to a team by GitHub username
phantom_team_key_publishRegister the caller's X25519 public key on a team
phantom_team_vault_pushPush the current project's vault to a team (envelope-encrypted to every registered member)
phantom_team_vault_pullPull the team vault into the local vault

All tools are read-safe: they never return actual secret values, and real secret values are never accepted as MCP tool arguments. The AI can manage your secrets lifecycle (add, remove, rotate, sync, share with teams) without key exposure in agent context. Mutating tools require confirm: true.

How It Works

  • The MCP server runs as a stdio transport process alongside your AI coding tool
  • When the AI needs to manage secrets, it calls Phantom MCP tools
  • Phantom stores real secrets in the OS keychain (macOS Keychain, Linux Secret Service) or encrypted file vault
  • The AI only ever sees phm_ phantom tokens -- never real API keys
  • A local reverse proxy swaps tokens back at the network layer when making API calls

Requirements

  • Phantom Secrets CLI must be initialized in your project (npx phantom-secrets init)
  • Node.js >= 16
  • macOS (arm64/x64) or Linux (x64/arm64)

Cloud Sync

The MCP server includes cloud push/pull tools for syncing vaults across machines:

AI: "Push this project's secrets to the cloud"
-> phantom_cloud_push (E2E encrypted with ChaCha20-Poly1305, Argon2id key derivation)

AI: "Pull secrets from the cloud to this machine"
-> phantom_cloud_pull (decrypted locally, server never sees plaintext)

Requires phantom login (GitHub OAuth) via the CLI first.

License

MIT

Keywords

mcp

FAQs

Package last updated on 04 May 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