Biomart MCP

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Schema

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Tools

Functions exposed to the LLM to take actions

NameDescription
list_marts
Lists all available Biomart marts (databases) from Ensembl. Biomart organizes biological data in a hierarchy: MART -> DATASET -> ATTRIBUTES/FILTERS. This function returns all available marts as a CSV string. Returns: str: CSV-formatted table of all marts with their display names and descriptions. Example: list_marts() >>> "name,display_name,description ENSEMBL_MART_ENSEMBL,Ensembl Genes,Gene annotation from Ensembl ENSEMBL_MART_MOUSE,Mouse strains,Strain-specific data for mouse ..."
list_datasets
Lists all available biomart datasets for a given mart. Each mart contains multiple datasets. This function returns all datasets available in the specified mart as a CSV string. Args: mart (str): The mart identifier to list datasets from. Valid values include: ENSEMBL_MART_ENSEMBL, ENSEMBL_MART_MOUSE, ENSEMBL_MART_ONTOLOGY, ENSEMBL_MART_GENOMIC, ENSEMBL_MART_SNP, ENSEMBL_MART_FUNCGEN Returns: str: CSV-formatted table of all datasets with their display names and descriptions. Example: list_datasets("ENSEMBL_MART_ENSEMBL") >>> "name,display_name,description hsapiens_gene_ensembl,Human genes,Human genes (GRCh38.p13) mmusculus_gene_ensembl,Mouse genes,Mouse genes (GRCm39) ..."
list_common_attributes
Lists commonly used attributes available for a given dataset. This function returns only the most frequently used attributes (defined in COMMON_ATTRIBUTES) to avoid overwhelming the model with too many options. For a complete list, use list_all_attributes. Args: mart (str): The mart identifier (e.g., "ENSEMBL_MART_ENSEMBL") dataset (str): The dataset identifier (e.g., "hsapiens_gene_ensembl") Returns: str: CSV-formatted table of common attributes with their display names and descriptions. Example: list_common_attributes("ENSEMBL_MART_ENSEMBL", "hsapiens_gene_ensembl") >>> "name,display_name,description ensembl_gene_id,Gene stable ID,Ensembl stable ID for the gene external_gene_name,Gene name,The gene name ..."
list_all_attributes
Lists all available attributes for a given dataset with some filtering. This function returns a filtered list of all attributes available for the specified dataset. Some less commonly used attributes (homologs, microarray probes) are filtered out to reduce the response size. CAUTION: This function can return a large number of attributes and may be unstable for certain datasets. Consider using list_common_attributes first. Args: mart (str): The mart identifier (e.g., "ENSEMBL_MART_ENSEMBL") dataset (str): The dataset identifier (e.g., "hsapiens_gene_ensembl") Returns: str: CSV-formatted table of all filtered attributes. Example: list_all_attributes("ENSEMBL_MART_ENSEMBL", "hsapiens_gene_ensembl")
list_filters
Lists all available filters for a given dataset. Filters are used to narrow down the results of a Biomart query. This function returns all filters that can be applied to the specified dataset. Args: mart (str): The mart identifier (e.g., "ENSEMBL_MART_ENSEMBL") dataset (str): The dataset identifier (e.g., "hsapiens_gene_ensembl") Returns: str: CSV-formatted table of all filters with their display names and descriptions. Example: list_filters("ENSEMBL_MART_ENSEMBL", "hsapiens_gene_ensembl") >>> "name,description chromosome_name,Chromosome/scaffold name start,Gene start (bp) end,Gene end (bp) ..."
get_data
Queries Biomart for data using specified attributes and filters. This function performs the main data retrieval from Biomart, allowing you to query biological data by specifying which attributes to return and which filters to apply. Includes automatic retry logic for resilience. Args: mart (str): The mart identifier (e.g., "ENSEMBL_MART_ENSEMBL") dataset (str): The dataset identifier (e.g., "hsapiens_gene_ensembl") attributes (list[str]): List of attributes to retrieve (e.g., ["ensembl_gene_id", "external_gene_name"]) filters (dict[str, str]): Dictionary of filters to apply (e.g., {"chromosome_name": "1"}) Returns: str: CSV-formatted results of the query. Example: get_data( "ENSEMBL_MART_ENSEMBL", "hsapiens_gene_ensembl", ["ensembl_gene_id", "external_gene_name", "chromosome_name"], {"chromosome_name": "X", "biotype": "protein_coding"} ) >>> "ensembl_gene_id,external_gene_name,chromosome_name ENSG00000000003,TSPAN6,X ENSG00000000005,TNMD,X ..."
get_translation
Translates a single identifier from one attribute type to another. This function allows conversion between different identifier types, such as converting a gene symbol to an Ensembl ID. Results are cached to improve performance. Args: mart (str): The mart identifier (e.g., "ENSEMBL_MART_ENSEMBL") dataset (str): The dataset identifier (e.g., "hsapiens_gene_ensembl") from_attr (str): The source attribute name (e.g., "hgnc_symbol") to_attr (str): The target attribute name (e.g., "ensembl_gene_id") target (str): The identifier value to translate (e.g., "TP53") Returns: str: The translated identifier, or an error message if not found. Example: get_translation("ENSEMBL_MART_ENSEMBL", "hsapiens_gene_ensembl", "hgnc_symbol", "ensembl_gene_id", "TP53") >>> "ENSG00000141510"
batch_translate
Translates multiple identifiers in a single batch operation. This function is more efficient than multiple calls to get_translation when you need to translate many identifiers at once. Args: mart (str): The mart identifier (e.g., "ENSEMBL_MART_ENSEMBL") dataset (str): The dataset identifier (e.g., "hsapiens_gene_ensembl") from_attr (str): The source attribute name (e.g., "hgnc_symbol") to_attr (str): The target attribute name (e.g., "ensembl_gene_id") targets (list[str]): List of identifier values to translate (e.g., ["TP53", "BRCA1", "BRCA2"]) Returns: dict: A dictionary containing: - translations: Dictionary mapping input IDs to translated IDs - not_found: List of IDs that could not be translated - found_count: Number of successfully translated IDs - not_found_count: Number of IDs that could not be translated Example: batch_translate("ENSEMBL_MART_ENSEMBL", "hsapiens_gene_ensembl", "hgnc_symbol", "ensembl_gene_id", ["TP53", "BRCA1", "BRCA2"]) >>> {"translations": {"TP53": "ENSG00000141510", "BRCA1": "ENSG00000012048"}, "not_found": ["BRCA2"], "found_count": 2, "not_found_count": 1}