attach_computation_data_assets
Attach one or more data assets to a cloud workstation session computation. Accepts a list of parameter objects (e.g. [{'id': '...'}]). Use for cloud workstation sessions.
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.
LABSCO SUMMARY
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.
A front end to one Code Ocean deployment, exposing its capsules, pipelines, data assets and computations as 26 tools.
A Code Ocean deployment and three environment variables: CODEOCEAN_DOMAIN, CODEOCEAN_TOKEN and AGENT_ID.
One command plus a key — uvx codeocean-mcp-server, then supply credentials
USE CASES
Find the capsule or pipeline by name, start it, wait for the computation to reach a terminal state, then list what it produced and read the file that matters.
Create the data asset from the bucket, wait until it is ready rather than guessing, and attach it to the capsule with the mount path the code expects.
Use the computation-level attach path for a live cloud workstation session, check the session's state, and detach the asset when the work is finished.
Search on the words they used, pull the full record for the best hit, and look at what has been run from it recently.
Set the name, description, tags and default mount on the asset, check what the deployment's custom schema expects, and confirm it now surfaces in a search.
Counted once with only startup setup. Other versions, modes or optional credentials may expose a different list.
attach_computation_data_assetsAttach one or more data assets to a cloud workstation session computation. Accepts a list of parameter objects (e.g. [{'id': '...'}]). Use for cloud workstation sessions.
attach_data_assetsAttach one or more data assets to a capsule with optional mount paths. Use when the capsule has no running cloud workstations. For active cloud workstation sessions use attach_computation_data_assets instead. Accepts a list of parameter objects (e.g. [{'id': '...'}]), not just a list of IDs.
create_data_assetCreate a new data asset from various sources including S3 buckets, computation results, or combined assets.
Data assets are versioned, immutable collections of files that serve as inputs or outputs for computational workflows in Code Ocean. Internal data assets store files within Code Ocean's infrastructure, while external data assets reference files in external storage (S3/GCP) without copying.
Supports creating data assets from AWS S3, GCP Cloud Storage, computation results, or combining existing data assets.
delete_computationDelete a computation and stop it if currently running.
detach_computation_data_assetsDetach one or more data assets from a cloud workstation session computation by their IDs.
detach_data_assetsDetach one or more data assets from a capsule by their IDs. Use when the capsule has no running cloud workstations. For active cloud workstation sessions use detach_computation_data_assets instead.
download_and_read_a_file_from_computationUse when you want to read the content of a file from a computation
download_and_read_a_file_from_data_assetUse when you want to read the content of a file from a data asset
get_capsuleRetrieve metadata for a specific capsule by its ID.Use only to fetch metadata for a known capsule ID. Do not use for searching.
get_capsule_app_panelRetrieve app panel information for a specific capsule by its ID.
get_computationRetrieve metadata and status information for a specific computation by its ID.
get_custom_metadataRetrieve the Code Ocean deployment's custom metadata schema.
get_data_assetGet full details for a data asset by ID. Use after compact search to retrieve complete metadata.
get_data_asset_file_urlsGenerate view and download URLs for a specific file from an internal data asset.Call only when the data asset is already created and in a ready state. If the asset may not yet be ready, first use wait_until_ready to poll until readiness, then retrieve the download URL.
get_result_file_urlsGenerate view and download URLs for a specific result file from a computation.
list_computation_resultsList result files and folders generated by a computation at the specified path. Empty path retrieves the /results root folder. computation_id is required as string
list_computationsGet all computations associated with a specific capsule.
list_data_asset_filesList files and folders within an internal data asset at the specified path. Empty path retrieves root level contents.
rename_computationRename an existing computation with a new display name.
run_capsuleExecute a capsule or pipeline with specified parameters and data assets.
For capsule execution: Set run_params.capsule_id and optionally provide data_assets, parameters, or named_parameters.
For pipeline execution: Set run_params.pipeline_id and optionally provide data_assets, processes (with process-specific parameters), and nextflow_profile configuration.
Typical workflow: 1) run_capsule() to start execution 2) wait_until_completed() to monitor progress 3) list_computation_results() and get_result_file_urls() to retrieve outputs.
search_capsulesSearch for capsules with filtering, sorting, and pagination options. Compact results: {items: [{id, n, s, d, t}], has_more, next_token, item_count}.
Item fields: id=id, n=name, s=slug, d=description (truncated), t=tags (limited). Pagination: item_count returns the number of items in the current page. Use next_token for additional pages when has_more=true. Set include_field_names=true to add field_names with full labels. Use get_capsule(id) if full details needed.
search_data_assetsSearch for data assets with filtering, sorting, and pagination options. Compact results: {items: [{id, n, d, t}], has_more, next_token, item_count}.
Item fields: id=id, n=name, d=description (truncated), t=tags (limited). Pagination: item_count returns the number of items in the current page. Use next_token for additional pages when has_more=true. Set include_field_names=true to add field_names with full labels. Use get_data_asset(id) if full details needed.
search_pipelinesSearch for pipelines with filtering, sorting, and pagination options. Compact results: {items: [{id, n, s, d, t}], has_more, next_token, item_count}.
Item fields: id=id, n=name, s=slug, d=description (truncated), t=tags (limited). Pagination: item_count returns the number of items in the current page. Use next_token for additional pages when has_more=true. Set include_field_names=true to add field_names with full labels. Use get_capsule(id) if full details needed.
update_metadataUpdate metadata for a data asset including name, description, tags, mount, and custom metadata.
Supports updating various metadata types:
wait_until_completedPoll a computation until it reaches 'Completed' or 'Failed' state with configurable timing.
Args: computation: The computation object to monitor polling_interval: Time between status checks in seconds (minimum 5 seconds) timeout: Maximum time to wait in seconds, or None for no timeout
Returns: Updated computation object once completed or failed
Raises: ValueError: If polling_interval < 5 or timeout constraints are violated TimeoutError: If computation doesn't complete within the timeout period
wait_until_readyPoll a data asset until it reaches 'Ready' or 'Failed' state with configurable timing.
Args: data_asset: The data asset object to monitor polling_interval: Time between status checks in seconds (minimum 5 seconds) timeout: Maximum time to wait in seconds, or None for no timeout
Returns: Updated data asset object once ready or failed
Raises: ValueError: If polling_interval < 5 or timeout constraints are violated TimeoutError: If data asset doesn't become ready within timeout period Poll until the specified data asset becomes ready before performing further operations (e.g., downloading files). You can set polling_interval and optional timeout.
BEFORE YOU INSTALL
26 tools when we connected. Each release targets a minimum Code Ocean platform API version, so on an older deployment a listed tool may not answer. The set includes writes such as run_capsule, create_data_asset, update_metadata and delete_computation.
All 6 documented clients run the server on your machine.
CONTEXT COST
Rated by the size of the 26 tool definitions that ride along on every turn, not by how many there are
INSTALLATION
uvx codeocean-mcp-server{
"inputs": [
{
"type": "promptString",
"id": "codeocean-token",
"description": "Code Ocean API Key",
"password": true
}
],
"servers": {
"codeocean": {
"type": "stdio",
"command": "uvx",
"args": [
"codeocean-mcp-server"
],
"env": {
"CODEOCEAN_DOMAIN": "https://codeocean.acme.com",
"CODEOCEAN_TOKEN": "${input:codeocean-token}",
"AGENT_ID": "VS Code"
}
}
}
}https://codeocean.acme.com is the address of your own Code Ocean deployment. VS Code asks for your Code Ocean access token when the server starts.
{
"mcpServers": {
"codeocean": {
"command": "uvx",
"args": [
"codeocean-mcp-server"
],
"env": {
"CODEOCEAN_DOMAIN": "https://codeocean.acme.com",
"CODEOCEAN_TOKEN": "<YOUR_API_KEY>",
"AGENT_ID": "Claude Desktop"
}
}
}
}https://codeocean.acme.com is the address of your own Code Ocean deployment, and <YOUR_API_KEY> is a Code Ocean access token you generated there.
{
"mcpServers": {
"codeocean": {
"command": "uvx",
"args": [
"codeocean-mcp-server"
],
"env": {
"CODEOCEAN_DOMAIN": "https://codeocean.acme.com",
"CODEOCEAN_TOKEN": "<YOUR_API_KEY>",
"AGENT_ID": "Cline"
},
"alwaysAllow": [],
"disabled": false
}
}
}https://codeocean.acme.com is the address of your own Code Ocean deployment, and <YOUR_API_KEY> is a Code Ocean access token you generated there.
{
"mcpServers": {
"codeocean": {
"command": "uvx",
"args": [
"codeocean-mcp-server"
],
"env": {
"CODEOCEAN_DOMAIN": "https://codeocean.acme.com",
"CODEOCEAN_TOKEN": "<YOUR_API_KEY>",
"AGENT_ID": "Roo Code"
}
}
}
}https://codeocean.acme.com is the address of your own Code Ocean deployment, and <YOUR_API_KEY> is a Code Ocean access token you generated there.
{
"mcpServers": {
"codeocean": {
"command": "uvx",
"args": [
"codeocean-mcp-server"
],
"env": {
"CODEOCEAN_DOMAIN": "https://codeocean.acme.com",
"CODEOCEAN_TOKEN": "<YOUR_API_KEY>",
"AGENT_ID": "Cursor"
}
}
}
}https://codeocean.acme.com is the address of your own Code Ocean deployment, and <YOUR_API_KEY> is a Code Ocean access token you generated there.
{
"mcpServers": {
"codeocean": {
"command": "uvx",
"args": [
"codeocean-mcp-server"
],
"env": {
"CODEOCEAN_DOMAIN": "https://codeocean.acme.com",
"CODEOCEAN_TOKEN": "<YOUR_API_KEY>",
"AGENT_ID": "Windsurf"
}
}
}
}https://codeocean.acme.com is the address of your own Code Ocean deployment, and <YOUR_API_KEY> is a Code Ocean access token you generated there.