Skip to main content
Glama
ssotoa70

VASTOps MCP Server

by ssotoa70

VASTOps MCP 서버

PyPI Version Python Version License

VASTOps MCP 서버는 VAST Data 관리 작업을 위한 MCP(Model Context Protocol) 서버입니다. AI 어시스턴트가 VAST 클러스터와 상호작용하여 모니터링, 목록 조회 및 관리 작업을 수행할 수 있는 도구를 제공합니다. 클러스터 관리자와 테넌트 관리자 모두 지원합니다.

기능

  • MCP 통합: AI 어시스턴트 통합을 위한 완전한 MCP 서버 구현

  • 클러스터 관리: VAST 클러스터 목록 조회 및 모니터링

  • 성능 메트릭: 클러스터 객체에 대한 성능 데이터 검색 및 그래프 생성

  • 동적 목록 함수: 최종 사용자가 수정할 수 있도록 YAML 템플릿에서 MCP 함수를 자동으로 생성

  • 보안 자격 증명: keyring을 사용한 안전한 비밀번호 저장

  • 읽기 전용 및 읽기-쓰기 모드: 액세스 수준 제어 (생성 작업을 위한 읽기-쓰기 모드)

Related MCP server: MCP Server Kubernetes

빠른 시작

1. 설치

vastops-mcp 설치:

# If installed via pip
pip install vastops-mcp

2. 초기 설정

VAST 클러스터 연결 구성:

# If installed via pip
vastops-mcp setup


This will prompt you for:
- Cluster address (IP, FQDN, or URL like `https://host:port`)
- Username and password
- Tenant (for tenant admins)
- Tenant (for super admins - which tenant context to use)

3. AI 어시스턴트에서 MCP 서버 구성

mcpsetup을 사용하여 일반적인 AI 어시스턴트 도구에 대한 지침을 확인하세요:

# create the syntax for popular ai assistances (currently has builtin support for cursor,claude-desktop,windsurf,vscode)
vastops-mcp mcpsetup vscode
🔧 Configuring MCP server for: vscode
   Detected command: vastops-mcp
   Detected args: ['mcp']

📋 VSCode Configuration Instructions
   Config file location: /Users/user/.vscode/mcp.json

    Create a new file if not exists, or add the VASTOps MCP entry to the existing 'servers' section:
    {
        "servers": {
            "VASTOps MCP": {
                "command": "vastops-mcp",
                "args": [
                    "mcp"
                ]
            }
        }
    }

📝 Next steps:
   1. Edit or create the config file at the location shown above
   2. Restart VSCode
   3. The MCP server should be available in VSCode's MCP tools
   4. Test by asking VSCode to list VAST clusters

** VAST 클러스터에서 업데이트를 수행하려면 두 번째 인수로 --read-write 플래그를 추가하세요.

프롬프트 예시

읽기 전용 모드

List all VAST clusters 
List all views on cluster cluster1
Show me all tenants across all clusters
Create bandwidth and iops graph for cluster1 over the last hour
create dataflow diagram for cluster1 for /path view on the tenant3 tenant for the last hour 
show me dataflow diagram for 172.21.224.139 on cluster1
Show me the hardware topology for cluster cluster1 
Are there any issues with my configured data protection relationships ? 
Create mini support bundle on cluster1 and name it bundle1. Timeframe should be yesterday at midnight for 4m. Generate it only for cnodes prefixed by cnode-128 and upload it to support without private data.
Find all users prefixed with "s3" on cluster cluster1 tenant tenant1
Are there any critical alerts on my clusters that were not acknoledged ?
List all snapshots for view path /data/app1 on cluster cluster1 tenant tenant1
Show me all quotas configured for tenant tenant1 on cluster cluster1
Get performance metrics for cnodes on cluster cluster1 over the last 7 day
Show me all view policies on cluster cluster1 that support S3 
First, get all available clusters. Then compare views with path "/" across all clusters, showing capcity information
Show me all tenants on cluster cluster1, for each tenant show me the 5 views with the highest used capacity
Get performance metrics for cluster cluster1, then get metrics for all cnodes, and finally get metrics for top 3 views. Show me a summary of IOPS and bandwidth for each object type
Find all views where logical used capacity is greater than 1TB. For each of these views, get their performance metrics over the last 24 hours and show which views have the highest IOPS

읽기-쓰기 모드

