API Locker

io.github.apilocker由 GitHub 账号 apilocker 发布v1.0.3更新于 Oct 25, 2026

Encrypted credential vault: LLM, service & OAuth keys. 21-tool MCP server for your AI agent.

已验证STDIO仅桌面开发者工具安全与监控

概览

AI 生成的概览

API Locker 的本地 MCP 桥接,连接加密凭据保险库,让助手读取和管理已存的 LLM、服务与 OAuth 密钥。

可以做什么
读取并列出已存凭据,按 LLM、服务与 OAuth 分类,可按标签、提供商、类别或关键词筛选。存储、轮换、重命名、暂停、恢复和删除凭据,包括多字段的 OAuth 条目。取出单个密钥值,或输出可供 shell 使用的 export 语句。管理已注册设备和受限访问令牌,包括吊销。查看揭示、代理调用、重命名和轮换的审计日志,并运行安全健康检查。
适用场景
当你把 API 密钥和 OAuth 客户端凭据存放在 API Locker,并希望助手在不打开控制台的情况下查询、添加、轮换或审计这些凭据时适用。适合已在用 API Locker 命令行、想在 Claude Code、Claude Desktop、Cursor、Zed 或 Continue 中管理保险库的开发者。
运行要求
通过 apilocker npm 包以 stdio 在本地运行,用 mcp 子命令启动;需要 Node.js 18 或更高版本。需要 API Locker 账户,并通过浏览器授权流程注册设备;桥接会从本地配置文件读取主令牌。需要能访问 API Locker 服务的网络。
安装前请注意
该服务器可以揭示密钥值并输出到结果中,也能永久删除凭据。它管理受限访问令牌和设备吊销,误操作可能使应用或设备无法访问。本地配置文件保存每设备主令牌,不应提交到版本库。凭据操作和揭示会发送到 API Locker 服务并记入其审计日志。

安装

在 SourceWeft 中

  1. 打开 控制台中的 API Locker,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

API Locker

One vault, three types of credentials. LLM API keys, service API keys, and OAuth credentials — all encrypted, all injectable into your code with a single command.

API Locker replaces the .env file with one encrypted vault. Store your OpenAI key, your Stripe secret, your Google OAuth client — all in one place — and inject them into any command with apilocker run -- npm start. Your raw credentials never touch disk, never live in shell history, never get committed to git.

This is the command-line interface. Website · Dashboard

Install

bash
npm install -g apilocker

Requires Node.js 18 or newer.

Get started in three commands

bash
# 1. Install the CLI (above)
# 2. Register this device — opens your browser for a one-click confirmationapilocker register
# 3. Run any command with your vault secrets injected as env varsapilocker run -- npm start

That's it. Your process.env.OPENAI_API_KEY, process.env.STRIPE_SECRET_KEY, process.env.GOOGLE_OAUTH_CLIENT_SECRET — everything you'd normally drop in a .env file — is now injected into the subprocess for exactly the duration of that command. When the command exits, the secrets are gone.

One vault, three types of credentials

🧠 LLM API Keys

OpenAI, Anthropic, Gemini, Groq, Mistral.

bash
apilocker store --name OPENAI_API_KEY --provider openai --key sk-proj-xxxxxapilocker run -- node my-ai-app.js

⚡ Service API Keys

Stripe, Twilio, Resend, ElevenLabs, Cloudflare, GitHub, Clerk, Sentry, PostHog, Cloudinary, Mux, SendGrid, Vercel, Upstash, LemonSqueezy — plus custom for anything else.

bash
apilocker store --name STRIPE_SECRET_KEY --provider stripe --key sk_live_xxxxxapilocker run -- npm start

🔗 OAuth Credentials

Google, GitHub, Slack, Microsoft, Notion, Spotify, Twitter/X, LinkedIn, Discord, Zoom, Dropbox, Salesforce, HubSpot — plus custom OAuth for anything else.

bash
apilocker store --oauth \  --name google-oauth \  --provider google-oauth \  --client-id 856449...apps.googleusercontent.com \  --client-secret GOCSPX-xxxxx \  --scopes "openid email profile"
# Injects GOOGLE_OAUTH_CLIENT_ID, GOOGLE_OAUTH_CLIENT_SECRET, etc.apilocker run -- node oauth-app.js

The full command set

