uniprot-mcp-server

v0.4.0 pre-1.0

Search UniProtKB by protein function, fetch curated records, map IDs across databases, and pull reference proteomes, taxonomy, and sequences via MCP. STDIO or Streamable HTTP.

uniprot.caseyjhand.com/mcp
claude mcp add --transport http uniprot-mcp-server https://uniprot.caseyjhand.com/mcp
codex mcp add uniprot-mcp-server --url https://uniprot.caseyjhand.com/mcp
{
  "mcpServers": {
    "uniprot-mcp-server": {
      "url": "https://uniprot.caseyjhand.com/mcp"
    }
  }
}
gemini mcp add --transport http uniprot-mcp-server https://uniprot.caseyjhand.com/mcp
{
  "mcpServers": {
    "uniprot-mcp-server": {
      "command": "bunx",
      "args": [
        "mcp-remote",
        "https://uniprot.caseyjhand.com/mcp"
      ]
    }
  }
}
{
  "mcpServers": {
    "uniprot-mcp-server": {
      "type": "http",
      "url": "https://uniprot.caseyjhand.com/mcp"
    }
  }
}
curl -X POST https://uniprot.caseyjhand.com/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{},"clientInfo":{"name":"curl","version":"1.0.0"}}}'

Tools

6

uniprot_search_proteins

open-world

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.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "uniprot_search_proteins",
    "arguments": {}
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "text_search": {
      "description": "Plain-language search across protein names, gene names, and function, e.g. \"kinase apoptosis\". Punctuation and uppercase AND/OR/NOT are searched as text, with UniProt tokenization; use query for operators and field syntax. Provide this OR query, not both.",
      "type": "string"
    },
    "query": {
      "description": "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.",
      "type": "string"
    },
    "reviewed": {
      "default": true,
      "description": "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 already contains a reviewed: clause; plain text never overrides this filter.",
      "type": "boolean"
    },
    "organism_id": {
      "description": "Restrict to an NCBI taxon and its descendants, including strains and subspecies, e.g. 9606 for human or 562 for E. coli. Applies taxonomy_id to the whole query; use an explicit organism_id: clause in query for an exact taxon. Resolve names with uniprot_get_taxonomy.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "fields": {
      "description": "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.",
      "type": "string"
    },
    "facets": {
      "description": "Comma-separated upstream facet names for count breakdowns, e.g. \"reviewed,model_organism,proteins_with\". Returns a facets array alongside the hits.",
      "type": "string"
    },
    "size": {
      "description": "Number of hits per page (max 500). Omit for the server default.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 500
    },
    "cursor": {
      "description": "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.",
      "type": "string"
    }
  },
  "required": [
    "reviewed"
  ],
  "additionalProperties": false
}
view source ↗

uniprot_get_entry

open-world

Fetch full curated UniProtKB entries by accession in one batch (up to 20). Each entry carries function, catalytic activity, cofactors, subcellular location, disease involvement, PTMs, natural variants, isoforms, domains, GO terms, keywords, and cross-references. Partial failures do not abort the batch — resolved entries land in succeeded[] and unknown or inactive (merged, demerged, deleted) accessions in failed[], where an inactive accession names its replacement or UniParc ID. Pass fields to trim the upstream projection. Initial responses exceeding 24,000 UTF-8 bytes across both output surfaces return kind: "outline": a single resolved record lists sections with byte sizes; a batch lists outlinedEntries in request order and retains failed[]. Re-call each outlined accession individually, e.g. accessions:["P04637"], for its full record or section outline, then add sections:["disease","variants"] to select sections. sections takes exactly one accession; trim a batch with fields instead. All returned list items and cross-reference IDs render in full. A large list section pages with section_limit/section_offset on a re-call naming that one section. This tool does not search: accessions come from uniprot_search_proteins.results[].accession or uniprot_map_ids. Strip any isoform suffix (P04637-2 to P04637) before calling.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "uniprot_get_entry",
    "arguments": {
      "accessions": "<accessions>"
    }
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "accessions": {
      "minItems": 1,
      "maxItems": 20,
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^(?:[OPQ][0-9][A-Z0-9]{3}[0-9]|[A-NR-Z][0-9](?:[A-Z][A-Z0-9]{2}[0-9]){1,2})$",
        "description": "A UniProtKB primary accession, e.g. \"P04637\". Canonical form only — strip any \"-N\" isoform suffix."
      },
      "description": "Accessions to fetch (1–20). From uniprot_search_proteins or uniprot_map_ids."
    },
    "fields": {
      "description": "Comma-separated UniProtKB field names to project, e.g. \"accession,gene_names,cc_function,ft_variant\". Omit for the full curated default set. Use this on the initial call to trim payload.",
      "type": "string"
    },
    "sections": {
      "description": "Only used to re-call one accession after a kind: \"outline\" response — pass a subset of the outlined section keys to fetch just those sections. Requires exactly one accession: a batch with sections is rejected, so trim a batch with fields. A requested section the record lacks is named in absentSections, not an error. Do not pass on the initial call.",
      "type": "array",
      "items": {
        "type": "string",
        "description": "A section key from a prior outline response, e.g. \"disease\", \"variants\", \"function\", \"xrefs\"."
      }
    },
    "section_limit": {
      "description": "Window size for one list section on a sections re-call: return at most this many items of it (1–500). Requires sections naming exactly one list section, e.g. [\"variants\"] (or ptms, domains, goTerms). Omit together with section_offset to return the whole section.",
      "type": "integer",
      "minimum": 1,
      "maximum": 500
    },
    "section_offset": {
      "description": "Zero-based index of the first item in the windowed section. Defaults to 0. Pass the previous response's nextOffset to page forward. Same requirements as section_limit; set without section_limit, returns every item from this index on.",
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    }
  },
  "required": [
    "accessions"
  ],
  "additionalProperties": false
}
view source ↗

uniprot_map_ids

open-world

Translate identifiers across databases via UniProt's ID-mapping service — gene names to accessions, accession to PDB / Ensembl / RefSeq / ChEMBL / GeneID, and back. The job runs asynchronously; this tool submits it and polls within a budget. A running job returns status "running" with a ticket; pass that ticket alone to poll the same job. A completed call returns status "finished" with one results page; when continuation is present, pass it alone to fetch the next completed page without re-submitting or polling the job. A gene name often maps to one reviewed Swiss-Prot accession plus dozens of unreviewed TrEMBL ones, so target UniProtKB-Swiss-Prot (reviewed only) for the usual intent, or UniProtKB to include TrEMBL. Pair a gene-symbol from_db with tax_id to disambiguate species. A row whose UniProtKB target is inactive (merged, demerged, or deleted) carries an inactive marker naming its replacements. Chain the resulting active accessions into uniprot_get_entry.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "uniprot_map_ids",
    "arguments": {}
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "from_db": {
      "description": "Source database. Gene_Name = gene symbol (e.g. TP53; pair with tax_id); UniProtKB_AC-ID = accession or entry name; Ensembl/Ensembl_Protein = ENSG/ENSP; PDB; RefSeq_Nucleotide/RefSeq_Protein = NM_/NP_; ChEMBL; GeneID = NCBI Gene. Required only when submitting a new mapping job; omitted when resuming with a ticket or continuation.",
      "type": "string",
      "enum": [
        "UniProtKB_AC-ID",
        "Gene_Name",
        "GeneID",
        "Ensembl",
        "Ensembl_Protein",
        "PDB",
        "RefSeq_Nucleotide",
        "RefSeq_Protein",
        "ChEMBL",
        "PomBase",
        "WormBase_Protein"
      ]
    },
    "to_db": {
      "description": "Target database. UniProtKB-Swiss-Prot = reviewed accessions only (the usual intent); UniProtKB also includes unreviewed TrEMBL. Required only when submitting a new mapping job; omitted when resuming with a ticket or continuation.",
      "type": "string",
      "enum": [
        "UniProtKB",
        "UniProtKB-Swiss-Prot",
        "Gene_Name",
        "GeneID",
        "Ensembl",
        "Ensembl_Protein",
        "PDB",
        "RefSeq_Nucleotide",
        "RefSeq_Protein",
        "ChEMBL",
        "PomBase",
        "WormBase_Protein"
      ]
    },
    "ids": {
      "description": "Identifiers to translate. Required only when submitting a new mapping job; omitted when resuming with a ticket or continuation.",
      "maxItems": 100000,
      "type": "array",
      "items": {
        "type": "string",
        "description": "A source identifier in the from_db namespace, e.g. \"TP53\" for Gene_Name."
      }
    },
    "tax_id": {
      "description": "Exact NCBI taxon node for submission, e.g. 9606 for human. Unlike protein search taxonomy filters, this excludes descendant strains and subspecies. Resolve the strain taxon with uniprot_get_taxonomy when needed; no descendant filtering is applied to mapped results.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "ticket": {
      "description": "Running-job ticket from a prior status \"running\" response. Pass it alone to poll that job; do not combine it with continuation or submission inputs.",
      "type": "string",
      "minLength": 1
    },
    "continuation": {
      "description": "Completed-page continuation from a prior status \"finished\" response. Pass it alone to fetch the next page without polling or re-submitting.",
      "type": "object",
      "properties": {
        "jobId": {
          "type": "string",
          "minLength": 1,
          "description": "UniProt ID-mapping job identifier for the completed job."
        },
        "cursor": {
          "type": "string",
          "minLength": 1,
          "description": "Opaque cursor for the next completed results page."
        }
      },
      "required": [
        "jobId",
        "cursor"
      ],
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}
view source ↗

uniprot_get_proteome

open-world

Fetch the reference proteome for an organism by UPID (e.g. "UP000005640") or NCBI taxon ID (e.g. 9606) — provide exactly one. Returns metadata inline: proteome type, total protein count, BUSCO completeness (score, complete/fragmented/missing counts, lineage dataset), and the genome assembly accession. The protein set is opt-in via include_proteins (it is large — human is ~147,506) and returns a capped page with a forward cursor; narrow it with the query filter (UniProtKB Lucene syntax) for a subset. Resolve an organism name to a taxon ID first with uniprot_get_taxonomy.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "uniprot_get_proteome",
    "arguments": {}
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "upid": {
      "description": "Proteome UPID. Provide this OR taxon_id, not both.",
      "anyOf": [
        {
          "type": "string",
          "const": ""
        },
        {
          "type": "string",
          "pattern": "^UP[0-9]{9}$",
          "description": "Proteome identifier, e.g. \"UP000005640\"."
        }
      ]
    },
    "taxon_id": {
      "description": "NCBI taxon ID, e.g. 9606 for human. Prefers an exact reference proteome; otherwise resolves a unique descendant reference, or returns candidate UPIDs and taxon IDs for explicit selection. Provide this OR upid, not both.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "include_proteins": {
      "default": false,
      "description": "When true, also return a capped, cursor-paginated page of the proteome's proteins. Defaults to false — metadata alone is the common case.",
      "type": "boolean"
    },
    "query": {
      "description": "Optional UniProtKB Lucene filter to narrow the protein list, e.g. \"reviewed:true AND keyword:KW-0067\". Only applies when include_proteins is true.",
      "type": "string"
    },
    "size": {
      "description": "Proteins per page when include_proteins is true (max 500). Omit for the server default.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 500
    },
    "cursor": {
      "description": "Opaque cursor from this tool for the same resolved UPID and exact query. Identifier aliases resolving to that UPID and size changes are allowed. Older raw cursors are rejected; restart without cursor. Only meaningful with include_proteins.",
      "type": "string"
    }
  },
  "required": [
    "include_proteins"
  ],
  "additionalProperties": false
}
view source ↗

uniprot_get_taxonomy

open-world