Create a new NFS view on cluster cluster1 with path /data/newview in tenant tenant1
Create a view on cluster cluster1 with path /shared/data in tenant tenant1 that supports both NFS and S3 protocols
Create a snapshot named "backup-2024-01-15" for view path /data/app1 on cluster cluster1, tenant tenant1 and keep it for 24h
Create a clone from snapshot "backup-2024-01-15" of view /data/app1. The clone should be at path /data/app1-clone in tenant tenant1 on cluster cluster1
Set a hard quota of 10TB for view path /data/app1 on cluster cluster1, tenant tenant1
Create 3 new views for vmware based on template. 
Create a indestructible snapshot named resrote-point_<view name> for all vmware views on cluster1 
Refresh a clone from most recent snapshot of view /data/app1 at path /data/app1-clone in tenant tenant1 on cluster cluster1

설치

사전 요구 사항

  • Python 3.10+

  • jq: 명령줄 JSON 프로세서 (YAML 템플릿의 필드 변환에 필요)

jq 설치

macOS:

brew install jq

Linux (Ubuntu/Debian):

sudo apt-get install jq

Linux (RHEL/CentOS):

sudo yum install jq

기본 설치

pip install vastops-mcp

전체 단계별 가이드(사전 요구 사항, vastops-mcp setup, Claude Desktop / Claude Code 연결, 스모크 테스트)는 docs/user-guide/installation.md를 참조하세요.

CLI

함수를 테스트할 수 있습니다:

사용 가능한 명령 목록

vastops-mcp list
# Or
./vastops-mcp.sh list

동적 명령 실행

# List views
vastops-mcp list views --cluster vast3115-var

# List tenants with JSON output
vastops-mcp list tenants --format json

# List views with filters
vastops-mcp list views --cluster cluster1 --tenant mytenant

# Save output to file
vastops-mcp list views --cluster cluster1 --output views.csv --format csv

정적 명령

# List clusters
vastops-mcp clusters

# List performance metrics
vastops-mcp performance --object-name tenant --cluster vast3115-var

# Query users
vastops-mcp query-users --cluster vast3115-var --prefix user

생성 명령

# Create a view
vastops-mcp create view --cluster cluster1 --path /myview --protocols NFS

# Create a view from template
vastops-mcp create view-from-template --cluster cluster1 --template-name mytemplate

# Create a snapshot
vastops-mcp create snapshot --cluster cluster1 --path /myview --name mysnapshot

# Create a clone
vastops-mcp create clone --cluster cluster1 --source-path /myview --source-snapshot mysnapshot --destination-path /myclone

# Create or update quota
vastops-mcp create quota --cluster cluster1 --path /myview --hard-limit 10GB

출력 형식

  • table (기본값): 사람이 읽을 수 있는 표 형식

  • json: JSON 출력

  • csv: CSV 형식

MCP 도구

정적 목록 도구

  • list_clusters_vast: VAST 클러스터, 상태, 용량 및 사용량 정보 검색

  • list_performance_vast: VAST 클러스터 객체에 대한 성능 메트릭 검색

  • query_users_vast: VAST 클러스터에서 사용자 이름 쿼리

동적 목록 도구

추가 목록 도구는 ~/.vastops-mcp/mcp_list_cmds_template.yaml에 위치한 YAML 템플릿 파일에서 자동으로 등록됩니다. 이러한 도구는 list_{command_name}_vast 명명 규칙을 따릅니다.

참고: YAML 템플릿에서 create_mcp_tool: false로 설정된 명령은 독립형 MCP 도구로 등록되지 않습니다. 이러한 명령은 병합된 명령이나 CLI를 통해서는 여전히 사용할 수 있지만, MCP 도구 목록에는 나타나지 않습니다.

생성 도구

MCP 서버가 --read-write로 시작될 때 다음 생성 도구를 사용할 수 있습니다:

  • create_view_vast: 새로운 VAST 뷰 생성

  • create_view_from_template_vast: 사전 정의된 템플릿에서 뷰 생성

  • create_snapshot_vast: VAST 뷰에 대한 스냅샷 생성

  • create_clone_vast: 스냅샷에서 클론 생성

  • create_quota_vast: 특정 경로 및 테넌트에 대한 쿼터 생성 또는 업데이트

참고: 생성 도구는 항상 등록(LLM에 표시)되지만, 서버가 읽기-쓰기 모드가 아닐 때 호출하면 오류가 발생합니다.

