SuperAPIAI Directory

secureinput

github.com · AI security

SecureInput is an open-source, local-first MCP server for securely providing API keys, passwords, and tokens to coding agents. Users enter credentials through a chat-embedded input box or a browser page, and the credentials are passed directly to local commands (stdin or environment variables) or written to a .env file; the agent only receives status and exit codes and by default cannot see the secret values. It supports stdio MCP clients such as Claude Code, Claude Desktop, Cursor, Codex, VS Code/GitHub Copilot, Windsurf, and Cline, runs on macOS and Linux, and requires Node.js 22+.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsmacOS · Linux

About this tool

SecureInput is an open-source, local-first MCP server designed to solve the problem that coding agents need credentials but should not see them directly. When an agent needs an API key, password, or token, the user enters the value through a chat-embedded input box (styled to match the host input box) or a browser fallback page, and the credential is passed directly to a local command (via stdin or environment variables) or written to a .env file; the agent only receives a result such as {"ok": true, "status": "completed", "exitCode": 0}.

Key capabilities:

  • Provides a single MCP tool request_secret, along with check, cancel, and status tools.
  • Supports both embedded input and browser input modes; text clients automatically fall back to a pairing page on 127.0.0.1.
  • Delivery methods include execute (directly execute a command, shell: false, with the secret passed via stdin or env), write_env (atomically write to a .env or .env.* file with permissions 0600, preserving comments and line breaks), and a return mode that is disabled by default (returns the secret to the agent, marked as dangerous).
  • Embedded input uses AES-256-GCM encryption, with the key wrapped by an RSA-OAEP key pair held only by the daemon.
  • Security measures include: binding only to 127.0.0.1, pairing tokens, signed session cookies, Origin and CSRF checks, RE2 safe regex, size limits, ANSI stripping, output redaction, audit logs that do not record values, allowed-root restrictions, and timeout-based termination of process groups, among others.
  • Provides command-line tools: secureinput status, doctor, pair, stop, etc.; the daemon listens on http://127.0.0.1:4780,配置位于 ~/.secureinput/ (permissions 0600).

Usage:

  • Launch via npx -y secureinput mcp (Node.js 22+); the first use starts a shared local daemon.
  • Claude Desktop can install it via the downloadable .mcpb extension package; Codex can be configured in ~/.codex/config.toml; it can also be built from source (git clone, npm ci, npm run build, npm link).
  • It is recommended to add instructions to agent rule files (such as CLAUDE.md, AGENTS.md, .cursor/rules) guiding the agent to use this tool instead of asking the user to paste secrets.
  • Supports HTTP Streamable MCP endpoints, suitable for clients that prefer HTTP.

Use cases:

  • When coding agents need access to API keys, tokens, or passwords, avoid secrets appearing in chat logs or model context.
  • Local development scenarios that require securely writing credentials to a project's .env file.
  • Scenarios that require executing non-interactive commands and passing secrets.

Limitations and caveats:

  • Only supports macOS and Linux, requires Node.js 22+.
  • Targets a local desktop threat model, not suitable for hostile multi-user hosts.
  • User-approved commands may still leak secrets; if an agent has file system or terminal access, it may read .env files that have been written.
  • Malware running as the same user, root, compromised browsers, malicious extensions, or keyloggers can read input content; SecureInput does not claim to prevent these.
  • Environment variables may be visible to other processes of the same user on some systems; prefer stdin.
  • Output redaction is best-effort only for transformed secrets (hashed, split, encrypted, or re-encoded).
  • Pending requests and secret values are stored only in memory and are discarded when the daemon restarts.
  • .env files are plaintext; SecureInput only sets secure permissions and does not encrypt content.
  • Embedded input does not show the browser-mode review checkbox; submitting authorizes delivery.
  • Commands must be non-interactive; TTY-only login flows are not supported.
  • The allowed root directory defaults to the user's home directory and can be tightened via --root.
  • Return mode is disabled by default; the daemon must be started with --allow-return, and once enabled secretswill enter the model context and logs.
Up/Down to navigate · Enter to open · ESC to closeBrowse all tools