Skip to main content
Glama

uniprot-mcp-server: search proteins

uniprot_search_proteins
Read-onlyIdempotent

Search 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 search both tiers together (for TrEMBL only, put reviewed:false in query). The organism_id and reviewed filters apply to the whole query. Request facets (e.g. reviewed, model_organism) for server-side count breakdowns. Results page forward with an opaque cursor; UniProtKB has no offset paging. An inactive accession the query matches (merged, demerged, or deleted) comes back in inactive[] with the accessions that replace it, never as a result. This is the discovery entry point — chain results[].accession into uniprot_get_entry for full records, or uniprot_get_sequence for FASTA.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sizeNoNumber of hits per page (max 500). Omit for the server default.
queryNoUniProtKB 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.
cursorNoOpaque forward cursor from this tool for the same exact effective query and filters. Size, fields, and facets may change. Older raw cursors are rejected; restart without cursor. Random access to page N is not supported.
facetsNoComma-separated upstream facet names for count breakdowns, e.g. "reviewed,model_organism,proteins_with". Returns a facets array alongside the hits.
fieldsNoComma-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.
reviewedNoRestrict to reviewed Swiss-Prot entries. Defaults to true (curated only). false applies no tier filter, returning reviewed and unreviewed TrEMBL entries together; for TrEMBL only, put reviewed:false in query. Ignored when query or text_search already contains a reviewed: clause.
organism_idNoRestrict to an NCBI taxon ID, e.g. 9606 for human. A convenience filter ANDed onto the whole query; resolve names with uniprot_get_taxonomy.
text_searchNoPlain-language search across protein names, gene names, and function, e.g. "kinase apoptosis". Provide this OR query, not both.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNoPresent when the call failed. Absent on success.
cursorNoForward cursor for the next page. Absent on the last page.
facetsNoUpstream facet count breakdowns. Present only when facets were requested.
noticeNoGuidance when nothing matched — echoes the query and suggests how to broaden.
resultsNoMatching active protein hits for this page. Inactive accessions are in inactive.
inactiveNoMatching accessions that are inactive in UniProtKB (merged, demerged, or deleted) — not proteins to read, but pointers to the accessions that replace them. Present only when the page held any.
totalResultsNoTotal matches for the query before pagination (from the upstream result count), inactive accessions included.
effectiveQueryNoThe query as the server assembled and sent it to UniProtKB.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / cursor / description
      Previous value: -"Opaque forward-pagination cursor from a prior response. Walk pages with this; random access to page N is not supported."New value: +"Opaque forward cursor from this tool for the same exact effective query and filters. Size, fields, and facets may change. Older raw cursors are rejected; restart without cursor. Random access to page N is not supported."
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `missing_query`: Neither text_search nor query was provided. `conflicting_query`: Both text_search and query were provided. `invalid_query`: The query or text_search has unbalanced parentheses (rejected before any request), or UniProtKB rejected the query, text_search, fields, or facets value — the message names the rejected value. `invalid_cursor`: UniProt could not continue from the cursor (it answered HTTP 500) — the cursor is malformed or truncated. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `missing_query`: Neither text_search nor query was provided. `conflicting_query`: Both text_search and query were provided. `invalid_query`: The query or text_search has unbalanced parentheses (rejected before any request), or UniProtKB rejected the query, text_search, fields, or facets value — the message names the rejected value. `invalid_cursor`: The cursor is malformed, from an older version, belongs to another tool or effective query, or UniProt could not continue from it (HTTP 500). Other values are possible when a failure originates below the handler."
  2. Changed7 schema fields changed
    • changedInput schema / properties / organism_id / description
      Previous value: -"Restrict to an NCBI taxon ID, e.g. 9606 for human. A convenience filter ANDed onto the query; resolve names with uniprot_get_taxonomy."New value: +"Restrict to an NCBI taxon ID, e.g. 9606 for human. A convenience filter ANDed onto the whole query; resolve names with uniprot_get_taxonomy."
    • changedInput schema / properties / reviewed / description
      Previous value: -"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."New value: +"Restrict to reviewed Swiss-Prot entries. Defaults to true (curated only). false applies no tier filter, returning reviewed and unreviewed TrEMBL entries together; for TrEMBL only, put reviewed:false in query. Ignored when query or text_search already contains a reviewed: clause."
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `missing_query`: Neither text_search nor query was provided. `conflicting_query`: Both text_search and query were provided. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `missing_query`: Neither text_search nor query was provided. `conflicting_query`: Both text_search and query were provided. `invalid_query`: The query or text_search has unbalanced parentheses (rejected before any request), or UniProtKB rejected the query, text_search, fields, or facets value — the message names the rejected value. `invalid_cursor`: UniProt could not continue from the cursor (it answered HTTP 500) — the cursor is malformed or truncated. Other values are possible when a failure originates below the handler."
    • changedOutput schema / properties / error / properties / data / properties / reason / examples
      Previous value: -[
      -  "missing_query",
      -  "conflicting_query"
      -]New value: +[
      +  "missing_query",
      +  "conflicting_query",
      +  "invalid_query",
      +  "invalid_cursor"
      +]
    • addedOutput schema / properties / inactive
      Added value: +{
      +  "description": "Matching accessions that are inactive in UniProtKB (merged, demerged, or deleted) — not proteins to read, but pointers to the accessions that replace them. Present only when the page held any.",
      +  "items": {
      +    "additionalProperties": false,
      +    "description": "An inactive accession the query matched, with where to go instead.",
      +    "properties": {
      +      "accession": {
      +        "description": "The inactive UniProtKB accession the query matched.",
      +        "type": "string"
      +      },
      +      "deletedReason": {
      +        "description": "Why UniProt deleted the entry, when it says. Present on DELETED only.",
      +        "type": "string"
      +      },
      +      "reason": {
      +        "description": "UniProt inactiveReasonType: MERGED, DEMERGED, or DELETED. Omitted when UniProt names none.",
      +        "type": "string"
      +      },
      +      "replacedBy": {
      +        "description": "Accessions that replace it — the merge target (MERGED) or the demerge products (DEMERGED). Look these up instead.",
      +        "items": {
      +          "description": "A replacement UniProtKB accession.",
      +          "type": "string"
      +        },
      +        "type": "array"
      +      },
      +      "uniParcId": {
      +        "description": "UniParc ID that still holds the sequence, when UniProt gives one.",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "accession"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • changedOutput schema / properties / results / description
      Previous value: -"Matching protein hits for this page."New value: +"Matching active protein hits for this page. Inactive accessions are in inactive."
    • changedOutput schema / properties / totalResults / description
      Previous value: -"Total matches for the query before pagination (from the upstream result count)."New value: +"Total matches for the query before pagination (from the upstream result count), inactive accessions included."
  3. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.