Developer Guide¶
This guide explains how the project is structured, how to develop new features, and how to test changes.
Development Prerequisites¶
- Python 3.9+
- pip
- Optional:
mkdocsif you want to build the documentation site
Setup¶
From the repo root:
If you work with SQL or file formats:
Running The Server Locally¶
Running Tests¶
Project Layout¶
src/sktime_mcp/server.pyMCP entry point and tool routersrc/sktime_mcp/tools/MCP tool implementationssrc/sktime_mcp/registry/sktime estimator discovery and tag logicsrc/sktime_mcp/composition/pipeline validation rulessrc/sktime_mcp/runtime/executor and handle managersrc/sktime_mcp/data/data source adapters and registryexamples/runnable examples
Architecture Overview¶
High-level flow:
- MCP server receives a tool call
- The server routes to a tool implementation in
tools/ - Tools use the registry/runtime layers to execute operations
- Results are sanitized and returned to the client
This separation keeps the MCP surface small while allowing deeper functionality in the runtime and data layers.
Adding A New MCP Tool¶
- Create a new module under
src/sktime_mcp/tools/with a*_toolfunction. - Add a tool schema in
src/sktime_mcp/server.pywithinlist_tools(). - Add a handler in
call_tool()to dispatch the tool name. - Add tests in
tests/. - Document the tool in
docs/user-guide.md.
Adding A New Data Source Adapter¶
- Implement a new adapter in
src/sktime_mcp/data/adapters/that inheritsDataSourceAdapter. - Register it in
src/sktime_mcp/data/registry.pyusingDataSourceRegistry.register(). - Add tests covering
load(),validate(), andto_sktime_format(). - Update
docs/data-sources.md.
Adding A Demo Dataset¶
Update DEMO_DATASETS in src/sktime_mcp/runtime/executor.py with a new loader string. Ensure the loader function returns a sktime-compatible dataset.
Documentation Build¶
If you want to build the docs site locally:
The config lives in mkdocs.yml and the docs content is under docs/.