Skip to main content
Glama
ImmPort MCP Server

ImmPort MCP Server

Official
by ImmPortDB

ImmPort MCP Server

An MCP server for ImmPort, the NIAID immunology data repository. It lets AI assistants such as Claude search ImmPort studies and subjects, read study data and assay results, look up controlled vocabularies and the data model, and find study files.

Using claude.ai? You don't need to install anything. Add the hosted connector https://mcp.immport.org in claude.ai (Settings → Connectors) and sign in with your ImmPort account.

This package is for running the server yourself, on your own computer: in Claude Desktop, Claude Code, or any other MCP client that starts servers from the command line.

1. Get an ImmPort API key

  1. Sign in at https://www.immport.org. Registration is free.

  2. Open https://www.immport.org/auth/api/keys and create a key.

  3. Download the JSON and copy the value of api_key.

Keys are valid for 30 days. When a key expires, create a new one and update your configuration. Searching and controlled-vocabulary lookups work without a key; study data, assay results and files need one.

Related MCP server: NIH Reporter MCP Server

2. Install

You need uv (recommended) or Python 3.11+.

uvx immport-mcp            # runs the latest version, no separate install step
# or
pip install immport-mcp    # then run: immport-mcp

The server talks to its client over stdio, so you normally don't run it yourself. Your MCP client starts it.

3. Connect your client

Claude Code

claude mcp add immport -e IMMPORT_API_KEY=<your key> -- uvx immport-mcp

Claude Desktop: add this to claude_desktop_config.json (Settings → Developer → Edit Config), then restart Claude Desktop:

{
  "mcpServers": {
    "immport": {
      "command": "uvx",
      "args": ["immport-mcp"],
      "env": { "IMMPORT_API_KEY": "<your key>" }
    }
  }
}

Other MCP clients: configure a stdio server with the command uvx immport-mcp and the environment variable IMMPORT_API_KEY.

What you can ask

  • "Find influenza vaccine studies in older adults and compare their size and available assays."

  • "Compare SDY180, SDY212 and SDY269: arms, demographics and which assay data each has."

  • "When was SDY180 released, and what changed in its latest update?"

  • "I downloaded SDY269's Tab.zip. Which tables do I join for each subject's arm, age and HAI titers? Write the SQL."

  • "List the Tab.zip and MySQL.zip files for SDY180."

Tools

Tool

What it does

Needs API key

search_studies

Search studies by condition, assay, species, sponsor and more

No

search_subjects

Search subjects across studies (demographics, arms, exposures)

No

lookup_controlled_vocabulary

Valid values for filters (conditions, assay types, …)

No

get_data_model

Tables of the ImmPort database: columns, keys, joins

No

get_study_data

Any study sub-resource (summary, arms, demographics, …) for up to 20 studies at once

Yes

get_study_data_availability

Record counts per data category, to see what a study contains

Yes

get_assay_results

Assay results (ELISA, HAI, flow cytometry, …)

Yes

get_study_files

List a study's files, stream text files, or get download links

Yes

get_release_notes

Data releases and a study's release history

Yes

Resources: immport://data-model, immport://query-tips, immport://search-fields, immport://assay-results-reference, immport://api-schema.

Prompts: guided workflows to discover studies for a topic, analyse one study in depth, compare immune responses across studies, build a cross-study cohort, and find and download files.

Configuration

Set these as environment variables, or in a .env file in the directory the server is started from.

Variable

Default

Meaning

IMMPORT_API_KEY

(none)

Your ImmPort API key (see above)

IMMPORT_METRICS_ENABLED

true

Send usage metrics (see below). false sends nothing

IMMPORT_BASE_URL

https://immport.org/data/query

ImmPort Data Query API

RESPONSE_CACHE_TTL

300

Seconds to cache API responses (0 turns caching off)

MCP_LOG_LEVEL

WARNING

Log level (DEBUG, INFO, WARNING, ERROR)

Usage metrics

To understand how ImmPort data is used, the server sends ImmPort one usage record for each tool call. The record holds the tool name, its parameters (e.g. study accessions or search terms), and your ImmPort username. It's sent with your API key, the same way ImmPort's own website and API record usage. No other data from your computer or conversation is sent.

To turn it off, set IMMPORT_METRICS_ENABLED=false.

Support

This repository is published from ImmPort's internal repository on each release; see CONTRIBUTING.md.

Available Tools

9 tools
get_assay_resultsGet Assay ResultsA

Retrieve assay results for any ImmPort assay type. Select the assay type via the assay_type parameter: elisa, elispot, fcs_analyzed, file_paths, hai, hla_typing, kir_typing, mass_spectrometry, mbaa, neut_ab_titer, pcr.

⚠️ SCOPE BEFORE CALLING: The upstream ImmPort API returns ALL matching records with no server-side pagination or aggregation. Large studies (e.g. flow cytometry, lab tests) can return tens of thousands of rows from a single visit — and combining a broad filter (arm_accession or study_time_collected alone) with a large study can time out outright. Always narrow with planned_visit_accession + arm_accession together (the most reliable combination) before calling. Use get_study_data(resource='experiments') first to confirm the assay type exists in the study.

Required: study_accession (list). Common filters: arm_accession, planned_visit_accession, subject_accession, measurement_technique, study_time_collected(_gte/_lte/_gt/_lt). Response-shrinking options: fields (project columns), name_contains (substring filter), summarize (per-group stats), limit/offset (paging) — these only shrink what's returned, not the upstream query cost, so real filters are still the best way to avoid timeouts.

For the full per-assay field list, every filter parameter, and response-shrinking option details, see the immport://assay-results-reference resource.

Inputs: assay_type (required), study_accession (required), sex, race, +47 more. Returns: object

get_data_modelGet Data ModelA

Get the ImmPort data model: the tables of the release database (the same tables as the Tab.zip / MySQL release files), with columns, types, descriptions, keys and joins. Public — no authentication needed.

• no table → index of all tables: [{name, type, description, columnCount}] (~110 tables) • table='arm_or_cohort' → that table in full: columns [{name, type, nullable, default, description}], primaryKey, foreignKeys [{columns, referencedTable, referencedColumns}], indexes, and referencedBy (tables that point to it)

Use it to understand what a column means, which columns hold controlled values (foreign keys to lk_* tables — get the values with lookup_controlled_vocabulary), and how to join tables (e.g. subject → arm_2_subject → arm_or_cohort → study) before analysing Tab.zip or MySQL files or writing SQL. For the overview of entities and API endpoints read immport://data-model.

Inputs: table. Returns: result

get_release_notesGet Release NotesA

ImmPort data releases and the release history of studies. Data releases are named DR (e.g. DR69, DR58, point releases like DR52.1); version also accepts 58 or dr58. Requires authentication.

Modes (chosen by which arguments are given): • study_accession only → each study's release history, newest first: [{studyAccession, briefTitle, releases: [{version, releaseDate, status, releaseNotes}]}]. status is 'Initial' (first released) or 'Updated'. releaseNotes is often null for older releases. study_accession may list up to 20 studies separated by commas. • study_accession + version='DR58' → only that release's entry for each study (404 if the study was not in that release). • study_accession + version='latest' → each study's OWN most recent release (e.g. SDY1 → DR58, even if the current release is DR69). • version only (e.g. 'DR69', or 'latest' for the newest release) → the release notes document the data release process published for that release, as is: release_version, release_date, study.studies[] (study_accession, brief_title, description, status, subjects, personnel, publications, assays, programs, release_notes on recent releases) and dataSummary (totals at that release). ⚠️ Large: 100–700 KB. 404 if its notes are not published yet. • neither → list of all data releases, newest first: [{version, releaseDate, initialStudyCount, updatedStudyCount}].

Examples: get_release_notes() # which releases exist get_release_notes(version='latest') # what's in the newest release get_release_notes(study_accession='SDY1') # when was SDY1 released/updated, and why get_release_notes(study_accession='SDY1,SDY269', version='latest')

Inputs: version, study_accession. Returns: result

get_study_dataGet Study DataA

Get any sub-resource for one or more ImmPort studies by specifying the resource parameter. All endpoints require authentication. Use study_accession format SDY#### (e.g. SDY1, SDY305).

MULTIPLE STUDIES: study_accession may list up to 20 studies separated by commas (e.g. 'SDY1,SDY269,SDY305') to get one combined result — every row carries studyAccession, so rows can be grouped per study. Studies without data for that resource are simply absent. Prefer one multi-study call over one call per study when comparing studies. Every resource returns a JSON array; 'summary' and 'json_ld' return one entry per study.

⚡ EFFICIENCY RULE: Issue multiple resource calls IN PARALLEL — they are independent. This tool returns structured JSON directly and is the preferred approach for AI agents. Only use Tab.zip (get_study_files action='manifest' → action='download') when you need join tables with no API equivalent: reagent specs, expsample-to-reagent mapping, fcs_header_marker, or expsample-to-treatment joins.

Available resources: summary: ▶ START HERE for any study workflow. Rich summary: title, PI, description, objectives, endpoints, hypothesis, subjects count, interventions, data completeness, publications, personnel, links basic_info: Basic study fields: title, briefDescription, doi, clinicalTrial, enrollment, age range, start/completion dates, sponsoring org arm: Study arms (cohorts/treatment groups): armAccession, name, description, typeReported, typePreferred (e.g. Placebo Comparator, Experimental) planned_visits: Planned visits (time points): plannedVisitAccession, name, orderNumber, minStartDay, maxStartDay, startRule, endRule conditions: Disease/conditions studied: conditionPreferred, conditionReported personnel: Study personnel: personAccession, firstName, lastName, roleInStudy, titleInStudy, organization, email, orcid protocols: Protocol documents: protocolAccession, type, name, description, fileName contract_program: Contract/funding: contractGrantId, contractGrantName, contractGrantCategory, programId, programCategory, programDescription inclusion_exclusion: Inclusion/exclusion eligibility criteria: criterion text and category (Inclusion or Exclusion) pubmed: PubMed publications: pubmedId, doi, authors, title, journal, year, issue. For cross-study publication analysis (e.g. 'top journals'), use search_studies(source_fields=['pubmed.journal']) in bulk instead of looping this per study — see immport://search-fields file: Study document files (case report forms, data dictionaries, protocols): studyFileAccession, studyFileType, description, fileName. NOT for downloadable result files — use files tool for those json_ld: JSON-LD (schema.org Dataset) structured metadata: title, abstract, DOI, creators, funders, health conditions, measurement techniques, citations, data access conditions links: External links: studyLinkId, name, type, value (URL) experiments: Experiments (assay runs): experimentAccession, name, description, measurementTechnique adverse_events: Adverse events: adverseEventAccession, subjectAccession, namePreferred, severityPreferred, outcomePreferred, causality, organOrBodySystemPreferred, startStudyDay, endStudyDay demographic: ⚠️ LARGE — Subject demographics (one row per subject): subjectAccession, armAccession, armName, ageEvent, ageUnit, minSubjectAge, maxSubjectAge, gender (=sex field), race, ethnicity, ancestral_population, species, strain, subjectLocation. For deep analysis use Tab.zip (subject.txt) instead. (⚠️ may be large) biosample: ⚠️ LARGE — Subject→biosample: subjectAccession, biosampleAccession, biosampleName, type, subtype, plannedVisitAccession. For deep analysis use Tab.zip (biosample.txt) instead. (⚠️ may be large) expsample_mapping: ⚠️ LARGE — Full Subject→BioSample→Experiment→ExpSample hierarchy. Prefer get_assay_results for assay data, or Tab.zip (expsample.txt) for the full hierarchy. (⚠️ may be large) interventions: ⚠️ LARGE — Subject-level interventions: compoundNameReported, compoundRole, dose, doseUnits, routeOfAdminPreferred, startDay, endDay, status. For deep analysis use Tab.zip (treatment.txt) instead. (⚠️ may be large) lab_tests: ⚠️ LARGE — Clinical lab test results (CBC, BMP etc): labTestPanelNamePreferred, labTestNamePreferred, resultValuePreferred, resultUnitPreferred, plannedVisitAccession. For deep analysis use Tab.zip or get_assay_results(assay_type='lab_test') instead. (⚠️ may be large) assessment: ⚠️ LARGE — Questionnaires/clinical assessments: assessmentComponentNamePreferred, resultValuePreferred, resultValueCategory, verbatimQuestion, studyDay. For deep analysis use Tab.zip (assessment_component.txt) instead. (⚠️ may be large) immune_exposure: ⚠️ LARGE — Vaccinations/infections/challenges: exposureMaterialPreferred, exposureProcessPreferred, diseasePreferred, diseaseStagePreferred. For deep analysis use Tab.zip (immune_exposure.txt) instead. (⚠️ may be large)

Inputs: resource (required), study_accession (required). Returns: result

get_study_data_availabilityGet Study Data AvailabilityA

Get a record-count inventory for every ImmPort data category in a study — how many rows have been parsed out of the raw data and stored in the ImmPort database.

⚡ CALL THIS FIRST when assessing what data a study contains. It reads the study's ~5 KB release file listing every ImmPort data category alongside its record count for this specific study.

MULTIPLE STUDIES: study_accession may list up to 20 studies separated by commas (e.g. 'SDY180,SDY212') — one call instead of one per study; the result is then a list with one entry per study, in the order given.

USE THIS TO AVOID WASTED API CALLS: • elisa_result=0 → skip get_assay_results(assay_type='elisa') • hai_result=240 → study has HAI titer data worth fetching • lab_test=0 → no clinical lab data, don't call get_study_data(resource='lab_tests') • assessment_component=98893 → very large dataset, use Tab.zip instead of the API • immune_exposure=0 → no vaccination/challenge records • fcs_analyzed_result=0 but expsample=500 → raw FCS files exist but no gated data

⚠️ IMPORTANT LIMITATION — PARSED DATA ONLY: These counts reflect only data that ImmPort has parsed and loaded into its relational database. Many studies — especially older studies, recently submitted data, and studies with non-standard formats — contain data exclusively inside their study files that has not been parsed into the database. A count of 0 does NOT mean the data doesn't exist; it means it hasn't been extracted into the ImmPort data model yet.

When counts are low or zero for a study you expect to have data:

  1. Call get_study_files(action='manifest', study_accession=...) with no file_type filter to see all available files.

  2. Stream individual study_file or protocol_file documents (action='stream') — protocols, case report forms, and data dictionaries often describe data that was submitted but not parsed.

  3. Get a signed URL for the Tab.zip (file_type='release_file' → find '_Tab.zip' → action='download') — it contains the complete set of parsed TSV files and is often more complete than the API responses.

Returns (one study): {'studyAccession': 'SDY####', 'dataRelease': 'DR##', 'tables': {category_name: record_count, ...}}; a study without the release file gets {'studyAccession', 'error'} instead. Several studies: a list of these.

Zero-count categories ARE included — 0 means not parsed into the database, not necessarily absent from the study. Requires authentication.

Inputs: study_accession (required). Returns: result

get_study_filesGet Study FilesA

Access ImmPort study files, protocol documents, and result files — list, stream, or download.

action='manifest' — list all files for a study. Required: study_accession (one, or up to 20 separated by commas, e.g. 'SDY1,SDY269'; each record carries studyAccession) Optional: file_type filter — one of: study_file supplemental study documents protocol_file protocol documents result_file individual assay result files (FCS, CEL, txt, gz, etc.) release_file current DR package: Tab zip, MySQL zip, summary, manifest, subject-to-result mapping files archive_file older DR versions as SDY##-DR{n}.zip (Tab + MySQL, no raw files) zip_file SDY##_DR##_ALL_DATA.zip — ALL metadata + ALL raw result files; can be very large (some studies >100 GB); check filesizeBytes first Returns: list of records with fileUUID, fileName, fileType, filesizeBytes, path. Common patterns: Latest Tab metadata zip: file_type='release_file' → find fileName ending '_Tab.zip' Full data + raw files: file_type='zip_file' → SDY##_DR##_ALL_DATA.zip Older DR versions: file_type='archive_file' → SDY##-DR{n}.zip (Tab nested inside)

💡 SPARSE DATA: Many ImmPort studies — particularly older studies and recently released data — have minimal parsed data in the database. The full study detail (protocol design, subject demographics, assay methodology, investigator notes) is often only available in the study files. When get_study_data returns limited results, call manifest with NO file_type filter to see all available files, then: • stream individual study_file / protocol_file documents (plain text / TSV) using action='stream' for inline AI analysis • provide the signed URL for the _Tab.zip (release_file) which contains every study metadata table as a TSV — complete structured data action='download' — get a signed CloudFront URL for a file. Required: file_uuid (fileUUID from manifest) Returns: {'url': ''} ⛔ DO NOT fetch or open this URL yourself — you are running in a sandbox with no network access to CloudFront/S3 and the request will fail. ONLY present the URL to the user so they can download it in their browser or with curl/wget. Your job is done once you return the URL. Use for: zip files, large binaries, any file the user wants to fetch themselves.

action='stream' — fetch file content inline for AI analysis. Required: file_uuid (fileUUID from manifest) Optional: max_bytes (default 2 MB) Returns: {'content': ''} for text/CSV/TSV/JSON files, {'content_base64': '...'} for binary files. ⚠️ Do NOT stream zip files — they are binary and will be truncated uselessly. Use action='download' for any zip file.

⚠️ ImmPort enforces a per-file daily download limit — avoid redundant calls.

Examples: get_study_files('manifest', study_accession='SDY61', file_type='release_file') get_study_files('download', file_uuid='97a310f6-405d-45c9-8ce9-75f7ccac4ffb') get_study_files('stream', file_uuid='325b0667-59d8-4838-8bd7-5b0a5840a3e6')

Inputs: action (required), file_type, file_uuid, max_bytes, +1 more. Returns: result

lookup_controlled_vocabularyLookup Controlled VocabularyA

Get valid controlled vocabulary values for any ImmPort lookup table. Results are served from an in-memory cache (pre-fetched at startup, refreshed every 24 hours) — no API call is made at query time.

Available tables: lkRace: Race values used in subject demographic data lkEthnicity: Ethnicity values used in subject demographic data lkSpecies: Species values (e.g. Homo sapiens, Mus musculus) lkSubjectLocation: Subject location values used in studies lkAncestralPopulation: Ancestral population values used in subject data lkSex: Sex values (e.g. Female, Male, Not Specified) lkAgeEvent: Age event values (e.g. Age at enrollment) lkDisease: Disease/condition names with disease ontology IDs lkDiseaseStage: Disease stage values lkResearchFocus: Research focus areas (e.g. Vaccine Response, Allergy) lkSampleType: Biosample types (e.g. PBMC, Whole Blood, Serum) lkSourceType: Source types (e.g. File, Public Repository) lkExpMeasurementTech: Measurement techniques (e.g. Flow Cytometry, ELISA, RNA sequencing) lkExpsampleResultSchema: Experiment sample result schema values (e.g. PUBLIC REPOSITORY) lkReagentType: Reagent types used in experiment metadata lkPlateType: Plate types used in experiment/assay metadata lkAnalyte: Analyte reference: gene symbols, gene IDs, UniProt entries, protein ontology IDs, immunology symbols lkProteinName: Protein names with UniProt IDs lkHmdb: HMDB metabolite entries used in metabolomics data lkLocusName: HLA locus names (e.g. HLA-A, HLA-B, HLA-DRB1) lkCellPopulation: Cell populations that appear in flow cytometry (FCS) response data lkCellPopulationMarker: Cell population marker values used in flow cytometry panel metadata lkStudyPanel: Study panel values used in study categorization lkStudyFileType: Study file types (e.g. study_file, protocol, result) lkPublicRepository: Public repository names (e.g. GEO, SRA, ArrayExpress) lkDataCompleteness: Data completeness level descriptions lkVisibilityCategory: Visibility category values lkPersonnelRole: Personnel roles (e.g. Principal Investigator, Co-Investigator) lkUserRoleType: User role types used in system access control lkOrganization: Organization names used in study personnel data lkTimeUnit: Time units (e.g. Days, Hours, Weeks) lkT0Event: T0 event values (study time zero reference events) lkUnitOfMeasure: Units of measure used across all result types lkAdverseEventSeverity: Adverse event severity values (e.g. Grade 1 Mild, Grade 2 Moderate) lkCompoundRole: Compound/intervention roles (e.g. Vaccine, Adjuvant) lkCriterionCategory: Criterion categories used in study eligibility criteria lkExposureProcess: Exposure process values used in immunization/exposure data lkExposureMaterial: Exposure materials (e.g. vaccine names, pathogens) lkVirusStrain: Virus strains with taxonomy IDs used in HAI/neutralization assays lkTranscriptType: Transcript types (e.g. mRNA, microRNA) lkLabTestPanelName: Lab test panel names (e.g. CBC, BMP) — response field only, not filterable lkLabTestName: Lab test names with CDISC codes — response field only, not filterable lkMassSpectrometryType: Mass spectrometry types used in proteomics/metabolomics metadata lkFileDetail: File detail types used in study file metadata lkProtocolType: Protocol types (e.g. Informed Consent, Lab Test)

Inputs: table (required).

search_studiesSearch StudiesA

Full-text and faceted search across all ImmPort studies. Returns a compact shape: {total, returned, studies, facets}. 'studies' is a flat list of study records (no OpenSearch envelope/score/highlight noise). 'facets' is omitted unless you pass the facets parameter. Use this as the entry point for any study discovery workflow. No authentication required.

Key parameters:

  • term: partial matching by default ('flu' finds 'influenza'); use quotes for exact phrase (e.g. '"influenza vaccine"')

  • research_focus: e.g. 'Vaccine Response', 'Allergy', 'Autoimmune' (use lookup_research_focus() for valid values)

  • condition_or_disease: disease/condition name, e.g. 'Influenza', 'Atopic Dermatitis' (use lookup_disease() for valid values)

  • program_name: NIH program name, e.g. 'HIPC', 'ITN', 'SeroNet'

  • clinical_trial: 'Y' or 'N' to filter to clinical trials only

  • species: e.g. 'Homo sapiens', 'Mus musculus' (use lookup_controlled_vocabulary('lkSpecies'))

  • sex: 'Female', 'Male', 'Unknown' (use lookup_controlled_vocabulary('lkSex'))

  • race: e.g. 'White', 'Black or African American' (use lookup_controlled_vocabulary('lkRace'))

  • ethnicity: e.g. 'Hispanic or Latino' (use lookup_controlled_vocabulary('lkEthnicity'))

  • min_age: minimum subject age filter (numeric)

  • age_range: age range string filter

  • assay_method: measurement technique, e.g. 'Flow Cytometry', 'ELISA', 'RNA sequencing' (use lookup_controlled_vocabulary('lkExpMeasurementTech'))

  • biosample_type: e.g. 'PBMC', 'Whole Blood', 'Serum' (use lookup_controlled_vocabulary('lkSampleType'))

  • has_assessment: 'Y' or 'N'

  • has_lab_test: 'Y' or 'N'

  • study_accession: filter by specific study IDs, e.g. ['SDY1', 'SDY2']

  • subject_accession: filter by specific subject IDs, e.g. ['SUB00240']

  • facets: list of facet names to compute, e.g. ['assay_method', 'condition_or_disease']. Omit this (default) for discovery/lookup queries — no aggregations are computed, which keeps responses small and fast. Only request facets when the question is about distribution/breakdown (e.g. 'what assay types exist across these studies?'), not when you just need the matching studies themselves. Valid names: gender, race, ethnicity, species, clinical_trial, condition_or_disease, research_focus, assay_method, program_name, biosample_type, has_lab_test, has_assessment, age. Each returned facet is {value: count} for up to facet_limit non-zero values, with any remainder folded into 'other' (note: 'other' is a doc count, not a list of hidden values — if it's non-trivial and you need the actual long-tail categories, raise facet_limit rather than guessing). study_accession/subject_accession are never returned as facets since they'd just duplicate the 'studies' list.

  • facet_limit: max buckets returned per facet (default 15). Raise this (e.g. 50, 100) when the 'other' bucket is large and you actually need the long-tail breakdown rather than just the top values — e.g. 'list every condition_or_disease in these results', not just the most common ones. Values ≤ 15 use the backend's cheapest pre-capped response; higher values cost more (the backend returns its full, still zero-count-trimmed, aggregation and the cap is applied here instead).

  • sort_field: field to sort by. Valid values: study_accession_number (numeric — use desc for most recently added studies), study_accession (string sort only — do NOT use for recency), latest_data_release_date (date — use desc for most recently updated studies), latest_data_release_version_number (numeric release version, use desc for latest), initial_data_release_date (date — use desc for newest additions), initial_data_release_version_number (numeric), brief_title, min_age, max_age, condition_or_disease, research_focus, species, study_pi, actual_enrollment, planned_visit_total_count, shared_subject_count

  • sort_field_direction: 'asc' (default) or 'desc'

  • search_fields: limit text search to specific fields (comma-separated)

  • source_fields: list of fields to return (e.g. ['study_accession', 'brief_title']). Common fields: study_accession, brief_title, brief_description, condition_or_disease, research_focus, species, study_pi, program_name, clinical_trial, assay_method, biosample_type, doi, pubmed_id. For the FULL field list — including nested objects like pubmed (journal, year, doi), reagent, experiment, personnel, cde — dot-path projection syntax (e.g. 'pubmed.journal'), fields that exist but can't be retrieved, and known data-quality caveats, see the immport://search-fields resource. '*' does NOT work as a wildcard for 'all fields' — it returns an empty object. Restrict to only fields you need to reduce response size.

  • from_record: zero-based pagination offset (default 0)

  • page_size: max records per page (default 10, hard cap 10000)

  • include_score: adds a 'relevance_score' field to each study (default False). Results are always returned in relevance order regardless of this flag — only use this when you need the actual numeric score (e.g. to judge whether low-ranked hits are only tangentially related).

  • include_highlights: adds a 'highlights' field to each study showing which text snippets matched term, e.g. distinguishing 'adjuvant vaccine' from 'adjuvant chemotherapy' (default False). Only meaningful when term is set; ignored otherwise. Not available on search_subjects (backend limitation).

EFFICIENCY TIPS:

  • Cross-study questions (e.g. 'top journals', 'which studies used X'): use ONE call with page_size covering the full result set and narrow source_fields — do not loop get_study_data per study. See immport://query-tips for a worked example.

  • source_fields: Always specify only the fields you need — omitting this returns full OpenSearch documents and produces very large responses.

  • Sizing page_size: each row costs ~2,500 chars with full documents (no source_fields) vs. ~150 chars when source_fields is restricted to 2-3 fields. To fetch many results in one call instead of paginating, restrict source_fields first, then raise page_size (e.g. page_size=1000 with 2-3 source_fields is ~125KB; the same page_size with full documents would be ~2.5MB and likely exceed the response size limit). Don't raise page_size much past 50 unless source_fields is restricted.

  • Pagination: Always check the top-level 'total' field. If total > page_size, issue additional calls incrementing from_record by page_size until all results are fetched.

  • Parallel lookups: lookup_controlled_vocabulary is served from in-memory cache with no API cost — issue lookup calls in parallel with this search, not before it.

  • Recency sort: use study_accession_number desc for most recently added; latest_data_release_date desc for most recently updated. Do NOT use study_accession for recency — it is a string (SDY10 sorts before SDY9).

Inputs: sex, race, term, facets, +23 more. Returns: object

search_subjectsSearch SubjectsA

Full-text and faceted search across all ImmPort subjects/participants. Returns a compact shape: {total, returned, subjects, facets}. 'subjects' is a flat list of subject records (no OpenSearch envelope/score/highlight noise). 'facets' is omitted unless you pass the facets parameter. Useful for cross-study cohort discovery (e.g. find all female subjects in influenza studies). No authentication required.

Key parameters:

  • term: partial matching by default; use quotes for exact phrase

  • study_accession: filter by specific study IDs, e.g. ['SDY1', 'SDY2']

  • subject_accession: filter by specific subject IDs, e.g. ['SUB00240']

  • research_focus: e.g. 'Vaccine Response', 'Allergy'

  • condition_or_disease: disease/condition name (use lookup_controlled_vocabulary('lkDisease'))

  • program_name: NIH program name, e.g. 'HIPC', 'SeroNet'

  • clinical_trial: 'Y' or 'N'

  • sex: 'Female', 'Male', 'Unknown' (use lookup_controlled_vocabulary('lkSex'))

  • race: e.g. 'White', 'Black or African American' (use lookup_controlled_vocabulary('lkRace'))

  • ethnicity: e.g. 'Hispanic or Latino' (use lookup_controlled_vocabulary('lkEthnicity'))

  • species: e.g. 'Homo sapiens', 'Mus musculus' (use lookup_controlled_vocabulary('lkSpecies'))

  • min_age: minimum subject age (numeric)

  • age_range: age range string filter

  • assay_method: measurement technique, e.g. 'Flow Cytometry', 'ELISA' (use lookup_controlled_vocabulary('lkExpMeasurementTech'))

  • biosample_type: e.g. 'PBMC', 'Whole Blood' (use lookup_controlled_vocabulary('lkSampleType'))

  • has_assessment: 'Y' or 'N'

  • has_lab_test: 'Y' or 'N'

  • facets: list of facet names to compute, e.g. ['assay_method', 'condition_or_disease']. Omit this (default) for discovery/lookup queries — no aggregations are computed, which keeps responses small and fast. Only request facets when the question is about distribution/breakdown, not when you just need the matching subjects themselves. Valid names: gender, race, ethnicity, species, clinical_trial, condition_or_disease, research_focus, assay_method, program_name, biosample_type, has_lab_test, has_assessment, age. Each returned facet is {value: count} for up to facet_limit non-zero values, with any remainder folded into 'other' (a doc count, not a list of hidden values — raise facet_limit if you need the actual long-tail categories). study_accession/subject_accession are never returned as facets since they'd just duplicate the 'subjects' list.

  • facet_limit: max buckets returned per facet (default 15). Raise this (e.g. 50, 100) when the 'other' bucket is large and you need the long-tail breakdown, not just top values.

  • sort_field: field to sort by. Valid values: subject_accession (string sort), study_accession (string sort), assay_method, biosample_type, clinical_trial, condition_or_disease, ethnicity, sex, has_assessment, has_lab_test, min_age, race, research_focus, species

  • sort_field_direction: 'asc' (default) or 'desc'

  • search_fields: limit text search to specific fields

  • source_fields: list of fields to return (e.g. ['study_accession', 'subject_accession']). Common fields: study_accession, subject_accession, condition_or_disease, research_focus, species, sex, race, ethnicity, min_age, max_age, assay_method, biosample_type, clinical_trial. For the FULL field list — including nested objects like pubmed (journal, year, doi), reagent, experiment, cde — dot-path projection syntax (e.g. 'pubmed.journal'), and known data-quality caveats, see the immport://search-fields resource. '*' does NOT work as a wildcard for 'all fields' — it returns an empty object. Restrict to only the fields you need to reduce response size.

  • from_record: zero-based pagination offset (default 0)

  • page_size: max records per page (default 10, hard cap 10000)

  • include_score: adds a 'relevance_score' field to each subject (default False). Results are always returned in relevance order regardless of this flag.

EFFICIENCY TIPS:

  • Cross-study questions (e.g. 'which subjects had assay X'): use ONE call with page_size covering the full result set and narrow source_fields — do not loop get_study_data per study. See immport://query-tips for a worked example.

  • source_fields: Always specify only the fields you need — omitting this returns full OpenSearch documents and produces very large responses.

  • Sizing page_size: each row costs ~2,500 chars with full documents (no source_fields) vs. ~150 chars when source_fields is restricted to 2-3 fields. To fetch many results in one call instead of paginating, restrict source_fields first, then raise page_size (e.g. page_size=1000 with 2-3 source_fields is ~125KB; the same page_size with full documents would be ~2.5MB and likely exceed the response size limit). Don't raise page_size much past 50 unless source_fields is restricted.

  • Pagination: Always check the top-level 'total' field. If total > page_size, issue additional calls incrementing from_record by page_size until all results are fetched.

  • Parallel lookups: lookup_controlled_vocabulary is served from in-memory cache with no API cost — issue lookup calls in parallel with this search, not before it.

Inputs: sex, race, term, facets, +22 more. Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.5/5.0

    Scored across 9 tools

    Disambiguation4/5

    Most tools have clearly distinct targets: study search vs. subject search, metadata retrieval vs. assay results, availability counts vs. actual data, and file access vs. data-model introspection. However, get_study_data is a large multi-resource tool that overlaps somewhat with get_assay_results and get_study_files, and search_studies references nonexistent lookup_research_focus/lookup_disease tools, which slightly muddies tool selection.

    Naming Consistency5/5

    All tool names use consistent snake_case with predictable verb_noun patterns (search_studies, get_study_data, lookup_controlled_vocabulary). The get_/search_/lookup_ prefixes map cleanly to retrieval actions, and no mixed camelCase or vague names appear.

    Tool Count5/5

    Nine tools is well-scoped for an ImmPort data-access server. The set consolidates many resources and lookup tables behind parameterized tools rather than exploding into dozens of near-duplicate endpoints.

    Completeness5/5

    The surface covers the full read-only workflow: controlled vocabulary lookup, study and subject discovery, data availability, study metadata subresources, assay results, release history, data-model inspection, and study file access. There are no obvious dead ends for the stated ImmPort retrieval domain.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to search and access clinical trial data from ClinicalTrials.gov, including searching trials by keywords, retrieving detailed trial metadata by NCT ID, and managing trial data in CSV format for research and analysis.
      18
      -
    • F
      license
      Not graded
      quality
      D
      maintenance
      Provides programmatic access to the NIH Reporter API for searching and retrieving detailed information on NIH-funded research projects, grants, and investigators. It enables AI assistants to query project abstracts, funding amounts, and organization details through natural language.
      -
    • A
      license
      A
      quality
      C
      maintenance
      Exposes CDISC standards data including SDTM, ADaM, CDASH, and Controlled Terminology as tools for AI assistants via the CDISC Library API. It enables users to search standards, retrieve domain variables, and access codelist definitions to facilitate clinical research data management.
      12
      MIT