Skip to main content

wDVC MCP

Python 3.10+ License: MIT Ruff MCP

wDVC MCP — Model Context Protocol server for wDVC (DVC Data Pipeline Management). Provides tools for architecting DVC pipelines, generating Docker worker commands for data download, and scaffolding wDVC projects.

Features

Feature Description
Architect Blueprints Complete reference for DVC pipeline stages, worker queue, Gradio API, file downloader
Docker Worker Command Generate exact docker run command for data download with configurable resources
API Usage Gradio web UI examples for queue submission and status monitoring
Pattern Catalog Searchable patterns from official/community repos with local fallbacks
Project Scaffolding Generate complete wDVC project structure with templates
Type Safety Fully typed, mypy clean

Installation

pip install wdvc-mcp

Or for development:

git clone https://github.com/wisrovi/wDVC-mcp.git
cd wDVC-mcp
pip install -e ".[dev]"
pre-commit install

Quick Start

Run the MCP Server

# Stdio transport (for Claude Desktop, etc.)
wdvc-mcp

# SSE transport (for HTTP clients)
wdvc-mcp --transport sse --port 8000

Available Tools

Tool Description
get_wdvc_architect_blueprints() Complete reference for all wDVC patterns
get_wdvc_worker_command() Generate Docker run command for data download
get_wdvc_api_usage() Gradio web UI usage examples
search_wdvc_patterns(query) Search pattern catalog

Example: Get Docker Worker Command

from wdvc_mcp.server import get_wdvc_worker_command

# Default command
cmd = get_wdvc_worker_command()
print(cmd)

Output:

mkdir -p ./projects

docker run -it --rm \
  --name worker \
  --hostname wDVC \
  --shm-size=16g \
  --cpus="4.0" \
  --memory="4g" \
  -e IP_HOST=192.168.1.84 \
  -e REDIS_HOST=192.168.10.108 \
  -v ./projects:/app/projects \
  -w /app \
  wisrovi/dataset-ia:worker-v1 \
  zsh

Customize the Command

cmd = get_wdvc_worker_command(
    ip_host="10.0.0.1",
    redis_host="10.0.0.2",
    projects_path="/data/my_projects",
    image="myorg/dataset-ia:latest",
    cpus="8.0",
    memory="16g",
    shm_size="32g",
)

Project Scaffolding

Generate a complete wDVC project structure:

from wdvc_mcp.templates import TemplateGenerator

bp = TemplateGenerator.get_files_blueprint("standard", "my_pipeline")
# bp contains: main.py, config/settings.py, worker/worker.py, api/api.py,
# dvc.yaml, Dockerfile.worker, docker-compose.worker.yaml, run_worker.sh, etc.

Scaffold Types

Type Description Folders
standard Full worker + API + config config, worker, api, scripts, tests, .wdvc
worker_service Worker only config, worker, scripts, tests, .wdvc
api_service API only config, api, tests, .wdvc
full_pipeline Everything + CI/CD config, worker, api, scripts, pipeline, tests, examples, .wdvc, .github/workflows

Architecture

��─────────────────────────────────────────────────────────────��
│                      wDVC Architecture                       │
├─────────────────────────────────────────────────────────────��
│                                                              │
│  ��──────────────��    ��──────────────��    ��──────────────��  │
│  │  Gradio UI   │    │  Python SDK  │    │  MCP Tools   │  │
│  │  (api.py)    │    │  (worker.py) │    │  (server.py) │  │
│  └──────��───────��    └──────��───────��    └──────��───────��  │
│         │                   │                   │           │
│         └───────────────────��───────────────────��           │
│                             ��                                │
│                  ��─────────────────────��                    │
│                  │   Redis (wredis)    │                    │
│                  │  Queue + Hash +     │                    │
│                  │  SortedSet          │                    │
│                  └──────────��──────────��                    │
│                             │                                │
│         ��───────────────────��───────────────────��           │
│         ��                   ��                   ��           │
│  ��─────────────��    ��─────────────��    ��─────────────��    │
│  │ Docker      │    │ DVC Pipeline│    │ S3 Remote   │    │
│  │ Worker      │    │ (dvc.yaml)  │    │ (DVC push)  │    │
│  │ (container) │    │             │    │             │    │
│  └─────────────��    └─────────────��    └─────────────��    │
│                                                              │
��─────────────────────────────────────────────────────────────��

Development

# Install dev dependencies
pip install -e ".[dev]"

# Run tests
make test

# Run with coverage
make test-cov

# Lint & format
make lint
make format

# Type check
make typecheck

# Build package
make build

# Publish to PyPI
make publish

Configuration

Environment Variables

Variable Default Description
REDIS_HOST localhost Redis server hostname
REDIS_PORT 6379 Redis server port
REDIS_DB 0 Redis database number
REDIS_PASSWORD None Redis password
IP_HOST Auto-detected Worker IP for registration

Docker Worker

The worker container requires:

  • Redis accessible at REDIS_HOST
  • Volume mount for projects/ (contains DVC repo + data)
  • Resources: 4 CPUs, 4GB RAM, 16GB SHM (configurable)

Related Projects

  • wredis - Redis control with Python (sync/async, decorators, HA)
  • wredis-mcp - MCP server for wRedis architecting
  • wsqlite - SQLite with Pydantic models
  • wsqlite-mcp - MCP server for wSQLite
  • wpipe - Pipeline orchestration
  • wpipe-mcp - MCP server for wPipe

License

MIT — see LICENSE for details.


Generated by wDVC MCP by wisrovi

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wdvc_mcp-0.1.0.tar.gz (20.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wdvc_mcp-0.1.0-py3-none-any.whl (16.6 kB view details)

Uploaded Python 3

File details

Details for the file wdvc_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: wdvc_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 20.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for wdvc_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0b2b00c83fdf404e511b41691454be3f446ea02c81c63394e80d71d519741aa8
MD5 9c0af69832d5b14b580e0624b5fa5a3d
BLAKE2b-256 2a3a000091d7036b001dac4c951cdfc8daae8df54da77ba562e5228678f6b782

See more details on using hashes here.

File details

Details for the file wdvc_mcp-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: wdvc_mcp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 16.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for wdvc_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cffcd56b52590968a7019a4f77db3360609011e76bda0f48a5658c6ee8d420b8
MD5 bb32385c1508dfb81cc69289df9a4d17
BLAKE2b-256 9f09e4491abbb37d99714142dfea01a2b6eb6c662fe58613a64e578d47988796

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page