CommandWhat it does
apilocker registerRegister this device via browser confirmation. No pasted tokens.
apilocker storeStore a credential. --oauth for multi-field OAuth, otherwise --key.
apilocker listList credentials grouped into LLM / Service / OAuth buckets. Filter with --tag, --provider, --category, --search.
apilocker run -- <cmd>Run any command with vault secrets injected as environment variables.
apilocker get <alias>Print a single secret value to stdout (for scripting). --field for OAuth fields.
apilocker envEmit shell-eval-able export statements. eval "$(apilocker env)" to load into current shell.
apilocker initPin specific keys to a project directory via a committable .apilockerrc file.
apilocker import .envMigrate an existing .env file into the vault. Pattern-matches provider prefixes and offers to replace the .env with an .apilockerrc.
apilocker rotate <alias>Replace a credential's value. Scoped tokens keep working; rotation is transparent to consumers.
apilocker rename <old> <new>Rename a credential alias. Lossless — existing .apilockerrc files that reference the old name keep working via transparent fallback.
apilocker pause <alias> / resume <alias>Freeze proxy access without deleting. Reveal / run / get / env still work on paused credentials.
apilocker delete <keyId>Permanently delete a credential.
apilocker devices list / revoke <id>Manage devices registered to your account.
apilocker token create/list/pause/resume/deleteManage scoped access tokens for app/proxy use.
apilocker activityView the audit log. Add --follow / -f to stream new events live.
apilocker doctorSecurity health check: stale rotations, unused keys, expiring tokens, local config permissions.
apilocker updateCheck npm for a newer version.

The .apilockerrc file

Pin a project to a specific set of credentials with a committable config file. apilocker init walks you through creating one:

yaml
# .apilockerrc — safe to commit to git, contains only pointerskeys:  - OPENAI_API_KEY  - STRIPE_SECRET_KEY  - google-oauth

After apilocker init, anyone cloning your repo who runs apilocker run -- npm start gets the same env vars — assuming they have access to those aliases in their own vault. It's like a package.json for credentials: the file declares what the project needs, each developer has their own vault.

Why the CLI doesn't ask for a pasted master token

Unlike most developer tools, apilocker register doesn't want you to paste a secret from the dashboard. Instead:

  1. You run apilocker register
  2. Your browser opens to a single-card confirmation page
  3. You click "Authorize"
  4. The CLI receives a per-device master token over an authenticated polling channel — it never touches your clipboard, shell history, or screen

This is the RFC 8628 device authorization flow (the same pattern gh, vercel, wrangler, flyctl, and gcloud use). It's strictly safer than pasted tokens because the secret never appears anywhere a human can accidentally leak it.

New users? The same flow handles signup — your first OAuth click with GitHub/Google creates the account automatically. No separate visit to the web portal required.

MCP integration — connect your AI assistant

API Locker exposes a full Model Context Protocol server with 25 tools so Claude Code, Claude Desktop, Cursor, Zed, Continue, and any other MCP-compatible client can read and manage your vault directly.

Claude Code — one command

bash
claude mcp add apilocker -- apilocker mcp

Verify with claude mcp list. You should see apilocker: apilocker mcp - ✓ Connected. The server is available in your next Claude Code session automatically.

Claude Desktop, Cursor, Zed, Continue

The CLI ships with apilocker mcp — a stdio bridge that handles the connection automatically. Configure any MCP client with:

json
{  "mcpServers": {    "apilocker": {      "command": "apilocker",      "args": ["mcp"]    }  }}

The bridge reads your master token from ~/.apilocker/config.json automatically. No credentials go in the client config itself.

Print client-specific config with the built-in helper:

bash
apilocker mcp config --client claude-desktop   # or claude-code, cursor, continue, zed, generic

Full docs: https://www.apilocker.app/docs/mcp — includes config file locations for each client, troubleshooting, and the full 25-tool catalog.

Visual status: the dashboard has a dedicated MCP panel at https://www.apilocker.app/dashboard#mcp showing server status, a test-connection button, copy-pasteable config for every major client, and a live feed of recent MCP activity.

Security posture

  • AES-256-GCM encryption on every stored credential. Keys never leave the vault in plaintext except when revealed to an authenticated master-token holder (you).
  • Per-device tokens with independent revocation. Stolen a laptop? Revoke that one device; every other device keeps working.
  • OAuth CSRF protection with state tokens bound to a 10-minute KV window.
  • Strict file permissions (0600) on ~/.apilocker/config.json.
  • Audit-logged everywhere: every reveal, every proxy call, every rename, every rotation. Watch them live with apilocker activity --follow.
  • Lossless rename with previous_names fallback: renaming a credential never breaks existing code. Old aliases transparently resolve to the current credential with a gentle nudge to update configs.
  • Pause/resume to freeze proxy access during incident response without losing the credential itself.

Configuration

Config lives at ~/.apilocker/config.json (mode 0600). Don't check it in.

Override the API endpoint for self-hosted deployments:

bash
apilocker register --url https://api.your-locker.example.com

Status

API Locker is free to use with unlimited keys, unlimited tokens, and unlimited proxy calls. Early adopters get grandfathered into free Pro permanently when paid plans launch.

Links

License

MIT © 2026 API Locker

来源:cli/README.md,提交 babe588

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v1.0.3最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分