Nvidia Nim Mcp

io.github.david-eve-za由 GitHub 账号 david-eve-za 发布v2.1.2更新于 Oct 24, 2026

MCP server for NVIDIA NIM - 50+ LLMs, multimodal, image gen, embeddings, reranking

发布方自己的服务:NVIDIA CUDA Docs

已验证STDIO仅桌面媒体与设计AI 与机器学习

概览

AI 生成的概览

本地 MCP 服务器,让助手调用 NVIDIA NIM 模型完成对话、文本生成、向量嵌入、重排、图像生成与视觉分析。

可以做什么
  • 运行多轮对话补全与单提示文本生成
  • 生成文本向量嵌入并对段落按相关性重排
  • 根据提示生成图像,分析图像或处理图文混合任务
  • 调用模型函数/工具,并对比多个模型
  • 列出并查看模型元数据,按许可证、推理、视觉、上下文长度和硬件筛选
适用场景
当你希望助手直接使用 NVIDIA 托管或自建的 NIM 模型处理文本、嵌入、重排、图像生成或视觉任务,又不想自己写 API 客户端时适用;也适合需要模型元数据来挑选模型的场景。
运行要求
通过 npm 包 nvidia-nim-mcp 以 stdio 在本地运行,需要 Node.js 18+(或 Docker)。必须提供 NVIDIA NGC API 密钥,放在 NVIDIA_API_KEY 中;可选变量可设置默认模型、基础 URL、速率限制、令牌上限、重试和功能开关。需要能访问 NIM 接口的网络。
安装前请注意
NVIDIA_API_KEY 密钥会通过客户端配置或环境变量传入,请勿写入共享配置。工具发送的提示、图像和文本会传到 NVIDIA 托管接口(或你自建的端点),避免提交机密内容。图像生成等调用可能消耗 API 配额或产生费用,取决于你的套餐。

安装

在 SourceWeft 中

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

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

其他 MCP 客户端

参照 仓库 中的启动说明。

README

NVIDIA NIM MCP Server

A production-ready Model Context Protocol (MCP) server for consuming NVIDIA NIM (NVIDIA Inference Microservices) models. Supports 50+ LLMs, multimodal models, image generation, embeddings, reranking, function calling, vision, and code-specialized models with rich metadata for intelligent agent selection.


🚀 Features

  • 10 MCP Tools: chat completion, text generation, embeddings, reranking, function calling, model listing, model info, image generation, image analysis, multimodal tasks, model comparison
  • 50+ Supported Models: Llama 3.1/3.2, Nemotron 3 Ultra (550B), MiniMax M3, Kimi K2.6 (1T), DeepSeek V4 Pro, GLM 5.1, Qwen 3.5 397B, Mistral Large 3 (675B), GPT-OSS 120B, DiffusionGemma, FLUX.1, SDXL, SD3, and more
  • Rich Model Metadata: licensing, hardware requirements, benchmarks, image generation specs, reasoning modes, tags for agent selection
  • Advanced Filtering: by commercial use, reasoning, vision, function calling, multimodal, context length, tags, hardware
  • Production-Grade: automatic retries with exponential backoff, per-minute rate limiting, structured JSON logging
  • Type-Safe: full TypeScript, Zod input validation on every tool
  • Docker-Ready: multi-stage Dockerfile with non-root user, health checks
  • Configurable: all settings via environment variables
  • Single Required Env: Only NVIDIA_API_KEY required; all others have sensible defaults

📋 Prerequisites

  • Node.js 18+ (for NPM installation) or Docker (for container deployment)
  • A NVIDIA NGC API key (nvapi-...)

⚙️ Installation

Option 1: NPM Global Installation (Recommended)

bash
# Install globallynpm install -g nvidia-nim-mcp
# Run directlynvidia-nim-mcp

Option 2: NPM Local Installation

bash
# Initialize your projectnpm init -y
# Install locallynpm install nvidia-nim-mcp
# Run with npxnpx nvidia-nim-mcp

Option 3: From Source

bash
# Clone / download the projectcd nvidia-nim-mcp
# Install dependenciesnpm install
# Build TypeScriptnpm run build

Option 4: Docker

bash
# Pull from Docker Hub (when published)docker pull nvidia-nim-mcp
# Or build locallydocker build -t nvidia-nim-mcp .

🔑 Configuration

Copy .env.example to .env and fill in your API key:

bash
cp .env.example .env

Only NVIDIA_API_KEY is required — all other variables have production-ready defaults:

