
NIM Key Manager
io.github.BySergiMM由 GitHub 帳號 BySergiMM 發布v1.0.0更新於 Oct 24, 2026
Self-hosted NVIDIA NIM API-key manager with a Claude MCP connector; deploy your own instance.
概覽
自架的 NVIDIA NIM API 金鑰管理器,提供受 OAuth 保護的 MCP 端點,讓助理列出、發放、輪替與撤銷金鑰。
- 可以做什麼
- 列出並檢視已登記的 NVIDIA NIM API 金鑰及其狀態與到期情形。
- 依全域或依專案發放可直接使用的金鑰,並記錄使用情況。
- 登記、驗證、輪替與撤銷金鑰,並留下稽核紀錄。
- 管理用來依使用方或工作負載分組金鑰的專案。
- 依角色權限檢視金鑰清單與使用統計。
- 適用情境
- 適合自己持有 NVIDIA Build/NIM 金鑰、希望助理直接取用某個工作負載的金鑰、查看哪些金鑰即將到期或已失效,或不必開儀表板就能輪替與撤銷金鑰的情境。
- 執行需求
- 需自行部署本專案(Docker 容器加 PostgreSQL,例如使用提供的 Render 藍圖),並可透過基礎網址存取;MCP 端點為該基礎網址加上 /mcp。需要 GitHub OAuth App(Google 可選)的用戶端 ID 與密鑰、MCP_ALLOWED_IDENTITIES 允許名單,以及透過 FIRST_ADMIN_EMAIL 與 FIRST_ADMIN_PASSWORD 設定的初始管理員帳號。JWT_SECRET、ENCRYPTION_MASTER_KEY 與 MCP_OAUTH_JWT_SIGNING_KEY 由平台產生。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 NIM Key Manager,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
NIM Key Manager
[NIM-KE~1]Self-hosted, production-ready manager for the API keys of your own NVIDIA Build/NIM account — encrypted storage, assisted rotation, expiry detection, usage stats, projects, RBAC, audit, a web dashboard, and a Claude MCP connector. Deploy your own instance in a few minutes; everything is configured through environment variables.
[CI] [License: MIT] [Python 3.12] [Coverage]
Not affiliated with NVIDIA. This is an independent open-source project: it is not affiliated with, endorsed by or sponsored by NVIDIA Corporation. "NVIDIA", "NVIDIA Build" and "NIM" are used only to say which service the software works with; product and company names belong to their respective owners.
NVIDIA Terms of Service. NVIDIA Build offers no public API to create or rotate keys programmatically (you generate them at build.nvidia.com), and API keys must not be shared or redistributed to third parties. This project is therefore designed for you to manage your own keys on your own instance: the only outbound call is the official read-only validation endpoint
GET https://integrate.api.nvidia.com/v1/models. It does not automate or scrape the NVIDIA portal, and it is not a service for handing your keys to other people.
Deploy your own (no local setup)
- Click the button (or Use this template → Create repository, then in Render pick New → Blueprint and select your fork). Render reads
render.yamland provisions everything automatically:- a managed PostgreSQL database,
- the Dockerized web service with a health check,
- the secrets
JWT_SECRET,ENCRYPTION_MASTER_KEYandMCP_OAUTH_JWT_SIGNING_KEY(generated and stored by Render's secret manager), DATABASE_URLinjected from the database.
- When prompted, set
FIRST_ADMIN_EMAILandFIRST_ADMIN_PASSWORD(your initial admin, created on first boot; required, because no HTTP request can create the first administrator). - Open the service URL: log in at
/, explore the API at/docs. - Every push to
mainruns CI (lint + types + tests + build) and Render redeploys it automatically once all the checks pass (a failing commit is not deployed). Migrations (alembic upgrade head) run on container start.
Prefer another host? Any platform that runs a Docker container + PostgreSQL works — see docs/deployment.md.
Use it from Claude (MCP connector)
The same deployment exposes a Model Context Protocol server at ‹BASE›/mcp so you can add it to Claude as a custom connector. Claude authenticates with OAuth 2.1 (GitHub by default, Google optional) and can list/inspect keys, dispense a ready-to-use key, register/rotate/revoke and manage projects — with the same RBAC and audit trail as the REST API. Only identities in MCP_ALLOWED_IDENTITIES may connect (fail-closed). The connector is optional: until you set the OAuth credentials below, /mcp stays off and everything else runs normally.
- Create a GitHub OAuth App with callback
‹BASE›/auth/callback; copy the Client ID/Secret. - In Render set
MCP_GITHUB_CLIENT_ID,MCP_GITHUB_CLIENT_SECRETandMCP_ALLOWED_IDENTITIES(your numeric GitHub user id and/or e-mail, not your login:curl -s https://api.github.com/users/YOUR-LOGIN | jq .id; users the connector creates are viewers unless you setMCP_DEFAULT_ROLE). The rest is already inrender.yaml. - In Claude: Settings → Connectors → Add custom connector → URL
‹BASE›/mcp→ Connect.
Full guide (Google, tool reference, security, troubleshooting): docs/connector.md.
Features
- Secure key registration — encrypted at rest with AES-256-GCM (key derived via HKDF-SHA256 from the platform secret manager). Never stored or logged in plaintext.
- Assisted, audited rotation — you create the new key in your NVIDIA account, paste it, and the system performs an atomic swap (new key active, old one revoked with a
rotated_from_idlineage link). - Expiry detection — hourly background job + maintenance endpoint; configurable
expiring_soonflag. - Periodic validation — automatic sweep against NVIDIA every 6 h (configurable) that flags invalid/revoked keys.
- Key dispensing —
GET /api/v1/keys/dispensereturns the least-recently-used active key (LRU), globally or per project, recording usage. - Projects — group keys by consumer/workload.
- Statistics — inventory by status, dispenses, usage time series.
- Security — JWT (access + refresh), roles
admin/manager/viewer, rate limiting, immutable audit of every sensitive operation. - Claude connector (MCP) — OAuth-secured MCP server at
/mcp(see above). - Operations — structured JSON logging, Prometheus metrics at
/metrics(behind an admin token orMETRICS_TOKEN), health check at/health, OpenAPI at/docs.
Architecture
Pragmatic Clean Architecture: dependencies point inward; the application layer knows nothing about FastAPI and reaches NVIDIA through the KeyValidator port. Details and decisions in docs/architecture.md.
Stack: Python 3.12 · FastAPI · FastMCP (Claude connector) · SQLAlchemy 2 (async) · managed PostgreSQL · Alembic · Docker · GitHub Actions · Render (Blueprint) · structlog · Prometheus · slowapi · APScheduler.
API quickstart
More examples (rotation, projects, stats, audit) in docs/api-examples.md. Interactive OpenAPI at /docs.
Roles
Development & tests
Not required to deploy, but fully supported:
Security
Threat model, cryptographic details and design decisions in docs/security.md. Key points: AES-256-GCM encryption with a key derived (HKDF) from the secret manager, SHA-256 fingerprints to deduplicate without exposing the secret, short-lived signed JWTs, argon2 password hashing, per-IP rate limiting, audit of every sensitive operation, and no plaintext keys in logs or responses except the explicit dispense endpoint. To report a vulnerability, see SECURITY.md.
Contributing
Contributions are welcome — see CONTRIBUTING.md and the Code of Conduct. A short Spanish overview is available in README.es.md.
License
MIT — see LICENSE.
來源:README.md,提交 d7454a2
工具
0版本歷史
1- v1.0.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分