loading…
Search for a command to run...
loading…
Provides machine learning researchers with tools for creating publication-quality scientific visualizations, statistical plots, and 2D data representations. It
Provides machine learning researchers with tools for creating publication-quality scientific visualizations, statistical plots, and 2D data representations. It streamlines the research workflow by enabling AI assistants to generate complex figures from CSV, JSON, or direct data inputs.
A comprehensive Model Context Protocol (MCP) server providing research productivity tools for machine learning researchers and developers.
ML Research MCP is an extensible platform that provides AI assistants with powerful tools for scientific research workflows. Built on the Model Context Protocol, it enables seamless integration with AI applications like Claude Desktop to automate and enhance various research tasks.
Current Status: Phase 1 - Data Visualization Roadmap: Image generation, presentation tools, literature management, and more
This project aims to be a comprehensive research assistant covering the entire ML research lifecycle:
plot_line - Time series and continuous data visualizationplot_scatter - Multi-dimensional scatter plots with size/color mappingplot_bar - Categorical comparisons (vertical/horizontal)plot_histogram - Distribution analysis with density estimationplot_box - Statistical summaries and outlier detectionplot_violin - Detailed distribution shapes with KDEplot_heatmap - Matrix visualization with annotationsplot_contour - 3D data in 2D with contour linesplot_pcolormesh - Fast pseudocolor plots for large datasetsAdd the server to Claude Code with a single command:
claude mcp add-json "ml-research" \
'{"command":"uvx","args":["--from","git+https://github.com/nishide-dev/ml-research-mcp","ml-research-mcp"]}'
Verify installation:
claude mcp list
Add to your MCP client configuration (e.g., ~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"ml-research": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/nishide-dev/ml-research-mcp",
"ml-research-mcp"
]
}
}
}
Run the server directly without installation:
# From GitHub (recommended)
uvx --from "git+https://github.com/nishide-dev/ml-research-mcp" ml-research-mcp
# From local directory (for development)
cd /path/to/ml-research-mcp
uvx --from . ml-research-mcp
Clone and set up development environment:
git clone https://github.com/nishide-dev/ml-research-mcp.git
cd ml-research-mcp
uv sync
# Run in development mode
uv run ml-research-mcp
After installation, you can ask Claude:
"Create a line plot showing temperature over time from experiment.csv"
"Generate a heatmap of the correlation matrix and save as PDF"
"Plot a scatter chart with x=[1,2,3,4], y=[2,4,6,8], sized by [10,20,30,40]"
from ml_research_mcp.tools.plot_basic import plot_line
# Generate publication-quality plot
image = plot_line(
x=[1, 2, 3, 4, 5],
y=[1, 4, 9, 16, 25],
style={"title": "Quadratic Function", "xlabel": "X", "ylabel": "Y²"},
output={"format": "pdf", "width": 20, "height": 15, "dpi": 300}
)
# Save to file
with open("plot.pdf", "wb") as f:
f.write(image)
Real examples generated with ML Research MCP:
| Query | Result |
|---|---|
| Line Plot "Create a line plot showing temperature over time with x=[1,2,3,4,5,6] and y=[2,4,3,5,6,7]" |
![]() |
| Scatter Plot "Make a scatter plot with color and size mapping using plasma colormap" |
![]() |
| Bar Chart "Generate a bar chart comparing performance across categories A through E" |
![]() |
| Histogram "Create a histogram with density normalization for distribution analysis" |
![]() |
| Violin Plot "Make a violin plot comparing Control vs Treatment groups" |
![]() |
| Heatmap "Generate an annotated correlation matrix heatmap using RdBu colormap" |
![]() |
All plots generated with publication-quality settings (150 DPI, customizable dimensions).
plot_line(
x: str | list[float],
y: str | list[float],
data_input: dict | None = None,
style: dict | None = None,
output: dict | None = None
) -> Image | bytes
Parameters:
x, y: Column names (if using file) or data arraysdata_input: {"file_path": "data.csv"} or {"data": {...}}style: {"title": "...", "xlabel": "...", "ylabel": "...", "grid": true}output: {"format": "png/pdf/svg", "width": 15, "height": 10, "dpi": 300}Additional parameters:
size: Point sizes (column name, array, or constant)color: Point colors (column name or array)Additional parameters:
orientation: "vertical" or "horizontal"plot_histogram(
data: str | list[float],
bins: int = 30,
density: bool = False,
...
)
plot_box(
data: str | list[list[float]],
labels: list[str] | None = None,
...
)
Similar to plot_box with kernel density estimation.
plot_heatmap(
data: str | list[list[float]],
x_labels: list[str] | None = None,
y_labels: list[str] | None = None,
annotate: bool = False,
...
)
plot_contour(
x: str | list[float],
y: str | list[float],
z: str | list[list[float]],
levels: int = 10,
filled: bool = True,
...
)
Fast alternative to contour plots with shading options.
Documentation will be added as features are implemented.
ml-research-mcp/
├── src/ml_research_mcp/
│ ├── server.py # MCP server entry point
│ ├── data/ # Data I/O modules
│ ├── plotting/ # Phase 1: Visualization
│ ├── tools/ # MCP tool definitions
│ │ ├── plot_basic.py
│ │ ├── plot_statistical.py
│ │ └── plot_2d.py
│ ├── generation/ # Phase 2: Image generation (planned)
│ ├── presentation/ # Phase 3: Slides/posters (planned)
│ └── research/ # Phase 4: Research tools (planned)
├── tests/ # Comprehensive test suite
└── docs/ # Extended documentation (planned)
# Development mode
uv run ml-research-mcp
# Or as module
uv run python -m ml_research_mcp.server
# All tests (48 tests, 100% pass rate)
uv run pytest
# With coverage report
uv run pytest --cov=src --cov-report=html
# Specific test suite
uv run pytest tests/test_plot_basic.py -v
# Format code
uv run ruff format .
# Lint and type check
uv run ruff check .
uv run ty check
uv add <package> # Runtime dependency
uv add --dev <package> # Development dependency
uv lock --upgrade # Update lockfile
Input Data (CSV/JSON/Array)
↓
Polars DataFrame Processing
↓
UltraPlot Rendering
↓
Output (PIL Image / bytes)
The platform is designed to be modular, with each research tool category as a separate module:
Each module exposes MCP tools that can be independently used or composed together.
Current (Phase 1)
Planned
We welcome contributions across all phases of the project!
uv run ruff format .
uv run ruff check .
uv run ty check
uv run pytest
See CONTRIBUTING.md (coming soon) for detailed guidelines.
MIT License - see LICENSE file for details.
Current Phase
Inspiration
Status: Phase 1 (Visualization) complete ✅ | Phase 2 (Image Generation) in planning 🚧
For feature requests or questions, please open an issue on GitHub.
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"ml-research-mcp": {
"command": "npx",
"args": []
}
}
}