VariableRequiredDefaultDescription
NVIDIA_API_KEY✅—Your NVIDIA NGC API key
NVIDIA_NIM_BASE_URL❌https://integrate.api.nvidia.com/v1Base URL for NIM API
DEFAULT_MODEL❌black-forest-labs/flux.1-devDefault model (best image generation)
MAX_REQUESTS_PER_MINUTE❌40Rate limit cap (NVIDIA API limit)
MAX_TOKENS_PER_REQUEST❌4096Hard cap on tokens per request
REQUEST_TIMEOUT_MS❌120000Request timeout (ms)
MAX_RETRIES❌3Max retry attempts on failure
RETRY_DELAY_MS❌1000Base delay between retries (ms)
LOG_LEVEL❌infoerror|warn|info|debug
ENABLE_IMAGE_GENERATION❌trueEnable image generation tools
ENABLE_VISION❌trueEnable vision/multimodal tools
ENABLE_MULTIMODAL❌trueEnable multimodal task tools

🚀 Running

NPM Global Installation

bash
# Run the servernvidia-nim-mcp
# With custom environment variablesNVIDIA_API_KEY=nvapi-your-key LOG_LEVEL=debug nvidia-nim-mcp

NPM Local Installation

bash
# Run with npxnpx nvidia-nim-mcp
# Or add to package.json scripts# "scripts": { "start": "nvidia-nim-mcp" }npm start

From Source

bash
# Development mode with auto-reloadnpm run dev
# Production mode (compiled)npm run build && npm start

Docker

bash
# Run with environment variablesdocker run --rm \  -e NVIDIA_API_KEY=nvapi-your-key \  -e LOG_LEVEL=info \  nvidia-nim-mcp
# Run in background with port mapping (if needed)docker run -d \  --name nvidia-nim-mcp \  -e NVIDIA_API_KEY=nvapi-your-key \  nvidia-nim-mcp

Standalone Executable

bash
# Make executable (if not already)chmod +x dist/index.js
# Run directly./dist/index.js
# With environment variablesNVIDIA_API_KEY=nvapi-your-key ./dist/index.js

🔧 MCP Client Configuration

For Global NPM Installation

json
{  "mcpServers": {    "nvidia-nim": {      "command": "nvidia-nim-mcp",      "env": {        "NVIDIA_API_KEY": "nvapi-your-key-here",        "LOG_LEVEL": "info"      }    }  }}

For Local NPM Installation

json
{  "mcpServers": {    "nvidia-nim": {      "command": "npx",      "args": ["nvidia-nim-mcp"],      "env": {        "NVIDIA_API_KEY": "nvapi-your-key-here",        "LOG_LEVEL": "info"      }    }  }}

For Direct Executable Path

json
{  "mcpServers": {    "nvidia-nim": {      "command": "node",      "args": ["/absolute/path/to/nvidia-nim-mcp/dist/index.js"],      "env": {        "NVIDIA_API_KEY": "nvapi-your-key-here",        "LOG_LEVEL": "info"      }    }  }}

🛠️ Available Tools

chat_completion

Multi-turn conversation with any NIM LLM.

json
{  "model": "nvidia/nemotron-3-ultra-550b-a55b",  "messages": [    { "role": "user", "content": "Explain quantum computing" }  ],  "temperature": 0.3,  "max_tokens": 4096}

text_generation

Single-prompt text generation (simplified interface).

json
{  "prompt": "Write a haiku about machine learning",  "temperature": 0.5,  "max_tokens": 512}

create_embeddings

Convert text(s) to vector embeddings for RAG/search.

json
{  "model": "nvidia/nv-embed-v1",  "input": ["NVIDIA makes GPUs", "AI runs on GPUs"],  "truncate": "END"}

rerank_passages

Rerank passages by relevance to a query.

json
{  "query": "What is CUDA?",  "passages": ["CUDA is a GPU programming platform", "NIM serves AI models"],  "top_k": 3}

function_calling

Use NIM models with tool/function calling.

json
{  "model": "z-ai/glm-5.1",  "messages": [{ "role": "user", "content": "What's the weather in Paris?" }],  "tools": [{    "type": "function",    "function": {      "name": "get_weather",      "description": "Get current weather",      "parameters": {        "type": "object",        "properties": { "city": { "type": "string" } },        "required": ["city"]      }    }  }]}

generate_image

Generate images from text prompts using FLUX.1, SDXL, SD3, DiffusionGemma.

json
{  "model": "black-forest-labs/flux.1-dev",  "prompt": "A photorealistic mountain landscape at sunset, 8K",  "width": 1024,  "height": 1024,  "steps": 30,  "cfg_scale": 3.5,  "sampler": "euler_a",  "scheduler": "simple"}

