protein-mcp-server
Allows using Cloudflare KV, R2, and D1 as storage backends for the MCP server.
Supports OpenTelemetry tracing for observability.
Allows using Supabase as a storage backend for the MCP server.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@protein-mcp-serverList SARS-CoV-2 spike protein cryo-EM structures"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Public Hosted Server: https://protein.caseyjhand.com/mcp
Tools
Seven tools spanning the structure-research arc — discover, fetch, find homologs, track ligands, compare, profile the corpus, and annotate — over experimental (PDB) and predicted (AlphaFold) structures from one surface:
Tool | Description |
| Search experimental and predicted structures by free text, sequence, or organism/method/resolution filters, with optional facet breakdowns. |
| Fetch metadata and coordinate-file URLs by ID — experimental (PDB), predicted (AlphaFold), or best-available — with batch partial success and optional coordinate inlining. |
| Find sequence homologs (RCSB mmseqs2) or fold homologs (Foldseek) from a sequence, PDB ID, or UniProt accession. |
| Resolve ligand names/formulas to component IDs, find structures containing a ligand, or map binding-site residues. |
| Structurally align 2–10 structures (TM-align / jFATCAT) to a reference or as a full pairwise matrix. |
| Profile the PDB into distributions and trends with server-side facets — counts, histograms, timelines, and cross-tabs. |
| Fetch UniProt features and natural variants plus InterPro domain/family memberships with GO terms. |
protein_search_structures
Federated search across experimental (PDB) and predicted (computed-model) structures via RCSB Search v2.
Free-text, protein-sequence (triggers an mmseqs2 similarity search), and organism / method / resolution filters
content_typescopes the search toexperimental,predicted, orallExperimental hits are enriched with title, method, resolution, and organism
Optional
facetsreturn a method / organism / release-year breakdown alongside the hits at no extra callChain hit IDs straight into
protein_get_structure
protein_get_structure
Fetch structures with metadata and coordinate-file URLs, resolving across providers by source.
source: experimentaltakes PDB entry IDs, batched in one RCSB GraphQL callsource: predictedtakes UniProt accessions and returns the AlphaFold model with pLDDT/PAE confidencesource: best_availabletakes UniProt accessions and returns the top federated model (experimental if one exists, else the best prediction)Per-ID partial success — unresolved IDs are listed in
failed[], not a batch-level errorinclude_coordsinlines coordinate content; when a batch overflows the response budget it returns a per-structure size outline, so you can re-call withsections: [ids]for specific structures
protein_find_similar
Find structurally or evolutionarily related proteins, by sequence or by fold.
by: sequenceruns a synchronous RCSB mmseqs2 search;by: structureruns an asynchronous Foldseek search against experimental and predicted databasesQuery from a raw one-letter sequence, a PDB ID, or a UniProt accession
Foldseek targets default to
pdb100+afdb50; override viadatabases(e.g.afdb-swissprot,BFVD)Async jobs that exceed the poll budget return
status: computingwith a ticket — re-call to resumeEach hit names the engine and source database it came from
protein_track_ligands
Ligand discovery and binding-site analysis across the PDB.
mode: find_ligandresolves a name or formula to chemical component IDs with formula, weight, SMILES, and InChIKeymode: structures_with_ligandreturns PDB entries containing a ligand by exact component IDmode: binding_sitereturns the protein residues lining a ligand's pocket in a structure, with contact distancesBinding sites are experimental-only — computed from deposited coordinates (predicted models carry no bound ligands)
protein_compare_structures
Structural alignment of 2–10 structures via the RCSB Structural Comparison service.
Methods:
tm-align,fatcat-rigid,fatcat-flexiblereference: firstaligns every structure to the first;reference: all_pairscomputes the full pairwise matrixOptional per-structure
chainrestricts the alignment to a single chainEach pair is an independent async job, fanned out with a concurrency cap and per-pair partial success — a pair still computing when the budget elapses returns
status: computingwith its job UUID, and a failed pair degrades its row without sinking the othersReturns TM-score, RMSD, and aligned-residue count per pair
protein_analyze_collection
Profile the PDB into distributions and trends over an optional scoping query — backed by RCSB's server-side facet engine (one call, compact buckets, no row pull).
Group by
method,organism,polymer_type,resolution,release_year, ormolecular_weightOne
group_bydimension for a breakdown, or two for a cross-tab (the first nests the second)intervalsets the bin width for value histograms or the period for date histograms (year/month/quarter)Scope with a free-text
query,organism,method, ormax_resolution;content_typeselects the structure universebucket_limitcaps buckets per dimension; truncation is flagged in the response
protein_get_annotations
Sequence and functional annotation for a protein.
UniProt features (domains, binding sites, PTMs) and natural sequence variants
InterPro domain/family memberships (Pfam, PROSITE, …) with associated GO terms
Provide a UniProt accession directly, or a PDB ID — resolved to its accession via the structure's sequence cross-reference
includescopes which annotation classes are fetched:features,domains,variants, orall
Related MCP server: STRING-db MCP Server
Resources
Type | Name | Description |
Resource |
| Experimental structure summary for a PDB entry — title, method, resolution, organism, chains, and bound ligands. |
Resource |
| Predicted-structure summary for a UniProt accession from AlphaFold DB — mean pLDDT, confidence-band fractions, model URLs, and version. |
All resource data is also reachable via tools — pdb://{entry_id} mirrors protein_get_structure for source: experimental, and af://{uniprot} mirrors it for source: predicted. Many MCP clients are tool-only and don't surface resources; the summaries remain reachable through the tools.
Features
Built on @cyanheads/mcp-ts-core:
Declarative tool and resource definitions — single file per primitive, framework handles registration and validation
Unified error handling — handlers throw, framework catches, classifies, and formats
Pluggable auth:
none,jwt,oauthSwappable storage backends:
in-memory,filesystem,Supabase,Cloudflare KV/R2/D1Structured logging with optional OpenTelemetry tracing
STDIO and Streamable HTTP transports
Protein-specific:
One federated surface over experimental (PDB) and predicted (AlphaFold / 3D-Beacons) structures — search, fetch, and compare treat both universes the same
Keyless across every upstream — RCSB, AlphaFold DB, 3D-Beacons, UniProt, InterPro, and Foldseek, no API keys to provision
Corpus analytics run server-side on RCSB's facet engine — distributions, histograms, and cross-tabs in one call, no row pull and no SQL workspace
Async alignment and Foldseek jobs poll within a bounded budget and hand back a resumable ticket instead of blocking
Agent-friendly output:
Provenance on every response — each hit carries a
source(experimental/predicted), the engine and database that produced it, and effective-query / total-count echoes so agents can reason about coverageGraceful partial failure — batch fetches and pairwise comparisons return per-item rows (
failed[], per-pairstatus) instead of failing the whole request, each with actionable recovery textDiscriminated output contracts — typed
sourceandstatusunions,computingresults with resume tickets, and budget-overflow outlines let callers branch on data, not string parsing
Getting started
Public Hosted Instance
A public instance is available at https://protein.caseyjhand.com/mcp — no installation required. Point any MCP client at it via Streamable HTTP:
{
"mcpServers": {
"protein": {
"type": "streamable-http",
"url": "https://protein.caseyjhand.com/mcp"
}
}
}Self-hosted
Add the following to your MCP client configuration file. No API key is required — every upstream provider is keyless.
{
"mcpServers": {
"protein-mcp-server": {
"type": "stdio",
"command": "bunx",
"args": ["@cyanheads/protein-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info"
}
}
}
}Or with npx (no Bun required):
{
"mcpServers": {
"protein-mcp-server": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@cyanheads/protein-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info"
}
}
}
}Or with Docker:
{
"mcpServers": {
"protein-mcp-server": {
"type": "stdio",
"command": "docker",
"args": ["run", "-i", "--rm", "-e", "MCP_TRANSPORT_TYPE=stdio", "ghcr.io/cyanheads/protein-mcp-server:latest"]
}
}
}For Streamable HTTP, set the transport and start the server:
MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 bun run start:http
# Server listens at http://localhost:3010/mcpPrerequisites
Bun v1.3.2 or higher (or Node.js v24+).
No accounts or API keys — RCSB, AlphaFold DB, 3D-Beacons, UniProt, InterPro, and Foldseek are all public and keyless.
Installation
Clone the repository:
git clone https://github.com/cyanheads/protein-mcp-server.gitNavigate into the directory:
cd protein-mcp-serverInstall dependencies:
bun installConfiguration
All upstream providers are keyless, so the server runs out of the box with no configuration. Every variable below is optional.
Variable | Description | Default |
| Max wall-clock to poll an async job (alignment / Foldseek) before returning a |
|
| Cap on IDs accepted by |
|
| Cap on structures per |
|
| Default cap on buckets per |
|
| Max concurrent upstream requests for per-ID / per-pair fan-out (1–16). |
|
| Base URL for the RCSB Search API v2. |
|
| Base URL for the AlphaFold Protein Structure Database API. |
|
| Base URL for the Foldseek structural-similarity search service. |
|
| Transport: |
|
| Port for the HTTP server. |
|
| Auth mode: |
|
| Log level (RFC 5424). |
|
| Enable OpenTelemetry instrumentation. |
|
See .env.example for the full list of provider base-URL overrides and tuning limits.
Running the server
Local development
Build and run:
# One-time build bun run rebuild # Run the built server bun run start:stdio # or bun run start:httpRun checks and tests:
bun run devcheck # Lint, format, typecheck, security bun run test # Vitest test suite bun run lint:mcp # Validate MCP definitions against spec
Docker
docker build -t protein-mcp-server .
docker run --rm -e MCP_TRANSPORT_TYPE=http -p 3010:3010 protein-mcp-serverThe Dockerfile defaults to HTTP transport, stateless session mode, and logs to /var/log/protein-mcp-server. OpenTelemetry peer dependencies are installed by default — build with --build-arg OTEL_ENABLED=false to omit them.
Project structure
Directory | Purpose |
|
|
| Server-specific environment variable parsing and validation with Zod. |
| Tool definitions ( |
| Resource definitions ( |
| Provider service layer — RCSB, AlphaFold, 3D-Beacons, UniProt, InterPro, Foldseek, and shared HTTP/identifier helpers. |
| Unit and integration tests mirroring |
Development guide
See CLAUDE.md/AGENTS.md for development guidelines and architectural rules. The short version:
Handlers throw, framework catches — no
try/catchin tool logicUse
ctx.logfor request-scoped logging,ctx.statefor tenant-scoped storageRegister new tools and resources via the barrels in
src/mcp-server/*/definitions/index.tsWrap external API calls: validate raw → normalize to domain type → return output schema; never fabricate missing fields
Contributing
Issues and pull requests are welcome. Run checks and tests before submitting:
bun run devcheck
bun run testLicense
Apache-2.0 — see LICENSE for details.
This server cannot be installed
Maintenance
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/cyanheads/protein-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server