OpenSesame–OSWeb MCP
Private repository — under active development · Built for OpenSesame · JATOS · Model Context Protocol
This project packages the full path from an experiment idea to online data collection as Model Context Protocol (MCP) tools. A researcher describes an experiment in plain language, or provides a preregistration, and an AI agent reads and writes OpenSesame .osexp files, checks OSWeb compatibility, builds the web version of the experiment, verifies it in a web browser, and finally imports it into a JATOS server to obtain task links. Collected results can be exported as CSV files ready for a wide range of analysis software. The goal is a repeatable preregistration → experiment script → online study workflow: the AI agent handles the mechanical work, and the researcher makes every decision in the workflow.
The system consists of two fully independent MCP servers coordinated by the AI agent. The Python server (about 35 tools) handles experiment-file editing, inline scripts, OSWeb and ES5 compatibility checks, bundle building, JATOS deployment, and result export, and provides a planning-form workflow that turns a structured study plan into an experiment skeleton. The Node.js server runs the generated HTML headlessly with Playwright for execution, screenshots, and interactive smoke tests. Irreversible actions such as deployment sit behind hard safety gates that are closed by default and must be opened by a human; updates to a deployed study happen in place, so study links and collected data are preserved; and every deployment decision is written to an audit log.
Development is spec-driven: tool behavior is first written as specification contracts, then implemented test-first, and the Python server currently passes nearly 1,000 automated tests. The full pipeline has been verified end to end on real JATOS servers with nine classic experimental tasks, used as demonstrators rather than new studies. Eight come from the psychology experiments replicated by Zwaan et al. (2018) in Psychonomic Bulletin & Review: the Simon task, the flanker task, motor priming, the spacing effect, DRM false memory, associative priming, repetition priming, and shape simulation in sentence-picture verification. The ninth is the Wisconsin Card Sorting Task, adapted from the official OpenSesame WCST tutorial. A local planning-form interface and counterbalanced participant assignment across concurrent sessions are still being validated. The toolkit is licensed under GPL-3.0, the same license as OpenSesame.
Status: Active — core pipeline complete; other features under validation. Repository is currently private.