Skip to main content
Glama
codeocean

Code Ocean MCP Server

Official
by codeocean

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
AGENT_IDYesIdentifier for the agent (e.g., 'Claude Desktop', 'VS Code', 'Cline')
LOG_FORMATNoOptional custom log formatting string (e.g., '%(asctime)s %(levelname)s [%(name)s] %(message)s')
CODEOCEAN_TOKENYesCode Ocean API Access Token
CODEOCEAN_DOMAINYesThe domain of the Code Ocean platform (e.g., https://codeocean.acme.com)

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
search_capsulesA

Search 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_pipelinesA

Search 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.

get_capsuleA

Retrieve metadata for a specific capsule by its ID.Use only to fetch metadata for a known capsule ID. Do not use for searching.

list_computationsB

Get all computations associated with a specific capsule.

attach_data_assetsA

Attach 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.

detach_data_assetsA

Detach 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.

get_capsule_app_panelB

Retrieve app panel information for a specific capsule by its ID.

search_data_assetsA

Search 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.

get_data_assetA

Get full details for a data asset by ID. Use after compact search to retrieve complete metadata.

get_data_asset_file_urlsA

Generate 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.

download_and_read_a_file_from_data_assetC

Use when you want to read the content of a file from a data asset

list_data_asset_filesB

List files and folders within an internal data asset at the specified path. Empty path retrieves root level contents.

update_metadataB

Update metadata for a data asset including name, description, tags, mount, and custom metadata.

Supports updating various metadata types:

  • Basic metadata: name (display name), description (free text description)

  • Organization: tags (keywords for searching), mount (default mount folder path)

  • Custom metadata: admin-defined custom fields with user-set values according to deployment configuration (string, number, or date fields in unix epoch format)

wait_until_readyA

Poll 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.

create_data_assetA

Create 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. Returns confirmation of creation request validity, not success, as creation takes time. Use wait_until_ready() to monitor creation progress.

You can link to the created data assets with the 'data_asset_id' with the pattern: https://codeocean.example.com with /data-assets/<data_asset_id>.

get_computationB

Retrieve metadata and status information for a specific computation by its ID.

run_capsuleA

Execute 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.

wait_until_completedA

Poll 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

list_computation_resultsB

List 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

get_result_file_urlsB

Generate view and download URLs for a specific result file from a computation.

download_and_read_a_file_from_computationC

Use when you want to read the content of a file from a computation

rename_computationB

Rename an existing computation with a new display name.

delete_computationB

Delete a computation and stop it if currently running.

attach_computation_data_assetsC

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.

detach_computation_data_assetsB

Detach one or more data assets from a cloud workstation session computation by their IDs.

get_custom_metadataB

Retrieve the Code Ocean deployment's custom metadata schema.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/codeocean/codeocean-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server