The full upstream README, mirrored here for reference. Install config, tool schemas, adoption signals, and an original overview live on the Uniprot MCP Server listing page.
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.
Public Hosted Server: https://uniprot.caseyjhand.com/mcp
Six tools for protein-first research over UniProt — discovery search is the entry point, uniprot_map_ids is the bridge that turns any sibling identifier into a UniProtKB accession, and the rest fetch curated records, proteomes, taxonomy, and sequences:
| Tool | Description |
|---|---|
uniprot_search_proteins | Search UniProtKB by plain text or a Lucene field query, with the reviewed (Swiss-Prot) filter foregrounded and optional server-side facet counts. Cursor-paginated. The discovery entry point. |
uniprot_get_entry | Fetch full curated entries by accession in one batch (up to 20) — function, catalytic activity, disease, variants, isoforms, GO terms, cross-references. Partial-success output; an oversized record returns a section outline. |
uniprot_map_ids | Translate identifiers across databases via UniProt's async ID-mapping service — gene names, Ensembl, RefSeq, ChEMBL, PDB, GeneID ↔ UniProtKB accessions. Polls within a budget; running jobs return a ticket and completed pages return a continuation. |
uniprot_get_proteome | Fetch a reference proteome by UPID or NCBI taxon ID — protein count, BUSCO completeness, genome assembly inline, plus an opt-in capped page of the proteins. |
uniprot_get_taxonomy | Resolve a taxonomy record by NCBI taxon ID or scientific name — name, rank, parent, full lineage, and optionally the immediate children. |
uniprot_get_sequence | Fetch the canonical amino-acid sequence (FASTA) for an accession, with length and parsed header — and optionally the isoform sequences. The cheap sequence-only path. |
uniprot_search_proteinsSearch UniProtKB and return curated protein records — the discovery entry point.
text_search for plain language (the 80% case) or query for full Lucene field syntax (gene, organism_id, keyword, go, reviewed, protein_name, family, length, existence, accession) — exactly onereviewed defaults to true (Swiss-Prot only) so the agent isn't drowned in TrEMBL predictions; set false to include themorganism_id convenience filter ANDed onto the queryfacets for server-side count breakdowns (e.g. reviewed, model_organism)totalResults and the effective query echoed backreviewed, annotationScore, and proteinExistence so curation quality is weighableuniprot_get_entryFetch full curated UniProtKB entries by accession in batch — this tool does not search.
succeeded[], unknown/withdrawn ones in failed[]; the whole batch never aborts on one bad accessionfields trims the upstream projection; identity and provenance fields are always retainedkind: "outline" (a section listing) instead of overflowing context — re-call the same accession with sections: [...] to pull only what's neededuniprot_search_proteins or uniprot_map_ids; strip any -N isoform suffix firstuniprot_map_idsTranslate identifiers across databases via UniProt's ID-mapping service — the bridge from any sibling server's identifier into a UniProtKB accession.
from_db / to_db are validated enums (e.g. Gene_Name, Ensembl, RefSeq_Protein, ChEMBL, PDB, GeneID, UniProtKB_AC-ID) so an unsupported pair fails before the upstream callUniProtKB-Swiss-Prot for reviewed accessions only (the usual intent), or UniProtKB / UniProtKB_AC-ID to include unreviewed TrEMBLstatus: "running" with a ticket — pass that ticket alone to poll the same jobstatus: "finished" with one upstream page (up to 500 mappings). If continuation is present, pass it alone to fetch the next completed page without polling or re-submitting; its absence marks the terminal pagefrom_db with tax_id to disambiguate speciesunmappedIds is populated only from UniProt's failedIds, so identifiers UniProt normalizes in successful result rows are not misclassified as failuresuniprot_get_proteomeFetch the reference proteome for an organism by UPID or NCBI taxon ID — provide exactly one.
include_proteins (it is large — human is ~147,506) and returns a capped page with a forward cursor and truncation disclosurequery filter (UniProtKB Lucene syntax) for a subsetuniprot_get_taxonomyuniprot_get_taxonomyResolve a taxonomy record by NCBI taxon ID or scientific name — provide exactly one.
include_children fetches the immediate child taxa via a follow-up search (not inline on the record)uniprot_search_proteins (organism_id) and uniprot_get_proteome (taxon_id) expectuniprot_get_sequenceFetch the canonical amino-acid sequence (FASTA) for an accession — the cheap, sequence-only path (for the full functional record use uniprot_get_entry).
include_isoforms also returns the alternatively-spliced isoform sequencesuniprot_search_proteins or uniprot_map_ids; strip any -N isoform suffix first| Type | Name | Description |
|---|---|---|
| Resource | uniprot://entry/{accession} | A curated UniProtKB entry by accession — the resource mirror of uniprot_get_entry for a single accession. |
| Resource | uniprot://taxonomy/{taxonId} | A taxonomy record by NCBI taxon ID — name, rank, parent, full lineage. The mirror of uniprot_get_taxonomy by ID. |
| Prompt | uniprot_protein_dossier | Guided protein-research workflow — resolve an identifier, fetch the curated entry, pull disease and variants, and surface cross-references for structure, citations, and bioactivity. |
All resource data is also reachable via tools — tool-only clients lose nothing. UniProtKB is far too large to enumerate, so there is no resource list(); discovery is uniprot_search_proteins's job.
Built on @cyanheads/mcp-ts-core:
none, jwt, oauthin-memory, filesystem, Supabase, Cloudflare KV/R2/D1UniProt-specific:
rest.uniprot.org-compatible base (override UNIPROT_BASE_URL for a private mirror)fetch client over all four REST collections (UniProtKB, ID Mapping, Proteomes, Taxonomy) with retry/backoff and HTML-error-page detectionAgent-friendly output:
reviewed, annotationScore, proteinExistence, and per-field PubMed/ECO evidence ship on every record so the agent can weigh manual vs. predicted annotationuniprot_get_entry returns per-accession succeeded[] / failed[] rows instead of aborting the batchuniprot_get_entry returns kind: "full" | "outline", while uniprot_map_ids separates a running-job ticket from a finished-page continuation; callers branch on data, not string parsingA public instance is available at https://uniprot.caseyjhand.com/mcp — no installation required. Point any MCP client at it via Streamable HTTP:
Add the following to your MCP client configuration file. UniProt REST is keyless — no API key required.
Or with npx (no Bun required):
Or with Docker:
For Streamable HTTP, set the transport and start the server:
All configuration is validated at startup via Zod schemas in src/config/server-config.ts. UniProt REST is keyless, so every server-specific variable below is an optional override.
| Variable | Description | Default |
|---|---|---|
UNIPROT_BASE_URL | UniProt REST base URL. Override for a private mirror or testing. | https://rest.uniprot.org |
UNIPROT_TIMEOUT_MS | Per-request HTTP timeout in ms. | 30000 |
UNIPROT_ID_MAPPING_BUDGET_MS | Wall-clock budget for the inline ID-mapping poll loop before returning a resumable ticket. Must be less than UNIPROT_TIMEOUT_MS. | 8000 |
UNIPROT_DEFAULT_PAGE_SIZE | Default page size for search and proteome protein listing when the caller leaves it unset. | 25 |
MCP_TRANSPORT_TYPE | Transport: stdio or http. | stdio |
MCP_HTTP_PORT | Port for HTTP server. | 3010 |
MCP_AUTH_MODE | Auth mode: none, jwt, or oauth. | none |
MCP_LOG_LEVEL | Log level (RFC 5424). | info |
LOGS_DIR | Directory for log files (Node.js only). | <project-root>/logs |
STORAGE_PROVIDER_TYPE | Storage backend. | in-memory |
OTEL_ENABLED | Enable OpenTelemetry instrumentation (spans, metrics, completion logs). | false |
See .env.example for the full list of optional overrides.
Build and run:
Run checks and tests:
The Dockerfile defaults to HTTP transport, stateless session mode, and logs to /var/log/uniprot-mcp-server. OpenTelemetry peer dependencies are installed by default — build with --build-arg OTEL_ENABLED=false to omit them.
| Directory | Purpose |
|---|---|
src/index.ts | createApp() entry point — registers tools/resources/prompts and inits the UniProt service. |
src/config | Server-specific environment variable parsing and validation with Zod. |
src/mcp-server/tools | Tool definitions (*.tool.ts). Six tools over UniProtKB, ID mapping, proteomes, taxonomy, and sequences. |
src/mcp-server/resources | Resource definitions (*.resource.ts). Entry and taxonomy by-ID mirrors. |
src/mcp-server/prompts | Prompt definitions (*.prompt.ts). The protein-dossier workflow prompt. |
src/services/uniprot | The rest.uniprot.org REST client — search, batch entries, ID mapping, proteomes, taxonomy, FASTA — plus normalized domain types. |
tests/ | Unit and integration tests mirroring src/. |
See CLAUDE.md (and the byte-identical AGENTS.md) for development guidelines and architectural rules. The short version:
try/catch in tool logicctx.log for request-scoped logging, ctx.state for tenant-scoped storagecreateApp() arraysIssues and pull requests are welcome. Run checks and tests before submitting:
Apache-2.0 — see LICENSE for details.