BioF Logo

JAAG MCP Server

Single-job GUI
jaag-af3 is a Model Context Protocol (MCP) server that exposes JAAG's AlphaFold 3 assembly to AI agents and other MCP clients. It speaks JSON-RPC over stdio and wraps the same converter core as the GUI and batch modes, so every path produces identical output.

Running the server

cd batch
node mcp-server.js

The server reads JSON-RPC requests on stdin and writes responses on stdout. initialize returns serverInfo { name: "jaag-af3", version: "1.0.0" }; tools/list returns the six tools below; tools/call invokes one.

Client configuration

Register the server with any MCP client (path is the absolute path to mcp-server.js):

{
  "mcpServers": {
    "jaag-af3": {
      "command": "node",
      "args": ["/absolute/path/to/JAAG/batch/mcp-server.js"]
    }
  }
}

Tools

assemble covers every input branch

The generic assembler — mirrors the single-job GUI one-to-one. template is a standalone AlphaFold 3 (alphafold3 dialect) job object, and the output is the same object completed. No glycan is required.

args: {
  // template is a standalone alphafold3 job (same shape as the output)
  template: {
    name, modelSeeds:[int], version:int,
    sequences:[                          // AF3 entities
      { protein:{ id?, sequence, modifications?:[{ptmType,ptmPosition}],
                  unpairedMsa?, unpairedMsaPath?, pairedMsa?, pairedMsaPath?,
                  templates?:[{mmcif|mmcifPath, queryIndices, templateIndices}] } },
      { rna:{ id?, sequence, modifications?, unpairedMsa? } },
      { dna:{ id?, sequence, modifications? } },
      { ligand:{ id?, ccdCodes?:[..] | smiles? } }
    ],
    bondedAtomPairs?:[ [[chain,res,atom],[chain,res,atom]], .. ],  // native AF3 covalent bonds
    userCCD?, userCCDPath?
  },

  // optional JAAG conveniences (NOT AF3 fields — compiled into the AF3 output):
  ligands?:[{ label, ccdCodes|smiles|glycoct|accession, count? }],  // add free ligands
  glycoct? | accession?, id?,                                       // add one glycan
  glycosylationSites?:[{ chainId, position, linkingAtom }]          // Manual Glyco Sites
}
→ AF3 JSON string — { name, modelSeeds, dialect:"alphafold3",
                    version, sequences[], bondedAtomPairs[], userCCD? }

Standalone AF3 has no glycosylation/attachment field. In the alphafold3 dialect a glycan is a ligand entity and its link to the protein is a bondedAtomPairs entry — that is exactly what the output contains. The glycosylationSites argument (and the legacy attachments alias) is an optional JAAG input helper that lives outside the template; it is compiled into bondedAtomPairs and never appears in the output. To place a glycan yourself with no helper, add the glycan as a ligand entity and a bondedAtomPairs row in template directly. Multimer copies: repeat the entity's id as an array (e.g. "id":["A","B"]).

enrich

Direction 1: turn a list of protein accessions (UniProt, GenBank/EMBL/RefSeq, or PDB ids — e.g. a CAZy download) into an AF3 protein list, each with sequence, N-/O-glycosylation sites and PTMs pulled from UniProt/PDB.

args: { ids: ["P15291", ...], nglycOnly?, noGlyc?, noPtm?, perSite? }
→ { proteins: [ { id, sequence, glycosylation, ptms } ], errors }
build_af3

One AF3 job with an optional varying glycan (glycoct OR a GlyTouCan/GlyGen accession) plus optional free (unbonded) ligands — sugar-nucleotide donors / acceptors as CCD or SMILES. A convenience wrapper over assemble; use assemble for the full generic surface.

args: { template:{name,modelSeeds,version,entities[],glycosylationSites[]?},
        glycoct? | accession?, id?,
        ligands?: [{label, ccdCodes|smiles|glycoct}] }
→ AF3 JSON string
resolve_glycan

Resolve a GlyTouCan / GlyGen accession to GlycoCT (via WURCS). Needs GlyCosmos/GlyTouCan network access.

args: { accession: "G17689DH" }
→ { id, glycoct, wurcs }
convert

Convert a GlycoCT string to AF3 CCD codes + bonded atom pairs + userCCD, using JAAG's own converter.

args: { glycoct: "RES\n..." }
→ { ccdCodes, bondedAtomPairs, userCCD }
screen

High-throughput screen: enrich accessions (ids) and/or use template proteins, cross-producted with a glycan list (bonded) and/or a free-ligand list. Returns one AF3 JSON per combination.

args: { template, ids?, glycans?: [{id, glycoct|accession}],
        ligands?: [{label, ccdCodes|smiles}] }
→ { results: [ { id, json } ], failed }

Chain naming

EntityChain id
ProteinsA, B, C
Free ligands / free glycans (donors, unbonded substrates)LIGA, LIGB
Asn-linked glycans (bonded to a protein)GLYCANA, GLYCANB

A glycan placed at a glycosylation site becomes a bonded GLYCAN chain (linked to the protein via a bondedAtomPairs entry); a glycan given as a free ligand becomes an unbonded LIG chain — the same convention as the web GUI.

userCCD

Sialic-acid CCDs (SIA, SLB, NGC, NGE) are emitted as their α-linked userCCD variants (SIA-2, SLB-2, NGC-2, NGE-2) with the full CIF block included, and sulfate/phosphate substituents (SO4-2, PO4-2) carry their userCCD too — identical to the GUI and batch modes.

Full GUI parity

Every input branch of the single-job GUI is reachable through the assemble tool, and the MCP server calls the same shared assembly core as the GUI — so a job you can build in the GUI you can build over MCP, with identical output.