Metadata-Version: 2.4
Name: mlops-mcp-server
Version: 0.1.0
Summary: MCP server for common MLOps workflows
Project-URL: Homepage, https://github.com/anant-patankar/mlops-mcp-server
Project-URL: Source, https://github.com/anant-patankar/mlops-mcp-server
Project-URL: Bug Tracker, https://github.com/anant-patankar/mlops-mcp-server/issues
Author-email: Anant Patankar <patankar.anant123@gmail.com>
License-Expression: MIT
License-File: LICENSE
Keywords: dvc,experiment-tracking,llm-tools,machine-learning,mcp,mlflow,mlops,model-context-protocol,model-registry
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.11
Requires-Dist: fastmcp>=3.0.1
Requires-Dist: gitpython>=3.1.46
Requires-Dist: pandas>=3.0.1
Requires-Dist: pydantic>=2.12.5
Requires-Dist: pyyaml>=6.0.3
Provides-Extra: compare
Requires-Dist: deepdiff>=8.6.1; extra == 'compare'
Provides-Extra: dev
Requires-Dist: mypy>=1.19.1; extra == 'dev'
Requires-Dist: pre-commit>=4.5.1; extra == 'dev'
Requires-Dist: pytest-cov>=7.0.0; extra == 'dev'
Requires-Dist: pytest-mock>=3.15.1; extra == 'dev'
Requires-Dist: pytest>=9.0.2; extra == 'dev'
Requires-Dist: ruff>=0.15.2; extra == 'dev'
Provides-Extra: mlflow
Requires-Dist: mlflow>=1.27.0; extra == 'mlflow'
Provides-Extra: models
Requires-Dist: joblib>=1.5.3; extra == 'models'
Requires-Dist: onnx>=1.20.1; extra == 'models'
Requires-Dist: safetensors>=0.7.0; extra == 'models'
Provides-Extra: notebooks
Requires-Dist: nbformat>=5.10.4; extra == 'notebooks'
Provides-Extra: parquet
Requires-Dist: pyarrow>=23.0.1; extra == 'parquet'
Provides-Extra: templates
Requires-Dist: jinja2>=3.1.6; extra == 'templates'
Provides-Extra: validation
Requires-Dist: pandera>=0.29.0; extra == 'validation'
Requires-Dist: scipy>=1.17.0; extra == 'validation'
Description-Content-Type: text/markdown

## MLOps MCP Server

[![PyPI](https://img.shields.io/pypi/v/mlops-mcp-server)](https://pypi.org/project/mlops-mcp-server/)
![Python 3.11+](https://img.shields.io/badge/python-3.11%2B-blue)
![License: MIT](https://img.shields.io/badge/License-MIT-green)

**MCP server for common MLOps workflows**

An [MCP (Model Context Protocol)](https://modelcontextprotocol.io) server that gives AI assistants like Claude direct access to MLOps workflows — experiment tracking, model registry, dataset management, pipeline orchestration, lineage tracing, and more. Wraps DVC, MLflow, and Git rather than replacing them.

---

## Features

- **Experiment tracking** — create runs, log params/metrics/artifacts, compare runs, find best run, export to CSV
- **Model registry** — register, promote, tag, deprecate, and compare model versions; generate model cards
- **Dataset management** — profile datasets, validate schemas, detect statistical drift (KS-test), split, merge, and generate dataset cards
- **Pipeline management** — create, validate, and visualize DAG pipelines as Mermaid diagrams; cycle detection via Kahn's algorithm
- **Data lineage** — record artifact lineage, trace provenance with BFS, visualize as Mermaid graphs, check integrity
- **File operations** — full file/directory CRUD, content search, disk usage, batch operations
- **Project scaffolding** — 7 ML project templates with component injection and structure validation
- **Documentation generation** — model cards, dataset cards, experiment reports, pipeline docs, project READMEs, API docs
- **MLflow integration** — optional; wraps tracking, registry, and artifact operations
- **DVC integration** — optional; wraps data versioning and pipeline reproduction
- **Git operations** — optional; status, add, commit, log, .gitignore generation
- **Environment tools** — scan imports, generate requirements, check conflicts, create conda env files

Tools are registered in two tiers: a small set of always-on tools for quick file ops and discovery, and 15 domain modules you activate on demand to avoid flooding the agent context window.

---

## Installation

### Install directly from GitHub (available now)

```bash
pip install git+https://github.com/anant-patankar/mlops-mcp-server.git
```

Using `uv`:
```bash
uv add git+https://github.com/anant-patankar/mlops-mcp-server.git
```

### Install from PyPI (coming soon)

```bash
# Core install
pip install mlops-mcp-server

# With optional extras
pip install mlops-mcp-server[mlflow]
pip install mlops-mcp-server[mlflow,compare,notebooks,parquet]
```

Using `uv`:

```bash
uv add mlops-mcp-server
uv add "mlops-mcp-server[mlflow,compare,notebooks,parquet]"
```

---

## Usage

### Claude Desktop

Add to your Claude Desktop MCP config (`~/Library/Application Support/Claude/claude_desktop_config.json` on macOS):

First install the package, then add to your Claude Desktop config:

```json
{
  "mcpServers": {
    "mlops": {
      "command": "mlops-mcp-server"
    }
  }
}
```

Restart Claude Desktop. The server starts automatically when Claude connects.

### Example prompts

Once connected, you can ask Claude things like:

> "Show me all experiment runs, find the one with the best validation accuracy, and register that model in the registry."

> "Profile `data/train.csv`, check it against `schema.yaml`, then split it 70/15/15 and save to `data/splits/`."

> "Create a pipeline with three stages: preprocess → train → evaluate, validate it for cycles, and show me the Mermaid diagram."

### Running directly

```bash
mlops-mcp-server
```

---

## Optional Dependencies

| Extra | Installs | Enables |
|-------|----------|---------|
| `mlflow` | mlflow | MLflow tracking and registry tools |
| `compare` | deepdiff | Structured diff in `compare_runs` |
| `notebooks` | nbformat | Notebook summary in `get_notebook_summary` |
| `parquet` | pyarrow | Parquet read/write in dataset tools |
| `models` | joblib, onnx, safetensors | Model file format support |
| `validation` | pandera, scipy | Schema validation and drift statistics |
| `templates` | jinja2 | Jinja2 templates in `create_model_card` |

All extras are optional — the server runs without them and returns clear errors if a missing dependency is needed.

---

## License

MIT — see [LICENSE](LICENSE).
