nvidia-nim-mcp
Integrates with NVIDIA NIM (NVIDIA Inference Microservices) to provide tools for chat completion, text generation, embeddings, reranking, function calling, image generation, image analysis, multimodal tasks, model listing, and model comparison using 50+ LLMs and other models.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@nvidia-nim-mcp Write a short story about a robot learning to paint"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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_KEYrequired; all others have sensible defaults
Related MCP server: NVIDIA NIM MCP Server
📋 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)
# Install globally
npm install -g nvidia-nim-mcp
# Run directly
nvidia-nim-mcpOption 2: NPM Local Installation
# Initialize your project
npm init -y
# Install locally
npm install nvidia-nim-mcp
# Run with npx
npx nvidia-nim-mcpOption 3: From Source
# Clone / download the project
cd nvidia-nim-mcp
# Install dependencies
npm install
# Build TypeScript
npm run buildOption 4: Docker
# Pull from Docker Hub (when published)
docker pull nvidia-nim-mcp
# Or build locally
docker build -t nvidia-nim-mcp .🔑 Configuration
Copy .env.example to .env and fill in your API key:
cp .env.example .envOnly NVIDIA_API_KEY is required — all other variables have production-ready defaults:
Variable | Required | Default | Description |
| ✅ | — | Your NVIDIA NGC API key |
| ❌ |
| Base URL for NIM API |
| ❌ |
| Default model (best image generation) |
| ❌ |
| Rate limit cap (NVIDIA API limit) |
| ❌ |
| Hard cap on tokens per request |
| ❌ |
| Request timeout (ms) |
| ❌ |
| Max retry attempts on failure |
| ❌ |
| Base delay between retries (ms) |
| ❌ |
|
|
| ❌ |
| Enable image generation tools |
| ❌ |
| Enable vision/multimodal tools |
| ❌ |
| Enable multimodal task tools |
🚀 Running
NPM Global Installation
# Run the server
nvidia-nim-mcp
# With custom environment variables
NVIDIA_API_KEY=nvapi-your-key LOG_LEVEL=debug nvidia-nim-mcpNPM Local Installation
# Run with npx
npx nvidia-nim-mcp
# Or add to package.json scripts
# "scripts": { "start": "nvidia-nim-mcp" }
npm startFrom Source
# Development mode with auto-reload
npm run dev
# Production mode (compiled)
npm run build && npm startDocker
# Run with environment variables
docker 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-mcpStandalone Executable
# Make executable (if not already)
chmod +x dist/index.js
# Run directly
./dist/index.js
# With environment variables
NVIDIA_API_KEY=nvapi-your-key ./dist/index.js🔧 MCP Client Configuration
For Global NPM Installation
{
"mcpServers": {
"nvidia-nim": {
"command": "nvidia-nim-mcp",
"env": {
"NVIDIA_API_KEY": "nvapi-your-key-here",
"LOG_LEVEL": "info"
}
}
}
}For Local NPM Installation
{
"mcpServers": {
"nvidia-nim": {
"command": "npx",
"args": ["nvidia-nim-mcp"],
"env": {
"NVIDIA_API_KEY": "nvapi-your-key-here",
"LOG_LEVEL": "info"
}
}
}
}For Direct Executable Path
{
"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.
{
"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).
{
"prompt": "Write a haiku about machine learning",
"temperature": 0.5,
"max_tokens": 512
}create_embeddings
Convert text(s) to vector embeddings for RAG/search.
{
"model": "nvidia/nv-embed-v1",
"input": ["NVIDIA makes GPUs", "AI runs on GPUs"],
"truncate": "END"
}rerank_passages
Rerank passages by relevance to a query.
{
"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.
{
"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.
{
"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.
{
"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.
{
"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.
{
"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,allcommercial_use: Filter by commercial licensesupports_reasoning: Filter by reasoning capabilitysupports_vision: Filter by vision capabilitysupports_function_calling: Filter by function callingsupports_multimodal: Filter by multimodal inputmin_context_length: Minimum context window (tokens)tags: Filter by use case tagshardware: 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.
{ "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.
{
"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)
Model | Parameters | Context | License | Commercial | Best For |
| 550B (55B active) | 131K | OpenMDW-1.1 | ✅ | Frontier reasoning, coding, agentic, 1M context, multilingual |
| 550B | 131K | OpenMDW-1.1 | ✅ | Instruction-tuned variant |
| 428B (22B active) | 1M | Non-Commercial | ❌ | Multimodal, video (30min), 8hr coding, agentic |
| 1T (32B active) | 256K | Modified MIT | ✅ | Long-horizon coding, 300 agents, vision, agentic |
| 1.6T (49B active) | 1M | MIT | ✅ | Advanced coding, math, reasoning, 3 reasoning modes |
| 754B (DSA) | 131K | MIT | ✅ | Software engineering, agentic, SWE-Bench 58.4% |
| 397B (MoE) | 131K | Research | ❌ | Large-scale multilingual, multimodal |
| 675B | 131K | Research | ❌ | Frontier reasoning, multimodal |
| 120B | 131K | Apache 2.0 | ✅ | Open-weight, research, fine-tuning |
| 25.2B (3.8B active) | 256K | Apache 2.0 | ✅ | Diffusion text gen, 35+ langs, fast, multimodal |
Code-Specialized Models
Model | Parameters | Context | License | Commercial |
| 754B | 131K | MIT | ✅ |
| - | 128K | Z.ai | ✅ |
| 32B | 131K | Research | ❌ |
Multimodal / Vision Models
Model | Parameters | Context | Vision | Video | License | Commercial |
| 90B | 128K | ✅ | ❌ | Llama 3.2 | ✅ |
| 11B | 128K | ✅ | ❌ | Llama 3.2 | ✅ |
| 22B | 4K | ✅ | ❌ | NVIDIA | ✅ |
| - | 128K | ✅ | ❌ | MIT | ✅ |
| 428B | 1M | ✅ | ✅ (30min) | Non-Commercial | ❌ |
| 1T | 256K | ✅ | ✅ | Modified MIT | ✅ |
Image Generation Models
Model | Architecture | Resolutions | Aspect Ratios | Max Images | ControlNet | License | Commercial |
| Diffusion Transformer | 1024², 1152×896, 1344×768, 21:9 | 1:1, 16:9, 9:16, 4:3, 3:4, 21:9 | 1 | Canny, Depth | Apache 2.0* | ❌* |
| Diffusion Transformer | Same | Same | 1 | - | Apache 2.0* | ❌* |
| UNet + Attention | 1024², 1152×896, 1216×832 | 1:1, 16:9, 9:16, 4:3, 3:4 | 4 | - | SDXL 1.0 | ✅** |
| SD3 | Same | Same | 2 | - | Stability AI | ✅** |
| ADD | 512², 1024² | 1:1 | 4 | - | SDXL 1.0 | ✅** |
*Non-commercial default; commercial via contact
**Requires Stability AI membership
Embeddings & Reranking
Model | Type | Context | Dimensions | License | Commercial |
| Embedding | 512 | - | NVIDIA | ✅ |
| Embedding | 4096 | - | NVIDIA | ✅ |
| Embedding | 8192 | - | MIT | ✅ |
| Reranking | 4096 | - | 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
# Run all tests
npm test
# Run tests with coverage report
npm test -- --coverage
# Run tests in watch mode
npm test -- --watch
# Run specific test file
npm test src/handlers.test.tsCurrent Test Status: ✅ All tests passing (96 tests)
🛠️ Development
Building the Project
# Install dependencies
npm install
# Compile TypeScript to JavaScript
npm run build
# Clean build artifacts
npm run clean
# Development mode with auto-reload
npm run devCode Quality
# Run linter
npm run lint
# Run tests
npm test
# Run both linting and tests
npm run check🤝 Contributing
Contributions are welcome!
Fork the Repository
Create a Feature Branch:
git checkout -b feature/your-feature-nameMake Your Changes: Follow the existing code style and patterns
Add Tests: Ensure new functionality is properly tested
Run Checks:
npm run checkto verify code quality and testsCommit Changes: Use clear, descriptive commit messages
Push to Your Fork:
git push origin feature/your-feature-nameOpen 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
Setup: Follow the installation instructions
Development: Use
npm run devfor continuous developmentTesting: Run
npm testto verify your changesBuilding: Use
npm run buildto compile the projectLinting: Run
npm run lintto 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
# Build the project
npm run build
# Create NPM package (.tgz)
npm pack
# Build Docker image
docker build -t nvidia-nim-mcp .
# All checks (lint, test, build)
npm run check && npm run build📄 License
MIT
Available Tools
11 toolsanalyze_imageB
Analyze and describe images using NVIDIA NIM vision and multimodal models. Provide an image URL and a prompt/question to get detailed analysis, captioning, or visual Q&A.
Inputs: prompt (required), image_url (required), model, top_p, +4 more.
chat_completionA
Send a multi-turn conversation to a NVIDIA NIM language model and receive a completion. Supports all major open-source LLMs including Llama 3.1, Mistral, Gemma, Qwen, and more.
Inputs: messages (required), seed, stop, model, +4 more.
compare_modelsA
Compare 2-5 models side-by-side across key decision factors: licensing, hardware requirements, benchmarks, capabilities, and use case tags. Returns structured comparison table.
Inputs: model_ids (required).
create_embeddingsA
Convert text(s) into vector embeddings using NVIDIA NIM embedding models. Useful for semantic search, RAG, clustering, and similarity comparisons.
Inputs: input (required), model, truncate, encoding_format.
function_callingC
Use NIM models with tool/function calling capabilities. The model will decide which function to call and with what arguments.
Inputs: tools (required), messages (required), model, max_tokens, +2 more.
generate_imageA
Generate images from text prompts using NVIDIA NIM image generation models (Stable Diffusion XL, SDXL Turbo, SD3, FLUX.1). Supports various resolutions, samplers, and schedulers. FLUX.1-schnell and FLUX.1-kontext-dev are available on the free NVIDIA AI Foundation tier. Can save generated images as PNG files to disk.
Inputs: prompt (required), seed, image, model, +12 more.
get_model_infoB
Get detailed information about a specific NVIDIA NIM model.
Inputs: model_id (required).
list_modelsB
List available NVIDIA NIM models with detailed metadata for agent selection, optionally filtered by category (language, embedding, reranking, vision, code, multimodal, image_generation) and advanced filters.
Inputs: tags, category, hardware, commercial_use, +6 more.
multimodal_taskB
Perform multimodal tasks combining text and images. Send a conversation with mixed text and image content to multimodal models for complex reasoning across modalities.
Inputs: messages (required), model, top_p, stream, +2 more.
rerank_passagesA
Rerank a list of passages by relevance to a query using NVIDIA NIM reranking models. Essential for RAG pipelines to improve retrieval quality.
Inputs: query (required), passages (required), model, top_k, +1 more.
text_generationA
Generate text from a single prompt (simplified interface). Ideal for one-shot tasks like summarization, translation, extraction, or Q&A.
Inputs: prompt (required), stop, model, max_tokens, +2 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
The tools are mostly distinct, with clear purposes for embeddings, reranking, image generation, and listing models. Minor overlap exists among chat_completion, text_generation, and function_calling (all text generation) and between analyze_image and multimodal_task, but descriptions clarify their different modes.
All names use snake_case, but they mix verb-first patterns (create_embeddings, list_models) with noun-first patterns (chat_completion, text_generation) and gerunds (function_calling). This is readable but not fully consistent.
11 tools is well-scoped for the NVIDIA NIM domain, covering language, embedding, reranking, vision, and image generation. Each tool fills a specific niche without feeling excessive or thin.
The surface covers the main NIM inference workflows: chat, text generation, embeddings, reranking, function calling, vision, and image generation. Minor gaps such as streaming or fine-tuning exist, but they are not core to the server's apparent purpose.
Maintenance
Related MCP Connectors
214 tools for AI agents over one MCP endpoint: image, video, audio, 3D, data, storage, mail, GPUs.
Governed app access for AI agents: 1,000+ apps & 12,000+ tools via Code Mode MCP.
One MCP endpoint for Claude, GPT & Gemini: 100+ tools + no-code connectors + agent workers.
Pay-per-use tool marketplace for AI agents. Search, price-check, and call APIs via MCP.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables LLM agents to control NVIDIA Run:AI infrastructure by dynamically searching and executing over 426 Run:AI APIs through MCP tools.411 npmMIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to access 140+ NVIDIA NIM models for chat, embeddings, reranking, vision, image generation, OCR, and content safety via stdio.87 npmMIT
- FlicenseNot gradedqualityCmaintenanceProvides a live, audited catalog of AI models from NVIDIA NIM, OpenRouter, Nous Portal, and other providers, enabling search, retrieval, and usage examples via MCP tools and resources.-
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to discover and execute over 1,000 developer skills and tools via MCP and WebMCP, with progressive disclosure for efficient token usage.MIT