구성

  • 구성 파일: ~/.vastops-mcp/config.json (클러스터 구성, 환경 변수 재정의 불가)

  • 기본 템플릿 파일: 프로젝트 루트의 mcp_list_cmds_template.yaml (제공된 템플릿)

  • 템플릿 수정 파일: ~/.vastops-mcp/mcp_list_template_modifications.yaml (사용자 정의)

  • 뷰 템플릿 파일: ~/.vastops-mcp/view_templates.json (템플릿 기반 뷰 생성용). 이 파일은 프로젝트 루트의 view_templates_example.yaml 템플릿 예제를 기반으로 수정할 수 있습니다.

  • 로그 파일: ~/.vastops-mcp/vastops_mcp.log

환경 변수

템플릿 파일 경로

템플릿 파일 경로는 환경 변수를 사용하여 재정의할 수 있습니다:

  • VASTOPS_MCP_DEFAULT_TEMPLATE_FILE: 기본 템플릿 파일 경로 재정의

  • VASTOPS_MCP_TEMPLATE_MODIFICATIONS_FILE: 템플릿 수정 파일 경로 재정의

  • VASTOPS_MCP_VIEW_TEMPLATE_FILE: 뷰 템플릿 파일 경로 재정의

예시:

export VASTOPS_MCP_DEFAULT_TEMPLATE_FILE=/custom/path/default_template.yaml
export VASTOPS_MCP_TEMPLATE_MODIFICATIONS_FILE=/custom/path/modifications.yaml
export VASTOPS_MCP_VIEW_TEMPLATE_FILE=/custom/path/view_templates.json
vastops-mcp list views

프록시 구성

서버는 기업 또는 엔터프라이즈 네트워크 환경에서 VAST 클러스터에 도달하기 위한 HTTP/HTTPS 및 SOCKS 프록시를 지원합니다. 프록시는 표준 환경 변수를 통해 구성됩니다:

  • HTTPS_PROXY 또는 https_proxy — 최우선 순위 (VAST API는 HTTPS를 사용하므로 권장)

  • HTTP_PROXY 또는 http_proxy — 대체

  • ALL_PROXY 또는 all_proxy — 전체 적용, SOCKS 프록시에 권장

프록시 우회 (NO_PROXY):

NO_PROXY(또는 no_proxy)를 사용하여 프록시를 거치지 않고 직접 연결해야 하는 호스트를 나열하세요. 여러 항목은 쉼표로 구분합니다. 와일드카드 *는 모든 호스트에 대해 프록시를 우회합니다.

# Skip proxy for internal VAST clusters
export NO_PROXY=vast-cluster1.internal,10.0.0.5

HTTP/HTTPS 프록시 예시:

# Basic HTTP proxy
export HTTPS_PROXY=http://proxy.example.com:8080

# Proxy with authentication
export HTTPS_PROXY=http://username:password@proxy.example.com:8080

# Run commands as normal — proxy is picked up automatically
vastops-mcp clusters
vastops-mcp list views --cluster cluster1

SOCKS 프록시 지원:

SOCKS 프록시(SOCKS4, SOCKS4a, SOCKS5, SOCKS5h)가 지원되지만 선택적 PySocks 라이브러리가 필요합니다:

# Install PySocks for SOCKS proxy support
pip install 'vastops-mcp[socks]'
# — or directly —
pip install pysocks

# SOCKS5 proxy (client-side DNS resolution)
export ALL_PROXY=socks5://proxy.example.com:1080

# SOCKS5h proxy (remote DNS resolution — recommended for internal hostnames)
export ALL_PROXY=socks5h://proxy.example.com:1080

# SOCKS5 with authentication
export ALL_PROXY=socks5h://username:password@proxy.example.com:1080

# SOCKS4 proxy
export ALL_PROXY=socks4://proxy.example.com:1080

프록시 유형 요약:

유형

설명

환경 변수

종속성

HTTP/HTTPS

표준 기업 프록시

HTTPS_PROXY / HTTP_PROXY

내장

SOCKS5

클라이언트 측 DNS를 사용하는 SOCKS5

ALL_PROXY

PySocks

SOCKS5h

원격 DNS를 사용하는 SOCKS5 (개인정보 보호 권장)

ALL_PROXY

PySocks

SOCKS4

레거시 SOCKS4 프로토콜

ALL_PROXY

PySocks

SOCKS4a

원격 DNS를 사용하는 SOCKS4

ALL_PROXY

PySocks

참고: 모든 프록시 환경 변수는 모든 프록시 유형에서 작동하지만, SOCKS 프록시에 ALL_PROXY를 사용하는 것이 표준 관례이며 구성을 명확하게 유지합니다.

API 화이트리스트

