Labsco
MCP SERVER · OFFICIAL PROJECT

Code Ocean MCP Server

by codeocean

Search a Code Ocean deployment for a capsule or pipeline, run it against attached data assets, wait for the computation to finish and read the result files back.

Physical Sciences & Scientific ComputingOfficial source
Summary
The run and the wait are both tool calls, so a computation can be started and its output read without a browser tab in between.

Search is deliberately lossy — descriptions come back truncated and tags limited — so the flow is search, then get_capsule or get_data_asset for the record you actually want. The waiting tools poll at an interval with a floor of 5 seconds and take an optional timeout, which is what makes an unattended run tolerable. The one thing worth reading twice is the attach split: a capsule sitting idle and a live cloud workstation session take different tools, and the descriptions point at each other rather than merging.

What it is

A front end to one Code Ocean deployment, exposing its capsules, pipelines, data assets and computations as 26 tools.

What you get
  • Search that returns compact records rather than full objects: search_capsules, search_pipelines and search_data_assets answer with id, name, slug, a truncated description and a limited tag list, paging through next_token while has_more is true, with include_field_names to get the long field names back.
  • Execution and its wait state: run_capsule starts a capsule or a pipeline with data assets, parameters and per-process settings, wait_until_completed polls until Completed or Failed, and get_computation, list_computations, rename_computation and delete_computation cover the rest of a run's life.
  • Results read straight into the conversation: list_computation_results walks the /results folder, get_result_file_urls returns view and download links, and download_and_read_a_file_from_computation returns the file's content.
  • Data assets built and tracked: create_data_asset takes S3 buckets, computation results or combined assets, wait_until_ready polls until the asset is usable, and update_metadata sets name, description, tags, default mount and admin-defined custom fields.
  • Two attachment paths that are not interchangeable: attach_data_assets and detach_data_assets for a capsule with no running cloud workstation, attach_computation_data_assets and detach_computation_data_assets for an active workstation session.
  • Deployment-level context: get_custom_metadata returns the custom metadata schema, get_capsule_app_panel the app panel for a capsule version, and get_data_asset and list_data_asset_files the full record and file tree behind a compact search hit.
Requirements

A Code Ocean deployment and three environment variables: CODEOCEAN_DOMAIN, CODEOCEAN_TOKEN and AGENT_ID.

Setup effort

One command plus a key — uvx codeocean-mcp-server, then supply credentials