sktime-mcp
OfficialThe sktime-mcp server is a semantic engine that exposes sktime's time-series machine learning library to LLMs via the Model Context Protocol (MCP), enabling discovery, composition, and execution of real sktime workflows.
Discover & Explore
Query the registry for available estimators, metrics, and datasets by task type or capability tags
Get detailed descriptions of any sktime class (estimators, splitters, metrics, transformers)
Manage Data
Load time series from pandas dicts, CSV/Excel/Parquet files, SQL databases, or URLs
Inspect, auto-format, convert between mtypes, split into train/test sets, and save data
Release data handles to free memory
Build & Run Models
Instantiate any sktime estimator or pipeline from a spec string (e.g.,
ARIMA(order=(1,1,1))orDetrender() * ARIMA())Fit, predict (point, intervals, quantiles, probabilities), update, and retrieve fitted parameters
Call any native method on a sktime component (splitters, metrics, aligners, etc.)
Evaluate & Export
Cross-validate estimators on datasets
Export fitted estimators as executable Python code for reproducibility
Plot one or more time series, saving to file or returning as base64
Model Persistence
Save and load fitted models using sktime's MLflow integration
Session & Job Management
List, inspect, and release active data/estimator handles in memory
Run tasks asynchronously; monitor, check status, or cancel background jobs
Run arbitrary CLI/bash commands inside the server container (e.g., install packages)
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@sktime-mcp find a forecasting estimator for monthly sales data"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
sktime-mcp
Read the Documentation | PyPI Package
MCP (Model Context Protocol) layer for sktime - Registry-Driven for LLMs
A semantic engine that exposes sktime's native registry and semantics to Large Language Models, enabling them to:
🔍 Discover valid estimators
🧠 Reason about estimator capabilities
🔗 Compose compatible estimators
⚡ Execute real sktime workflows on real data
🎯 Design Philosophy
This MCP is not just documentation or static code analysis. It is a semantic engine for programmatic model usage.
Key Principles
sktime as Source of Truth - No AST parsing, no repo indexing, no heuristics. All structure comes from
all_estimators, estimator tags, and sktime's API contracts.Registry-First - Instead of
File → Class → Infer Relationships, we doRegistry → Semantics → Safe Execution.Minimal MCP Surface - Exposes only what an LLM needs: Discovery, Description, Instantiation, Execution, and model persistence.
Related MCP server: Ollama MCP Server
🛠️ Installation
Zero-install via uvx (recommended)
If you have uv installed, no separate installation step is needed. Just update your MCP client config (see Connecting from an LLM Client below) and uvx will handle the rest automatically.
# Verify uv is available
uvx sktime-mcp --helppip
pip install sktime-mcp
# With optional extras (SQL, forecasting models, file formats)
pip install "sktime-mcp[all]"Development installation
git clone https://github.com/sktime/sktime-mcp
cd sktime-mcp
python3 -m pip install -e ".[dev]"🐳 Docker
Run without installing anything locally (only Docker required):
# Build the image
docker build -t sktime-mcp .
# Run the MCP server (stdio transport)
docker run -i sktime-mcpOr use Docker Compose:
docker compose build
docker compose run sktime-mcpClaude Desktop — use Docker as the MCP server command:
{
"mcpServers": {
"sktime": {
"command": "docker",
"args": ["run", "-i", "--rm", "sktime-mcp"]
}
}
}Environment variables can be passed at runtime:
docker run -i -e SKTIME_MCP_LOG_LEVEL=DEBUG sktime-mcpFor a more detailed first-time setup flow, including MCP server verification and troubleshooting, see Beginner Setup.
🧭 Beginner Setup (First‑Time Users)
If you are new to sktime‑mcp or to MCP‑based workflows, this section provides a minimal starting point to help you verify that your setup is working correctly.
What is MCP?
The Model Context Protocol (MCP) allows Large Language Models (LLMs) to discover, reason about, and execute sktime workflows programmatically. This project exposes sktime’s estimator registry and semantics in a structured way so that LLMs can safely compose and run real time‑series pipelines.
Prerequisites
Python 3.10 or newer
A working Python virtual environment (recommended)
pipinstalled
macOS / Unix-like first-time setup
For macOS or Unix-like shells, create an isolated virtual environment before installing the package:
python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install sktime-mcpFor development (if you want to modify the source):
python -m pip install -e ".[dev]"Verify that the MCP server starts:
sktime-mcpIf the sktime-mcp console command is not found (e.g. the script was not placed on your PATH), use the module fallback instead — this is also the recommended form when an MCP client needs to target a specific Python environment:
python -m sktime_mcp.serverCommon first-time issues:
Symptom | Likely cause | Fix |
| Scripts directory not on | Run |
| Package not installed in the active environment | Confirm |
| System | Use |
Wrong Python version selected | Multiple Python installations | Invoke |
Minimal Setup Check
After completing the steps above, confirm the server starts with sktime-mcp. See the macOS / Unix-like first-time setup section for the fallback command and common error solutions.
Note: On Windows, the
sktime-mcpcommand may be installed to a directory not on yourPATH(e.g.,%APPDATA%\Python\Python3xx\Scripts). Either add that directory to yourPATHor usepython -m sktime_mcp.serverinstead.
🚀 Quick Start
Running the MCP Server
Standard Stdio Mode (for MCP Clients)
sktime-mcpHTTP/SSE Mode via FastAPI (for Web Browsers or ChatGPT)
To expose the MCP server as a REST API over SSE (Server-Sent Events) for direct consumption:
PYTHONPATH=src .venv/bin/uvicorn sktime_mcp.app:app --host 127.0.0.1 --port 8001This exposes standard SSE on /sse and message passing on /messages/.
Note for ChatGPT Web Users: ChatGPT runs in the cloud and cannot connect to
http://127.0.0.1(you will get an "Unsafe URL" error). You must expose your local server to the internet using a secure tunnel like ngrok:ngrok http 8001Then use the provided
https://<your-ngrok-id>.ngrok-free.app/sseURL in ChatGPT.
Configuration (Environment Variables)
You can configure the server's behavior at runtime using environment variables:
SKTIME_MCP_MAX_RESPONSE_TOKENS: Maximum tokens allowed per tool response (e.g.,10000). If a response exceeds this limit, it is truncated and appended with a notice. Set to0(default) for unlimited.SKTIME_MCP_LOG_LEVEL: Server logging verbosity level (DEBUG,INFO,WARNING,ERROR). Defaults toWARNING.SKTIME_MCP_AUTO_FORMAT: Enables or disables automatic time-series formatting during data loading.SKTIME_MCP_JOB_MAX_AGE_HOURS: Maximum hours before completed background jobs are automatically pruned. Defaults to24.
Connecting from an LLM Client
The server uses stdio transport by default, compatible with Claude Desktop, Claude Code, and other MCP clients.
Claude Desktop — add to your config file:
Platform | Config path |
macOS |
|
Linux |
|
Windows |
|
With uvx (recommended — no prior install needed):
{
"mcpServers": {
"sktime": {
"command": "uvx",
"args": ["sktime-mcp"]
}
}
}With optional extras:
{
"mcpServers": {
"sktime": {
"command": "uvx",
"args": ["sktime-mcp[forecasting,sql]"]
}
}
}With pip-installed package:
{
"mcpServers": {
"sktime": {
"command": "sktime-mcp"
}
}
}⚙️ Configuration
The server can be configured via environment variables:
Environment Variable | Description | Default |
| Logging verbosity (e.g. |
|
| Optional file path to output logs to in addition to stderr | (None) |
| Automatically format time series data on load ( |
|
| Maximum age in hours before background jobs are cleared |
|
| Interval in seconds for periodic job cleanup checks |
|
📚 Available Tools
The full tool reference is in the project documentation: https://sktime.github.io/sktime-mcp/
Need | Tool options | Rough explanation |
Discover what sktime can do |
| Find demo data, estimators, tags, and component details. |
Bring data into the session |
| Load files, inline data, SQL, or URLs into handles; inspect, clean, split, and persist them. |
Build and run models |
| Create sktime estimators or pipelines, fit them, forecast, update, or call native methods. |
Evaluate and reproduce |
| Cross-validate, generate Python code, and persist fitted models. |
Manage runtime state |
| See what is in memory, clean it up, and track async work. |
The practical mental model is simple: prompts create tool calls, tool calls create handles, and handles let later prompts continue the workflow.
🔄 Example LLM Flows
See the User Guide for end-to-end workflow examples, including:
Discovering sktime coverage
Retail forecasting and saving results
Cleaning messy business data
Time-series classification
📁 Project Structure
sktime-mcp/
├── src/sktime_mcp/
│ ├── server.py # MCP server entry point
│ ├── registry/ # Registry interface & tag resolver
│ ├── composition/ # Pipeline composition validator
│ ├── runtime/ # Execution engine, handle & job management
│ ├── data/ # Data adapters (file, pandas, SQL, URL)
│ └── tools/ # MCP tool implementations
├── docs/ # Sphinx documentation source
├── examples/ # Usage examples
├── tests/ # Test suite
├── Dockerfile # Multi-stage container build
├── docker-compose.yml # Compose service definition
└── .dockerignore # Docker build context filter🧪 Running Tests
pytest tests/Local Quality Checks
Run standardized local checks before raising a PR:
make checkAuto-fix formatting and fixable lint issues:
make format-fixIf make is unavailable (common on Windows), run the equivalent commands:
ruff format --check .
ruff check .
pytestPre-Commit Hooks (Recommended)
To ensure your code meets quality standards before pushing, install the pre-commit hooks:
make install-hooksThis will automatically run Ruff and Pytest on your code every time you make a commit.
Available Tools
26 toolscall_methodA
Dynamically call any native method on an instantiated sktime component (e.g. 'split', 'get_alignment', 'call'). Use this tool to interact with non-standard scitypes like Splitters, Metrics, or Aligners that do not support the generic 'fit' or 'predict' endpoints. Pass 'kwargs' as a dictionary of arguments.
Inputs: handle_id (required), method_name (required), kwargs.
cancel_jobA
Cancel a running or pending background job. Set delete=true to also remove the job record entirely (useful for cleaning up completed/failed jobs).
Inputs: job_id (required), delete.
check_job_statusB
Check the status and progress of a background job
Inputs: job_id (required).
describe_componentA
Get detailed information about ANY class or component in the sktime ecosystem (estimators, splitters, metrics, transformers)
Inputs: name (required).
evaluate_estimatorC
Evaluate an estimator using cross-validation on a dataset
Inputs: dataset (required), estimator_handle (required), cv_folds.
export_codeC
Export an estimator or pipeline as executable Python code
Inputs: handle (required), dataset, var_name, include_fit_example.
fitA
Fit an estimator on data. Provide explicit X_handle and/y_handle (or datasets) depending on the estimator's scitype.
Inputs: estimator_handle (required), fh, X_handle, y_handle, +3 more.
get_fitted_paramsA
Get fitted parameters from an estimator
Inputs: estimator_handle (required).
inspect_dataA
Inspect a loaded data handle and return rich metadata for understanding the series before modelling. Returns mtype, scitype, shape, column names, dtypes, index level names, inferred frequency, cutoff (last training timestamp), total missing-value count, a 5-row head preview, and per-column summary statistics. Works on handles from load_data_source, split_data, or transform_data. Does not modify the data.
Inputs: data_handle (required).
instantiate_estimatorA
Create an estimator or pipeline instance using a sktime craft specification. The spec is a string that evaluates to an estimator, e.g., 'ARIMA(order=(1, 1, 1))' or 'Detrender() * ARIMA()'.
Inputs: spec (required).
list_available_dataA
List all data available for use — system demo datasets and active user-loaded data handles — in a single unified response. Use is_demo=true for demos only, is_demo=false for handles only, or omit is_demo to get both.
Inputs: is_demo.
list_handlesA
List all active estimator handles in memory
Inputs: no named parameters.
list_jobsA
List all background jobs with optional status filter
Inputs: limit, status.
load_data_sourceA
Load data from various sources into a data handle for forecasting. Can run synchronously (blocking) or asynchronously in the background. Supported source types: 'pandas' - from a dict or inline data (keys: data, time_column, target_column). 'file' - from CSV, Excel (.xlsx), or Parquet (keys: path, time_column, target_column). 'sql' - from a SQL database (keys: connection_string, query, time_column, target_column). 'url' - from a web URL pointing to CSV/Excel/Parquet (keys: url, time_column, target_column). GUIDELINES: 1. NEVER assume a column is a time index unless the user says so. 2. ALWAYS specify 'target_column' if the user mentions a specific variable. 3. The first column is used as target by default — if that's a date column, specify target_column explicitly. 4. For non-standard date formats, omit 'time_column' to use an integer index.
Inputs: config (required), run_async.
load_modelB
Load a saved sktime model from a local path and register it for use
Inputs: path (required).
plot_seriesB
Plot one or more time series natively. Can save the plot to a specified path as a PNG file or return it as a base64 string.
Inputs: data_handles (required), dpi, path, title, +6 more.
predictB
Generate predictions from a fitted estimator. Supports different modes like predict, predict_interval, predict_quantiles.
Inputs: estimator_handle (required), mode, alpha, horizon, +5 more.
query_registryA
Discover sktime estimators, metrics, or capability tags. Common tags you can filter estimators by: 'capability:pred_int' (bool) - prediction intervals, 'capability:multivariate' (bool) - multivariate support, 'handles-missing-data' (bool) - NaN handling, 'scitype:y' (str) - target type ('univariate'/'multivariate'/'both'), 'requires-fh-in-fit' (bool) - needs forecast horizon at fit time. Set task='tag' (or 'tags') to query the full list of capability tags.
Inputs: tags, task, limit, query, +1 more.
release_data_handleB
Release a data handle and free memory
Inputs: data_handle (required).
release_handleA
Release an estimator handle and free it from memory
Inputs: handle (required).
run_commandA
Run an arbitrary CLI/bash command inside the sktime container. Use this to install missing python packages (e.g., 'pip install mlflow') or inspect the file system.
Inputs: command (required).
save_dataA
Persist the target series (y) and any exogenous features (X) behind a data handle to a local file. Combines y and X into one table. Creates parent directories as needed. Supported formats: csv (default, writes index as first column), parquet, json (records orient, ISO dates).
Inputs: path (required), data_handle (required), format.
save_modelA
Save an estimator/pipeline handle using sktime MLflow integration
Inputs: path (required), estimator_handle (required), mlflow_params.
split_dataA
Split a time series data handle into temporal train and test sets, registering both halves as new data handles. Provide exactly one of test_size (fraction in (0, 1)) or fh (forecast horizon). fh may be an integer (hold out that many final steps) or a list of relative horizon indices (hold out max(fh) final steps). Returns train_handle, test_handle, cutoff timestamp, train_size, and n_test.
Inputs: data_handle (required), fh, test_size.
transform_dataA
Transform a loaded data handle and return a new handle. action='format' (default): auto-fix common time series issues — infer/set frequency, remove duplicate timestamps, fill index gaps, and forward/backward-fill missing values; returns changes_applied. action='convert': convert y to a different sktime mtype via convert_to() (requires to_mtype, e.g. 'pd.DataFrame', 'pd.Series', 'np.ndarray'). Replaces the legacy format_time_series tool.
Inputs: data_handle (required), action, to_mtype, fill_missing, +2 more.
updateC
Update a fitted estimator with new data.
Inputs: estimator_handle (required), X_handle, y_handle, X_dataset, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 26 tools
Several tools have overlapping purposes, such as 'list_available_data' and 'list_handles' (different but similar names), 'release_data_handle' and 'release_handle', and 'describe_component' and 'query_registry'. The generic 'call_method' tool also overlaps with standard fitting/prediction tools, though it is intended for non-standard cases. Overall, an agent might occasionally confuse tools despite descriptive names.
Most tool names follow a consistent 'verb_noun' pattern in snake_case (e.g., 'load_data_source', 'inspect_data', 'split_data'). However, a few short verbs like 'fit', 'predict', and 'update' break this pattern, and there is slight inconsistency with longer names like 'release_data_handle' vs 'release_handle'. Overall, the naming is mostly predictable.
With 26 tools, the server is on the higher end of appropriate size. It covers many aspects of time series forecasting (data handling, modeling, evaluation, plotting, job management), but some tools like 'run_command' and 'call_method' are generic escapes. The count feels slightly heavy but not excessive for the domain.
The tool surface covers the core workflow for time series forecasting: data loading, inspection, splitting, transformation, model instantiation, fitting, prediction, updating, evaluation, and saving/loading. Additionally, it supports plotting, code export, registry queries, and async job management. Minor gaps include a lack of explicit deletion for persistent models/data and hyperparameter tuning, but these are not critical.
Maintenance
Related MCP Connectors
MCP server providing access to the Scorecard API to evaluate and optimize LLM systems.
MCP server for progressive tool usage at any scale (see https://klavis.ai)
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA production-ready MCP server built with FastAPI, providing an enhanced tool registry for creating, managing, and documenting AI tools for Large Language Models (LLMs).34-
- FlicenseNot gradedqualityDmaintenanceA server that enables seamless integration between local Ollama LLM instances and MCP-compatible applications, providing advanced task decomposition, evaluation, and workflow management capabilities.6-
- AlicenseAqualityBmaintenanceA universal MCP server that enables any LLM or AI agent to access expert skills from your local filesystem.3541 npm40MIT
- AlicenseAqualityBmaintenanceAn MCP server that exposes deterministic workflows as tools, allowing small models to reliably orchestrate APIs and other MCP servers with minimal parameters.222 npm2MIT