API 화이트리스트는 액세스할 수 있는 VAST API 엔드포인트 및 HTTP 메서드를 제한하여 보안을 제공합니다. YAML 템플릿 파일의 api_whitelist 섹션에서 구성됩니다.

기본 동작

  • 단순 형식 (- views): 기본적으로 GET 전용

  • 메서드 포함 (- views: [post]): GET + 지정된 메서드 허용

    • 예: - views: [post]는 views 엔드포인트에 대해 GET 및 POST를 모두 활성화합니다.

    • 예: - quotas: [post, patch]는 quotas 엔드포인트에 대해 GET, POST 및 PATCH를 활성화합니다.

구성

화이트리스트는 YAML 템플릿 파일에 정의됩니다:

api_whitelist:
  # Simple format - GET only
  - clusters
  - tenants
  
  # With methods - GET + specified methods
  - views: [post]  # GET + POST for create operations
  - snapshots: [post]  # GET + POST for create operations
  - quotas: [post, patch]  # GET + POST + PATCH for create/update operations

보안 모델

  • 기본적으로 제한적: 엔드포인트가 화이트리스트에 없으면 거부됩니다.

  • 메서드 유효성 검사: 지정된 HTTP 메서드만 허용됩니다.

  • 하위 엔드포인트 지원: 상위 엔드포인트가 화이트리스트에 있으면(예: monitors), 모든 하위 엔드포인트가 허용됩니다(예: monitors.ad_hoc_query).

중요성

모든 API 호출은 화이트리스트에 대해 유효성이 검사됩니다. 이를 통해 다음을 보장합니다:

  • 승인된 엔드포인트만 액세스 가능

  • 승인된 HTTP 메서드만 사용 가능

  • 생성 작업에는 명시적인 화이트리스트 구성이 필요함 (예: - views: [post])

YAML 템플릿 구조

YAML 템플릿 파일은 동적 목록 함수를 정의합니다. 전체 문서는 TEMPLATE_STRUCTURE.md를 참조하세요.

YAML 파일의 각 명령은 다음을 정의합니다:

  • api_endpoints: 호출할 VAST API 엔드포인트

  • per_row_endpoints (선택 사항): 기본 데이터 세트의 각 행에 대해 호출되는 엔드포인트. 쿼리 매개변수는 $field_name 구문을 사용하여 행 데이터에서 파생됨

  • fields: 변환(jq, 단위 변환, 요약)이 포함된 출력 필드

  • arguments: 유효성 검사가 포함된 MCP 도구 매개변수

  • description: MCP 컨텍스트를 위한 도구 설명

자세한 예제와 모범 사례는 TEMPLATE_STRUCTURE.md를 참조하세요.

아키텍처

서버는 다음을 사용합니다:

  • fastmcp: MCP 서버 프레임워크

  • vastpy: VAST API 클라이언트

  • template_parser: YAML 템플릿 파싱

  • command_executor: 동적 명령 실행

  • jq: JSON 변환을 위한 시스템 명령줄 도구 (YAML 템플릿의 jq 표현식에 필요)

생성 함수

서버에는 VAST 객체를 생성하기 위한 생성 함수가 포함되어 있습니다. 이러한 함수는 MCP 서버가 --read-write 플래그로 시작될 때 사용할 수 있습니다:

  • create_view_vast: 새로운 VAST 뷰 생성

  • create_view_from_template_vast: 사전 정의된 템플릿에서 뷰 생성

  • create_snapshot_vast: VAST 뷰에 대한 스냅샷 생성

  • create_clone_vast: 스냅샷에서 클론 생성

  • create_quota_vast: 특정 경로 및 테넌트에 대한 쿼터 생성 또는 업데이트

중요: 생성 함수를 사용하려면 MCP 서버를 --read-write 플래그로 시작해야 합니다. 읽기 전용 모드에서 호출하면 LLM 사용자에게 읽기-쓰기 모드가 필요하다는 알림이 표시됩니다.

보안: 모든 생성 함수는 API 화이트리스트를 사용하여 허용된 엔드포인트 및 HTTP 메서드만 액세스할 수 있도록 합니다. 자세한 내용은 API 화이트리스트 섹션을 참조하세요.

커뮤니티 및 지원

VASTOps MCP 서버에 대한 질문, 피드백 및 기능 요청을 환영합니다. https://community.vastdata.com/ 에서 대화에 참여하세요.

라이선스

Apache License 2.0

자세한 내용은 LICENSE 파일을 참조하세요.

작성자

Haim Marko haim.marko@vastdata.com

Related MCP Connectors

Related MCP Servers