NDB数据库管理MCP服务器

NDB MCP Server是一款基于MCP协议的数据库管理服务器,通过自然语言交互实现Nutanix数据库服务的克隆、备份、监控等日常运维,适用于DBA、DevOps及运维团队。

  • by rouxton
  • TypeScript
  • 本地部署
  • 更新于
在 GitHub 查看 rouxton/ndb-mcp-server

使用说明

NDB MCP Server

A Model Context Protocol server that enables Claude Desktop and other MCP-compatible AI assistants to manage Nutanix Database Service (NDB) environments through natural language with custom instructions support.

Transform complex database operations into simple conversations: "Create a clone of the sales database for testing" or "Show me all databases with backup issues".

This server isn't meant to be a complete wrapper around the NDB API. Instead, it focuses on the day-to-day operations that DBAs, DevOps, SysAdmins, and L2 support teams actually reach for, exposed in the simplest and safest way possible — confirmation before changes and a stop-and-ask policy on errors are built into every tool by default.

Custom Instructions Support

Tailor the assistant's guidance to your context via NDB_CUSTOM_INSTRUCTIONS — a pipe-separated list of free-text guidelines (security practices, deployment preferences, compliance notes, etc.) that gets appended to the server's instructions and surfaced to the MCP client.

Quick Start

🚀 5-Minute Setup Guide - Get started immediately with examples

Prerequisites

  • Node.js 22.23.4+, 24.22.1+ (recommended) or 26.12.1+ — earlier releases are affected by the October 2026 Node.js security vulnerabilities
  • NDB Environment with API access
  • Valid credentials with appropriate permissions

Installation

  1. Clone and setup:

    git clone https://github.com/rouxton/ndb-mcp-server.git
    cd ndb-mcp-server
    
    # Run the automated setup script
    ./scripts/setup.sh                                    # Unix/Linux/macOS
    # or
    PowerShell -ExecutionPolicy Bypass -File scripts/setup.ps1  # Windows PowerShell
    

    The setup script handles everything: dependencies, building, configuration, testing, and prepares for Claude Desktop integration.

  2. Configure Claude Desktop:

    ./scripts/configure-claude.sh                      # Unix/Linux/macOS
    # or  
    .\scripts\configure-claude.ps1                    # Windows PowerShell
    
  3. Start using:

    • Restart Claude Desktop to load the new configuration
    • Try asking Claude: "List all databases in NDB"

    Manual configuration (if needed):

    npm run configure         # Interactive configuration wizard with custom instructions
    npm run test:connection   # Test NDB connectivity
    npm run test:configuration # Test configuration validity
    npm run test:mcp         # Test MCP functionality
    

The configuration wizard (npm run configure) sets up NDB connection settings plus the custom instructions above — industry-specific examples are covered in the Configuration Guide.

What You Can Do

Databases Clones Backups Infrastructure
List & monitor Create & refresh Snapshots & recovery Cluster monitoring
Provision new Manage lifecycle Time machine status Server health
Register existing Resource allocation Retention policies Alerts & operations
Update properties Cleanup & removal Health monitoring Capacity planning

Architecture Overview

High-Level Architecture

┌─────────────────┐    ┌─────────────────┐    ┌─────────────────┐
│ Conversational  │◄──►│        MCP      │◄──►│       NDB       │
│      Agent      │    │      Server     │    │                 │
└─────────────────┘    └─────────────────┘    └─────────────────┘
        │                        │                        │
        │                        │                        │
    MCP Protocol           NDB REST API              Database
 (stdio/websocket)         (HTTP/HTTPS)             Operations

Core Components

  1. MCP Server & Tools (src/index.ts)

    • McpServer setup, protocol handling
    • 61 tool registrations (Zod schemas, annotations, handlers)
  2. NDB Client (src/ndb_client.ts)

    • HTTP client for NDB API
    • Authentication management
    • Request retries and error handling
  3. Zod Schemas (src/schemas.ts)

    • Validation schemas for complex multi-parameter tools (clone, provision, restore)
  4. Type Definitions (src/types.ts)

    • TypeScript interfaces
    • API response types
    • Configuration schemas
  5. Utilities (src/utils.ts)

    • Helper functions (tag mapping, pagination, missing-parameter collection)
    • Data transformations
  6. Custom Instructions (src/custom_instructions.ts)

    • Loads NDB_CUSTOM_INSTRUCTIONS and builds the system prompt

Documentation

Configuration & Setup:

Technical Reference:

Support & Contributing

License

MIT License - see LICENSE for details.


Ready to transform your database management with AI? 🚀

Start with the setup guide for detailed instructions.