Resolve a taxonomy record by NCBI taxon ID (e.g. 9606) or organism name (e.g. "Homo sapiens" or "human") — provide exactly one. Exact case-insensitive scientific names take priority, then common names, mnemonic and aliases; stray double quotes and backslashes are tolerated after exact matching. Ties and partial matches return candidate taxon IDs instead of guessing. Returns the scientific and common name, mnemonic, rank, parent, and full lineage. Set include_children for immediate child taxa in pages of 100; pass the returned cursor for the next page. Use the resolved taxon ID with uniprot_search_proteins (organism_id) or uniprot_get_proteome (taxon_id).

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "uniprot_get_taxonomy",
    "arguments": {}
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "taxon_id": {
      "description": "NCBI taxonomy ID, e.g. 9606. Provide this OR name, not both.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "name": {
      "description": "Organism name, e.g. \"Homo sapiens\" or \"human\". Exact case-insensitive scientific names take priority, then common names, mnemonic and aliases. Stray double quotes and backslashes are tolerated only after exact matching; ties require taxon_id. Provide this OR taxon_id, not both.",
      "type": "string"
    },
    "include_children": {
      "default": false,
      "description": "When true, also fetch a page of up to 100 immediate child taxa via a follow-up search. Defaults to false.",
      "type": "boolean"
    },
    "cursor": {
      "description": "Forward-pagination cursor from a prior children page, for the next page of the same taxon; a cursor issued for another taxon is rejected. Only meaningful with include_children.",
      "type": "string"
    }
  },
  "required": [
    "include_children"
  ],
  "additionalProperties": false
}
view source ↗

uniprot_get_sequence

open-world

Fetch the canonical amino-acid sequence (FASTA) for a UniProtKB accession, with length and the parsed header. Set include_isoforms to also return the alternatively-spliced isoform sequences. This is the cheap sequence-only path — for the full functional record use uniprot_get_entry. A merged accession returns the sequences of its merge target, labelled with the target accession and the requested one in mergedFrom; a demerged or deleted accession fails not_found naming its replacements or UniParc ID. Accessions come from uniprot_search_proteins or uniprot_map_ids; strip any "-N" isoform suffix (P04637-2 to P04637) before calling.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "uniprot_get_sequence",
    "arguments": {
      "accession": "<accession>"
    }
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "accession": {
      "type": "string",
      "pattern": "^(?:[OPQ][0-9][A-Z0-9]{3}[0-9]|[A-NR-Z][0-9](?:[A-Z][A-Z0-9]{2}[0-9]){1,2})$",
      "description": "UniProtKB primary accession, e.g. \"P04637\". Canonical form only — strip any \"-N\" isoform suffix."
    },
    "include_isoforms": {
      "default": false,
      "description": "When true, also return the isoform sequences. Defaults to false (canonical only).",
      "type": "boolean"
    }
  },
  "required": [
    "accession",
    "include_isoforms"
  ],
  "additionalProperties": false
}
view source ↗

Resources

2

A curated UniProtKB entry by accession — function, catalytic activity, disease, variants, GO terms, and cross-references. The resource mirror of uniprot_get_entry for a single accession. An inactive accession (merged, demerged, or deleted) fails not_found with a message naming its replacement. An annotation-heavy entry over the outline budget returns a bounded identity summary plus a section outline (names + byte sizes) instead of the full record — fetch specific sections with the uniprot_get_entry tool (sections:[...]).

uri uniprot://entry/{accession} mime application/json

A taxonomy record by NCBI taxon ID — scientific/common name, rank, parent, and full lineage. The resource mirror of uniprot_get_taxonomy by ID.

uri uniprot://taxonomy/{taxonId} mime application/json

Prompts

1

Guided protein-research workflow over UniProt — resolve an identifier to a UniProtKB accession, fetch the curated entry, pull disease and variant detail, and surface cross-references for structure, citations, and bioactivity.

  • identifierrequired — A gene name (e.g. "TP53"), UniProtKB accession (e.g. "P04637"), or protein name to research.
  • organism — Optional organism scientific name or NCBI taxon ID to disambiguate (e.g. "Homo sapiens" or "9606").

Extensions

1

io.modelcontextprotocol/skills

{
  "directoryRead": true
}