Token导航 LogoToken导航TokenDH.com
Dgx Spark MCP logo
运维云端stdio官方级别未说明来源级核验

Dgx Spark MCP

MCP Server

dgx-spark-mcp

DGX Spark MCP Server是一款为NVIDIA DGX系统提供硬件感知的Apache Spark优化服务的MCP服务器,通过持久化硬件上下文和实时GPU监控实现智能Spark配置生成。

工具数

0

提示词数

0

GitHub Stars

1

资源数

0
TypeScriptClaude云端部署Claude DesktopClaude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

raibid-labs

提供方

raibid-labs

最后核验

2026/5/17 20:22

运行时

Node.js

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

npx dgx-spark-mcp

详细介绍

DGX Spark MCP服务器

![CI](https://github.com/raibid-labs/dgx-spark-mcp/actions) ![License: MIT](https://opensource.org/licenses/MIT) ](https://nodejs.org/)

通过模型上下文协议对NVIDIA DGX系统进行硬件感知Spark优化

特性安装配置用法文档贡献

______________________________________________________________________

概述

DGX Spark MCP服务器是 模型上下文协议 服务器,为Claude提供有关NVIDIA DGX硬件和智能Apache Spark优化功能的持久上下文。Claude不会重复描述您的GPU配置,而是自动知道您的硬件规格,并可以为您的工作负载生成最佳的Spark配置。

问题

与Claude合作进行Spark优化时:

  • ❌ 您必须反复描述DGX硬件配置
  • ❌ Claude无法检查实时GPU可用性
  • ❌ 生成的Spark配置可能不适合您的特定硬件
  • ❌ 无法访问DGX特定的最佳实践和调优指南

解决方案

MCP服务器为Claude提供:

  • 持久硬件上下文 -DGX规格的自动检测和缓存
  • 实时GPU监控 -实时可用性和利用率数据,通过 nvidia-smi
  • 智能火花优化 -基于工作负载分析生成最佳配置
  • 文档访问 -DGX Spark最佳实践的可搜索知识库
  • 资源量估算 -执行前预测工作要求

特性

MCP资源

Claude可以随时读取的静态上下文:

资源描述
dgx://hardware/specs完整的DGX硬件规格(GPU、内存、CPU)
dgx://hardware/topologyGPU互连拓扑和NVLink配置
dgx://system/capabilities系统功能和支持的功能
dgx://docs/spark/{topic}DGX Spark文档和最佳实践

MCP工具

Claude可以调用的动态操作:

工具说明
check_gpu_availability查询当前GPU利用率和可用性
get_optimal_spark_config生成针对工作负载和硬件进行优化的Spark配置
search_documentation搜索DGX Spark文档
estimate_resources估算工作负载的资源需求
get_system_health检查系统运行状况和状态
validate_spark_config根据最佳实践验证Spark配置

安装

先决条件

  • Node.js 18.0.0或更高
  • NVIDIA GPU驱动程序nvidia-smi 在PATH中
  • 操作系统:Linux(在Ubuntu 22.04上测试)
  • 硬件:NVIDIA DGX或兼容GPU系统

选项1:从npm安装(推荐)

npm install -g dgx-spark-mcp

选项2:从源代码安装

# Clone the repository
git clone https://github.com/raibid-labs/dgx-spark-mcp.git
cd dgx-spark-mcp

# Install dependencies
npm install

# Build the project
npm run build

# Optionally link globally
npm link

选项3:使用npx运行

npx dgx-spark-mcp

配置

克劳德桌面

添加到您的 claude_desktop_config.json:

{
  "mcpServers": {
    "dgx-spark": {
      "command": "dgx-spark-mcp"
    }
  }
}

配置文件位置:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • 视窗: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

克劳德代码(CLI)

添加到MCP设置配置中:

{
  "mcpServers": {
    "dgx-spark": {
      "command": "dgx-spark-mcp"
    }
  }
}

高级配置

创建一个 config/local.json 用于自定义服务器行为的文件:

{
  "mcp": {
    "serverName": "dgx-spark-mcp",
    "serverVersion": "0.1.0"
  },
  "logging": {
    "level": "info",
    "enableConsole": true,
    "enableFile": true
  },
  "hardware": {
    "cacheDuration": 3600000,
    "enableGPUMonitoring": true
  },
  "docs": {
    "indexPath": "docs/index.json",
    "autoRebuild": true
  }
}

docs/configuration.md 对于所有配置选项。

用法

配置后,Claude将自动访问您的DGX硬件上下文。你可以问这样的问题:

硬件查询

"What GPUs do I have available?"
"Show me the current GPU utilization"
"What's the NVLink topology of my system?"

Spark优化

"Generate optimal Spark config for a 1TB ETL job"
"How should I configure executors for ML training on 8 A100 GPUs?"
"What's the best memory configuration for my hardware?"

文档搜索

"Search documentation for GPU memory tuning"
"What are the best practices for shuffle operations on DGX?"
"Show me examples of Spark Rapids configuration"

资源规划

"Estimate resources needed for processing 5TB of Parquet files"
"Can I run 4 concurrent jobs with my current hardware?"
"What's the optimal partition size for my dataset?"

建筑

┌─────────────────┐
│  Claude Desktop │
│   or CLI        │
└────────┬────────┘
         │ MCP Protocol (stdio)
         ▼
┌─────────────────────────────────────┐
│     DGX Spark MCP Server            │
├─────────────────────────────────────┤
│  ┌──────────┐  ┌────────────────┐  │
│  │Resources │  │     Tools      │  │
│  │  Layer   │  │    Layer       │  │
│  └────┬─────┘  └────────┬───────┘  │
│       │                 │           │
│  ┌────▼─────────────────▼────────┐ │
│  │   Intelligence Engine          │ │
│  ├────────────────────────────────┤ │
│  │  • Workload Analyzer           │ │
│  │  • Config Generator            │ │
│  │  • Resource Estimator          │ │
│  │  • Best Practices Validator    │ │
│  └────────────┬───────────────────┘ │
│               │                     │
│  ┌────────────▼───────────────────┐ │
│  │   Hardware Detection Layer     │ │
│  ├────────────────────────────────┤ │
│  │  • nvidia-smi Integration      │ │
│  │  • /proc filesystem parsing    │ │
│  │  • Topology detection          │ │
│  └────────────┬───────────────────┘ │
└───────────────┼─────────────────────┘
                │
         ┌──────▼───────┐
         │ DGX Hardware │
         └──────────────┘

有关详细的体系结构信息,请参见 docs/architecture/overview.md.

发展

快速开始

# Clone and install
git clone https://github.com/raibid-labs/dgx-spark-mcp.git
cd dgx-spark-mcp
npm install

# Run tests
npm test

# Build
npm run build

# Run in development mode with hot reload
npm run dev

使用Justfile

该项目包括一个全面的 justfile 对于开发任务:

# Show all available commands
just

# Development workflow
just build          # Build TypeScript
just test           # Run tests
just test-coverage  # Run tests with coverage
just lint           # Run linter
just format         # Format code

# Quality checks
just check          # Run all quality checks (lint, format-check, typecheck)
just pre-commit     # Full pre-commit validation
just pre-push       # Full pre-push validation

# Docker
just docker-build   # Build Docker image
just docker-run-gpu # Run with GPU support

# Documentation
just docs-build     # Build documentation index
just docs-search "query" # Search documentation

JUSTFILE-Referance.md 对于所有可用命令。

项目结构

dgx-spark-mcp/
├── src/
│   ├── server.ts           # MCP server implementation
│   ├── hardware/           # Hardware detection
│   ├── analyzers/          # Workload analysis
│   ├── optimizers/         # Spark optimization
│   ├── estimators/         # Resource estimation
│   ├── validators/         # Config validation
│   ├── resources/          # MCP resources
│   ├── tools/              # MCP tools
│   └── docs/               # Documentation system
├── tests/
│   ├── integration/        # Integration tests
│   └── benchmarks/         # Performance tests
├── docs/                   # Documentation
├── config/                 # Configuration files
└── scripts/                # Utility scripts

测试

# Run all tests
npm test

# Run tests in watch mode
npm run test:watch

# Run with coverage
npm run test:coverage

# Run integration tests
npm run test:integration

# Run with mocked hardware (for development without GPU)
MOCK_HARDWARE=true npm test

代码质量

# Lint TypeScript files
npm run lint

# Auto-fix linting issues
npm run lint:fix

# Format code with Prettier
npm run format

# Check formatting
npm run format:check

# Type checking
npm run typecheck

文档

综合文档可在 docs/ 目录:

贡献

我们欢迎捐款!该项目旨在最终为 dgx火花剧本 生态系统。

入门指南

  1. 分叉存储库
  2. 创建要素分支: git checkout -b feature/your-feature
  3. 进行更改
  4. 运行测试: npm test
  5. 运行质量检查: just check
  6. 使用常规提交进行提交: git commit -m 'feat: add your feature'
  7. 推到分支: git push origin feature/your-feature
  8. 提交拉取请求

贡献.md 详细指南。

提交消息格式

此项目使用 约定式提交 用于自动版本控制和更改日志生成:

# Feature (minor version bump)
git commit -m "feat: add GPU topology detection"

# Bug fix (patch version bump)
git commit -m "fix: correct memory calculation"

# Breaking change (major version bump)
git commit -m "feat!: change resource API interface"

# Other types (no version bump)
git commit -m "docs: update README"
git commit -m "chore: update dependencies"
git commit -m "test: add integration tests"

docs/RELEASING.md 完整的发布流程。

开发工作流程

该项目采用多工作流开发方法:

工作流状态描述
WS1:MCP服务器基础✅ 完成核心MCP协议实施
WS2:硬件检测✅ 完成GPU和系统自检
WS3:MCP资源和工具✅ 完成资源和工具集成
WS4:文档系统✅ 完整带索引的可搜索文档
WS5:DGX Spark Intelligence✅ 完成工作量分析和优化
WS6:测试与DevOps✅ 完整全面的测试套件和CI/CD

路线图

  • \[\]支持其他GPU架构(H100、Grace Hopper)
  • \[\]与NVIDIA Rapids集成,实现GPU加速的Spark
  • \[\]历史绩效指标和趋势分析
  • \[\]基于作业执行历史的自动调整
  • \[\]多节点DGX集群支持
  • \[\]容器化Spark的Kubernetes集成
  • \[\]与dgx spark剧本集成

故障排除

常见问题

未找到nvidia smi

# Ensure NVIDIA drivers are installed and nvidia-smi is in PATH
which nvidia-smi
nvidia-smi

访问GPU信息的权限被拒绝

# Add user to video group (Linux)
sudo usermod -a -G video $USER
# Log out and back in

安装后未发现模块错误

# Rebuild the project
npm run clean
npm install
npm run build

docs/spark/故障排除.md 更多解决方案。

许可证

MIT许可证-请参阅 许可证 文件以获取详细信息。

致谢

支持

  • 问题:
  • 讨论:
  • 文档: docs/

______________________________________________________________________

内置于❤️ DGX和Spark社区

目录标签

目录标签

TypeScriptClaude云端部署Spark优化本地部署GPU加速硬件感知性能调优NVIDIADGX

支持客户端

Claude DesktopClaude

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

运行时(runtime,运行环境)

Node.js

来源包(packageName,安装包名)

dgx-spark-mcp

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdionone部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP