
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 分