Skip to main content
These examples show how an MCP client (or custom integration) chains NeuroFusion MCP tools across common research workflows.

1. Create a Quest with an AI-Generated Experiment and Publish It

A typical study creation workflow discovers your organization, generates a jsPsych 8 experiment, saves a draft quest, and publishes it.

Step 1: Discover your organization

Tool call: list_organizations
Response:

Step 2: Generate a jsPsych 8 experiment

Tool call: generate_experiment_code
You can iteratively refine the generated HTML by calling generate_experiment_code again with existingCode set to the previous HTML output and a follow-up description.

Step 3: Create the draft quest

Tool call: create_quest
Response:
NeuroFusion automatically enforces the platform consent onboarding question and records version 1 in the quest’s config history when create_quest runs.

Step 4: Publish the quest

Tool call: publish_quest
Publishing charges quest_publish credits to the organization on the first publish only; unpublishing and republishing later is free.

2. Inspect Collected Datasets and Run an Async Export

Step 1: Check dataset summary

Tool call: get_quest_dataset_summary
Use the summary to see dataset counts by type (experiment_trials, brain_recordings, onboarding_responses), experiment names, and captured URL parameters (such as PROLIFIC_PID or condition).

Step 2: Filter and inspect datasets

Tool call: list_quest_datasets
To inspect an individual record’s JSON or CSV payload: Tool call: get_dataset_content

Step 3: Trigger an async export and fetch the download URL

Tool call: create_dataset_export
Poll the returned jobGuid until status is "completed", setting includeDownloadUrl: true to mint a 30-minute read-only Azure Blob SAS URL: Tool call: get_dataset_export

3. Create and Publish an Interactive HTML Research Artifact

AI assistants can analyze exported data and publish interactive HTML reports directly back to the quest.

Step 1: Create an organization-visible draft artifact

Tool call: create_quest_artifact

Step 2: Publish the artifact publicly

Once your team reviews the artifact, update its visibility to "public" (requires artifact.publish permission): Tool call: update_quest_artifact

4. Audited Deletion & Config Rollback

Delete test datasets with an audit reason

Tool call: delete_quest_datasets
Every deleted dataset is recorded in the Data Audit Trail with your user ID, source: "mcp", and the provided reason.

Roll back a quest configuration

  1. Call get_quest_config_history with { "questGuid": "qst_4a3b2c1d" } to inspect prior version numbers.
  2. Restore a previous snapshot with rollback_quest_config:

5. Direct HTTP JSON-RPC Requests (curl)

If you are building a custom client or testing with an OAuth 2.1 access token ($MCP_ACCESS_TOKEN), send JSON-RPC 2.0 requests directly to POST /mcp:

Initialize and list tools

Invoke a tool

Read an MCP resource