analyze_image

Analyze and describe images using vision/multimodal models.

json
{  "model": "moonshotai/kimi-k2.6",  "image_url": "https://example.com/image.jpg",  "prompt": "Describe this image in detail",  "detail": "high"}

multimodal_task

Perform multimodal tasks combining text and images.

json
{  "model": "minimaxai/minimax-m3",  "messages": [    {      "role": "user",      "content": [        { "type": "text", "text": "Analyze this chart" },        { "type": "image_url", "image_url": { "url": "https://example.com/chart.png" } }      ]    }  ],  "max_tokens": 2048}

list_models

List available models with rich metadata and advanced filtering.

json
{  "category": "code",  "commercial_use": true,  "supports_reasoning": true,  "tags": ["coding", "agentic"],  "include_details": true}

Filter Options:

  • category: language, embedding, reranking, vision, code, multimodal, image_generation, all
  • commercial_use: Filter by commercial license
  • supports_reasoning: Filter by reasoning capability
  • supports_vision: Filter by vision capability
  • supports_function_calling: Filter by function calling
  • supports_multimodal: Filter by multimodal input
  • min_context_length: Minimum context window (tokens)
  • tags: Filter by use case tags
  • hardware: Filter by GPU type (Hopper, Blackwell, Ampere)
  • include_details: Include full metadata (benchmarks, image specs, etc.)

get_model_info

Get complete metadata for a specific model.

json
{ "model_id": "nvidia/nemotron-3-ultra-550b-a55b" }

Returns: licensing, hardware requirements, benchmarks, image gen specs, reasoning modes, tags, supported languages, etc.

compare_models

Compare 2-5 models side-by-side across all decision factors.

json
{  "model_ids": [    "nvidia/nemotron-3-ultra-550b-a55b",    "deepseek-ai/deepseek-v4-pro",    "moonshotai/kimi-k2.6",    "z-ai/glm-5.1"  ]}

Returns: Structured comparison table with licensing, hardware, benchmarks, capabilities, tags, image generation specs, etc.


📦 Supported Models (50+)

Language Models (Frontier Reasoning)

ModelParametersContextLicenseCommercialBest For
nvidia/nemotron-3-ultra-550b-a55b550B (55B active)131KOpenMDW-1.1✅Frontier reasoning, coding, agentic, 1M context, multilingual
nvidia/nemotron-3-ultra-550b-a55b-instruct550B131KOpenMDW-1.1✅Instruction-tuned variant
minimaxai/minimax-m3428B (22B active)1MNon-Commercial❌Multimodal, video (30min), 8hr coding, agentic
moonshotai/kimi-k2.61T (32B active)256KModified MIT✅Long-horizon coding, 300 agents, vision, agentic
deepseek-ai/deepseek-v4-pro1.6T (49B active)1MMIT✅Advanced coding, math, reasoning, 3 reasoning modes
z-ai/glm-5.1754B (DSA)131KMIT✅Software engineering, agentic, SWE-Bench 58.4%
qwen/qwen3.5-397b-a17b397B (MoE)131KResearch❌Large-scale multilingual, multimodal
mistralai/mistral-large-3-675b-instruct-2512675B131KResearch❌Frontier reasoning, multimodal
openai/gpt-oss-120b120B131KApache 2.0✅Open-weight, research, fine-tuning
google/diffusiongemma-26b-a4b-it25.2B (3.8B active)256KApache 2.0✅Diffusion text gen, 35+ langs, fast, multimodal

Code-Specialized Models

ModelParametersContextLicenseCommercial
z-ai/glm-5.1754B131KMIT✅
z-ai/glm5-128KZ.ai✅
qwen/qwen2.5-coder-32b-instruct32B131KResearch❌

Multimodal / Vision Models

ModelParametersContextVisionVideoLicenseCommercial
meta/llama-3.2-90b-vision-instruct90B128K✅❌Llama 3.2✅
meta/llama-3.2-11b-vision-instruct11B128K✅❌Llama 3.2✅
nvidia/neva-22b22B4K✅❌NVIDIA✅
microsoft/phi-3.5-vision-instruct-128K✅❌MIT✅
minimaxai/minimax-m3428B1M✅✅ (30min)Non-Commercial❌
moonshotai/kimi-k2.61T256K✅✅Modified MIT✅

Image Generation Models

ModelArchitectureResolutionsAspect RatiosMax ImagesControlNetLicenseCommercial
black-forest-labs/flux.1-devDiffusion Transformer1024², 1152×896, 1344×768, 21:91:1, 16:9, 9:16, 4:3, 3:4, 21:91Canny, DepthApache 2.0*❌*
black-forest-labs/flux.1-kontext-devDiffusion TransformerSameSame1-Apache 2.0*❌*
nvidia/stable-diffusion-xlUNet + Attention1024², 1152×896, 1216×8321:1, 16:9, 9:16, 4:3, 3:44-SDXL 1.0✅**
stabilityai/sd-3-mediumSD3SameSame2-Stability AI✅**
nvidia/sdxl-turboADD512², 1024²1:14-SDXL 1.0✅**

*Non-commercial default; commercial via contact
**Requires Stability AI membership

Embeddings & Reranking

ModelTypeContextDimensionsLicenseCommercial
nvidia/nv-embedqa-e5-v5Embedding512-NVIDIA✅
nvidia/nv-embed-v1Embedding4096-NVIDIA✅
baai/bge-m3Embedding8192-MIT✅
nvidia/nv-rerankqa-mistral-4b-v3Reranking4096-NVIDIA✅

🏭 Production Checklist

  • Environment variable validation on startup
  • Exponential backoff retry (configurable)
  • Per-minute rate limiter
  • Request/response logging with Winston
  • Structured JSON logs in production
  • Zod input validation for all tools
  • Graceful shutdown (SIGINT/SIGTERM)
  • Unhandled exception/rejection handlers
  • Docker multi-stage build (minimal image)
  • Non-root Docker user
  • Token cap enforcement
  • Single required env var (NVIDIA_API_KEY)
  • Feature flags for optional capabilities

🧪 Testing

The project includes a comprehensive test suite:

  • Unit Tests: Configuration, logging, model handling, tool validation
  • Integration Tests: All 10 MCP tools with various input scenarios
  • Error Handling: Validation of edge cases and failure modes
  • Schema Validation: Zod-based input validation for all tools

Running Tests

bash
# Run all testsnpm test
# Run tests with coverage reportnpm test -- --coverage
# Run tests in watch modenpm test -- --watch
# Run specific test filenpm test src/handlers.test.ts

Current Test Status: ✅ All tests passing (96 tests)


🛠️ Development

Building the Project

bash
# Install dependenciesnpm install
# Compile TypeScript to JavaScriptnpm run build
# Clean build artifactsnpm run clean
# Development mode with auto-reloadnpm run dev

Code Quality

bash
# Run linternpm run lint
# Run testsnpm test
# Run both linting and testsnpm run check

🤝 Contributing

Contributions are welcome!

  1. Fork the Repository
  2. Create a Feature Branch: git checkout -b feature/your-feature-name
  3. Make Your Changes: Follow the existing code style and patterns
  4. Add Tests: Ensure new functionality is properly tested
  5. Run Checks: npm run check to verify code quality and tests
  6. Commit Changes: Use clear, descriptive commit messages
  7. Push to Your Fork: git push origin feature/your-feature-name
  8. Open a Pull Request: Describe your changes and their benefits

Code Standards

  • TypeScript: Strict type checking enabled
  • ESLint: Code formatting and best practices
  • Zod: Runtime validation for all external inputs
  • Testing: Comprehensive test coverage for new features
  • Documentation: Update README.md for user-facing changes

Development Workflow

  1. Setup: Follow the installation instructions
  2. Development: Use npm run dev for continuous development
  3. Testing: Run npm test to verify your changes
  4. Building: Use npm run build to compile the project
  5. Linting: Run npm run lint to check code quality

📦 Packaging & Distribution

NPM Package

  • Published to npm registry for easy installation
  • Includes compiled JavaScript and TypeScript definitions
  • Global and local installation options
  • Runs as a standard CLI tool

Docker Image

  • Multi-stage build for minimal image size
  • Runs as non-root user for security
  • Includes health check endpoint
  • Easy deployment to containerized environments

Standalone Executable

  • Self-contained JavaScript file with shebang
  • Can be run directly on any system with Node.js
  • No installation required beyond Node.js

Building Packages

bash
# Build the projectnpm run build
# Create NPM package (.tgz)npm pack
# Build Docker imagedocker build -t nvidia-nim-mcp .
# All checks (lint, test, build)npm run check && npm run build

📄 License

MIT

来源:README.md,提交 fe161a7

工具

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

版本历史

1
  1. v2.1.2最新Sep 16, 2026

评分

已满足适用检查项的 50%

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

  • 近 30 天内可连通25 分

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

  • 已声明认证方式10 分

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

  • 已列出工具15 分

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

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

其他 Nvidia 集成