NIM Key Manager

io.github.BySergiMMPublished by GitHub account BySergiMMv1.0.0Updated Oct 24, 2026

Self-hosted NVIDIA NIM API-key manager with a Claude MCP connector; deploy your own instance.

Overview

AI-generated overview

Self-hosted manager for your own NVIDIA NIM API keys, exposing an OAuth-secured MCP endpoint so an assistant can list, dispense, rotate and revoke keys.

What you can do
  • List and inspect registered NVIDIA NIM API keys, including status and expiry.
  • Dispense a ready-to-use key, globally or per project, recording usage.
  • Register, validate, rotate and revoke keys with an audit trail.
  • Manage projects that group keys by consumer or workload.
  • Read key inventory and usage statistics, subject to role-based permissions.
When to use it
Useful if you run your own NVIDIA Build/NIM keys and want an assistant to fetch a key for a workload, check which keys are expiring or invalid, or rotate and revoke them without opening the dashboard.
Requirements
A self-hosted deployment of the project (Docker container plus PostgreSQL, e.g. via the provided Render blueprint) reachable at a base URL; the MCP endpoint lives at that base URL plus /mcp. A GitHub OAuth App (Google optional) with client ID and secret, the MCP_ALLOWED_IDENTITIES allowlist, and an initial admin account set via FIRST_ADMIN_EMAIL and FIRST_ADMIN_PASSWORD. Server-side secrets JWT_SECRET, ENCRYPTION_MASTER_KEY and MCP_OAUTH_JWT_SIGNING_KEY are generated by the platform.
Before you install
The connector can dispense plaintext API keys and register, rotate or revoke them, so access is sensitive; only identities in MCP_ALLOWED_IDENTITIES may connect, and new connector users default to viewer unless MCP_DEFAULT_ROLE is changed. Keys are encrypted at rest but the dispense endpoint returns them in plaintext. The only outbound call is a read-only validation request to NVIDIA; NVIDIA's terms forbid sharing or redistributing keys, so this is for your own keys on your own instance. The…

Installation

In SourceWeft

  1. Open NIM Key Manager in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

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)

[Deploy to Render]

  1. Click the button (or Use this template → Create repository, then in Render pick New → Blueprint and select your fork). Render reads render.yaml and provisions everything automatically:
    • a managed PostgreSQL database,
    • the Dockerized web service with a health check,
    • the secrets JWT_SECRET, ENCRYPTION_MASTER_KEY and MCP_OAUTH_JWT_SIGNING_KEY (generated and stored by Render's secret manager),
    • DATABASE_URL injected from the database.
  2. When prompted, set FIRST_ADMIN_EMAIL and FIRST_ADMIN_PASSWORD (your initial admin, created on first boot; required, because no HTTP request can create the first administrator).
  3. Open the service URL: log in at /, explore the API at /docs.
  4. Every push to main runs 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.

  1. Create a GitHub OAuth App with callback ‹BASE›/auth/callback; copy the Client ID/Secret.
  2. In Render set MCP_GITHUB_CLIENT_ID, MCP_GITHUB_CLIENT_SECRET and MCP_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 set MCP_DEFAULT_ROLE). The rest is already in render.yaml.
  3. 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_id lineage link).
  • Expiry detection — hourly background job + maintenance endpoint; configurable expiring_soon flag.
  • Periodic validation — automatic sweep against NVIDIA every 6 h (configurable) that flags invalid/revoked keys.
  • Key dispensing — GET /api/v1/keys/dispense returns 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 or METRICS_TOKEN), health check at /health, OpenAPI at /docs.

Architecture

app/├── domain/           # Enums and domain exceptions (no dependencies)├── application/      # Use cases (services) and ports (interfaces)│   └── services/     # auth, users, keys, projects, stats, audit├── infrastructure/   # Adapters: SQLAlchemy (repositories) and NVIDIA gateway├── api/              # FastAPI: routers, schemas, deps, rate limiting├── mcp/              # Claude connector: MCP server, OAuth and identity mapping├── dashboard/        # Lightweight SPA served at /├── tasks/            # Scheduled jobs (APScheduler)└── core/             # Config, crypto, security, logging

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

bash
BASE=https://your-service.onrender.com
# Log in (the admin was created on first boot)TOKEN=$(curl -s $BASE/api/v1/auth/login -H 'Content-Type: application/json' \  -d '{"email":"[email protected]","password":"your-password"}' | jq -r .access_token)
# Register a key created at build.nvidia.com (validating it against NVIDIA)curl -s $BASE/api/v1/keys -H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \  -d '{"name":"prod-1","api_key":"nvapi-...","validate_remote":true}'
# Get an available key (LRU) to use in your applicationcurl -s "$BASE/api/v1/keys/dispense" -H "Authorization: Bearer $TOKEN"

More examples (rotation, projects, stats, audit) in docs/api-examples.md. Interactive OpenAPI at /docs.

Roles

Operationviewermanageradmin
View keys, projects and stats✅✅✅
Register / validate / rotate / revoke / dispense keys❌✅✅
Manage projects❌✅✅
Delete keys, manage users, read the audit log❌❌✅

Development & tests

Not required to deploy, but fully supported:

bash
pip install -e ".[dev]"pytest --cov=app          # required coverage gate: 85% (currently ~94%)ruff check . && mypy appdocker compose up         # local stack with PostgreSQL

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.

Source: README.md at commit d7454a2

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v1.0.0LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts