uniprot-mcp-server: search proteins
uniprot_search_proteinsSearch UniProtKB and return curated protein records. Pass text_search for a plain-language query (the 80% case) or query for the full Lucene field syntax (gene:TP53 AND organism_id:9606 AND reviewed:true) — exactly one is required. Reviewed (Swiss-Prot) entries are manually curated; unreviewed (TrEMBL) are computationally predicted and ~30x more numerous, so reviewed defaults to true to avoid drowning in predictions — set it false to include TrEMBL. Request facets (e.g. reviewed, model_organism) for server-side count breakdowns. Results page forward with an opaque cursor; UniProtKB has no offset paging. This is the discovery entry point — chain results[].accession into uniprot_get_entry for full records, or uniprot_get_sequence for FASTA.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| size | No | Number of hits per page (max 500). Omit for the server default. | |
| query | No | UniProtKB Lucene query with field prefixes — gene, organism_id, keyword (KW-xxxx), go (GO id), reviewed, protein_name, family, length, existence, accession. Example: "gene:BRCA1 AND organism_id:9606 AND reviewed:true". Provide this OR text_search, not both. | |
| cursor | No | Opaque forward-pagination cursor from a prior response. Walk pages with this; random access to page N is not supported. | |
| facets | No | Comma-separated upstream facet names for count breakdowns, e.g. "reviewed,model_organism,proteins_with". Returns a facets array alongside the hits. | |
| fields | No | Comma-separated UniProtKB field names to project, e.g. "accession,gene_names,cc_function". Omit for a sensible default set covering name, gene, organism, length, reviewed, score, and a function snippet. | |
| reviewed | No | Restrict to reviewed Swiss-Prot entries. Defaults to true (curated only); set false to include unreviewed TrEMBL. Ignored when query already pins a reviewed: clause. | |
| organism_id | No | Restrict to an NCBI taxon ID, e.g. 9606 for human. A convenience filter ANDed onto the query; resolve names with uniprot_get_taxonomy. | |
| text_search | No | Plain-language search across protein names, gene names, and function, e.g. "kinase apoptosis". Provide this OR query, not both. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | Present when the call failed. Absent on success. | |
| cursor | No | Forward cursor for the next page. Absent on the last page. | |
| facets | No | Upstream facet count breakdowns. Present only when facets were requested. | |
| notice | No | Guidance when nothing matched — echoes the query and suggests how to broaden. | |
| results | No | Matching protein hits for this page. | |
| totalResults | No | Total matches for the query before pagination (from the upstream result count). | |
| effectiveQuery | No | The query as the server assembled and sent it to UniProtKB. |