GBIF Biodiversity MCP Server
Public Hosted Server: https://gbif-biodiversity.caseyjhand.com/mcp
Overview
Species taxonomy, occurrence records, datasets, and publishers from the Global Biodiversity Information Facility (GBIF). Match names to the backbone taxonomy, search and aggregate 3.9B+ occurrence records with Darwin Core filters, and trace records back to their datasets and publishers.
Tools
Tool | Description |
| Match a scientific name to the GBIF backbone or the Catalogue of Life, returning its taxon key, confidence, and classification |
| Match up to 50 scientific names, each optionally narrowed to a kingdom, in one call, one result per name in input order |
| Fetch a taxon usage by key, from the backbone or any checklist: classification, authorship, synonymy, vernacular name, descendant count |
| Search or browse the backbone by name fragment, rank, taxonomic status, or a kingdom, family, or genus name |
| Return a taxon's parent chain, root-first from kingdom to its immediate parent |
| List a taxon's direct children, such as the genera in a family or the species in a genus |
| Search 3.9B+ occurrence records by taxon, place, date, basis of record, publishing organization, type status, establishment means, license, presence/absence, and IUCN category |
| Count occurrences matching a filter without fetching records |
| Fetch one Darwin Core occurrence record by key |
| Aggregate occurrence counts by country, year, dataset, taxon, status, and other dimensions, optionally naming taxon, dataset, publishing organization, and GADM area buckets |
| Search datasets by keyword, type, publishing country, or publishing or hosting organization |
| Fetch full dataset metadata by UUID: citation, contacts, license, DOI, publishing organization key, coverage with bounding boxes, deletion timestamp |
| Search GBIF-registered publishing organizations by name or country |
Resources
Resource | Description |
| Taxon usage record from the GBIF backbone or any checklist: classification, authorship, synonymy status, vernacular name |
| Dataset metadata: title, description, citation, license, contacts, coverage with bounding boxes, deletion timestamp, publishing organization key |
Both resources are also reachable via gbif_get_species and gbif_get_dataset; many MCP clients are tool-only and never surface resources.
Skills
Skill | Description |
| Agent guide: where each key comes from, which region filter selects which records, and the checks before quoting a count, a trend, or an absence. Installed with the Claude Code and Codex plugins and the |
Related MCP server: barracuda-mcp
Capability reference
gbif_match_species tool
One scientific
name(common names go togbif_search_species), with optionalstrict, akingdomto disambiguate, an expectedrank, and achecklistKeyReturns
taxonKey, the accepted taxon to pass to the occurrence tools, plusmatchedTaxonKeywhen a synonym was resolved andacceptedName(its canonical name, without authorship) whenever GBIF's answer names the accepted taxon,matchType(EXACT,FUZZY, orHIGHERRANK: a match at a higher rank, such as a misspelled species falling back to its genus or kingdom, wheretaxonKeycovers that whole taxon, or its accepted taxon when the taxon GBIF fell back to is a synonym, and anoticenames it),confidence0–100 (review below 80; aHIGHERRANKmatch can score above 90), and the classification with a key at each rankmatchTypeNONEfails asno_match, carrying GBIF's note when it gives one (for several equal matches, setkingdom); a blankkingdomfails asinvalid_filterchecklistKeyis opt-in. Omitted, ord7dddbf4-2cf0-4f39-9b2a-bb099caae36c, matches the GBIF Backbone, whose integer keys the occurrence and species tools take; GBIF no longer updates it.7ddf754f-d193-4cc9-b351-99906754a03bmatches the Catalogue of Life eXtended Release, the taxonomy GBIF now maintains, where a recently described or revised name can match exactly. Its keys come back as case-sensitive strings inchecklistTaxonKey(andchecklistMatchedTaxonKeyfor a synonym) with notaxonKey,matchedTaxonKey, or rank keys. The occurrence tools take one aschecklistTaxonKeywith the samechecklistKey; the species tools, which take a numeric backbonetaxonKey, do not.statusmay then bePROVISIONALLY_ACCEPTEDandmatchTypeVARIANT. The route isGBIF_BASE_URLwith its trailing/v1replaced by/v2, so a base URL not ending in/v1fails the call as a configuration error
gbif_bulk_match_species tool
Scientific
nameswithstrictandchecklistKey(as ongbif_match_species, applied to the whole batch); the first 50 are processed in input order. Each entry is a name string or{ name, kingdom }, where the entry'skingdomapplies to that name alone and resolves a name shared across kingdoms such as Oenanthe (a bird genus and a plant genus). A blankkingdomon any entry, the unprocessed tail included, fails the call asinvalid_filter. With read-limit clamping enabled (default), extra entries are returned inunprocessedNamesexactly as submitted, preserving order and duplicates for the next callEach result carries
nameandmatchType, and on a matchtaxonKey,matchedTaxonKeyandacceptedName(synonyms), andconfidence; aHIGHERRANKrow carries anotenaming the higher taxon GBIF matched and what itstaxonKeycovers: that taxon, or its accepted taxon when it is a synonym. An unmatched name isNONE, with GBIF's explanation innotewhen it gives one (such as several equal matches for a name shared across kingdoms, with a pointer to resubmit the entry withkingdomwhile it has none); a failed lookup isERRORwitherrorand, when classified,reason, and neither fails the batch
gbif_get_species tool
One
taxonKey, a non-negative integer (0is the backbone kingdom incertae sedis): a backbone key, or the taxon usage key of any checklist, such as agbif_search_speciesrow'skey. A key no checklist has fails asnot_found, one past the 32-bit range asinvalid_filter, and a fraction or negative key fails at the schemaReturns the classification with rank keys,
datasetKey(the source checklist),nubKey(the mapped backbone key, the one the occurrence tools take astaxonKey; absent where the backbone has no mapping),authorship,vernacularName,numDescendants,publishedIn, andparentKey;key, the rank keys,parentKey, andacceptedKeyare taxon usage keys of that checklist, equal tonubKeyonly on a backbone usage. AtaxonomicStatusofSYNONYMcomes withacceptedKeyandaccepted. GBIF's taxon record carries no occurrence count: usegbif_count_occurrenceswithnubKey
gbif_search_species tool
qname fragment (scientific and vernacular),rank,status,isExtinct, and a checklistdatasetKey(omit for the backbone); up to 1,000 per page with integerlimitandoffset, whereoffset + limitmay not exceed 100,000Taxa carry the checklist usage
key, optional sourcedatasetKeyand mapped backbonenubKey,rank,taxonomicStatus, classification names,vernacularName(GBIF's own, else the first English vernacular name containingqwhenqis not part of the row's own scientific name, else the first English one), andnumDescendants.numOccurrencesappears only when GBIF supplies a positive value; its species search sends a0placeholder on every row, so count withgbif_count_occurrencesonnubKeyor aSPECIES_KEYfacet. Enrichment reportstotalCount,endOfRecords, thetaxonScopeapplied, and thestatusvalues applied. Occurrence queries usenubKeywhen supplied; otherwise resolve the name withgbif_match_species. OmitteddatasetKeyselects GBIF Backbone Taxonomyd7dddbf4-2cf0-4f39-9b2a-bb099caae36cstatustakes one or more ofACCEPTED,DOUBTFUL,SYNONYM,HETEROTYPIC_SYNONYM,HOMOTYPIC_SYNONYM,PROPARTE_SYNONYM, andMISAPPLIED, and a name matches when it carries any of them;SYNONYMmatches only names whose status is exactlySYNONYM, not the heterotypic, homotypic, or pro parte forms. An empty list fails at the schema.status: ["ACCEPTED"]withrank: "SPECIES"and agenuslists that genus's accepted specieskingdom,family, andgenustake names, matched by their exact spelling in any letter case, never fuzzily; the narrowest one scopes, andkingdombeside a narrower one disambiguates it. An unknown name fails asunresolved_taxon_scope, a genus outside the named family asconflicting_taxon_scope, and a scope paired with a non-backbonedatasetKeymatches nothing. A blank filter or a malformeddatasetKeyfails asinvalid_filterGBIF's species search serves nothing past an
offset + limitof 100,000, whatever the query. The sum is checked on the appliedlimitbefore any request, and a larger one fails aspagination_cap_exceeded. WhentotalCountexceeds 100,000, every page carries a notice naming the ceiling and the way past it: narrow withkingdom,family,genus,rank,status,isExtinct, orq, or walk a subtree withgbif_get_species_children, which has no ceiling
gbif_get_species_classification tool
One
taxonKey(a backbone key or the taxon usage key of any checklist); returnsclassificationroot-first from kingdom to the immediate parent, each entry withkey,rank,name,scientificName,datasetKey, andnubKey. The chain is read in the queried taxon's own checklist: eachkeyis a taxon usage key there, andnubKeyis the mapped backbone key the occurrence tools take, absent where the backbone has no mappingThe queried taxon is not included (use
gbif_get_species); a root taxon returns an empty chain with a notice, an unknown key fails asnot_found, one past the 32-bit range asinvalid_filter, and a fraction or negative key fails at the schema
gbif_get_species_children tool
One
taxonKey(a non-negative integer, a backbone key or the taxon usage key of any checklist;0is the backbone's incertae sedis kingdom), whose children are listed within its own checklist, up to 1,000 children per page with integerlimitandoffset; no filters. A fraction or negative value fails at the schema; an unknown key fails asnot_found, one past GBIF's 32-bit range asinvalid_filterEach child carries
key(its taxon usage key in the parent's checklist),datasetKey,nubKey(the mapped backbone key, absent where the backbone has no mapping),canonicalName,rank,taxonomicStatus,vernacularNamewhen GBIF has one, andnumDescendants; GBIF sends no occurrence count, so usegbif_count_occurrenceswith the child'snubKey. GBIF reports no total, soendOfRecords(withtruncatedwhile more remain) is the continuation signalAn empty later page gives offset-reset guidance; only an empty first page for an existing taxon means no direct children
gbif_search_occurrences tool
Filters:
taxonKey(preferred: a key names exactly one taxon, where ascientificNameshared across kingdoms, such as Oenanthe, matches nothing;scientificNamedoes resolve synonyms),checklistKeywithchecklistTaxonKey,country,publishingCountry,stateProvince,gadmGid, adecimalLatitude/decimalLongitudebox, WKTgeometry, orgeoDistance(a radius around a point),elevation,depth,year,month(one month or a range),eventDate,basisOfRecord,hasCoordinate,hasGeospatialIssue,isInCluster,coordinateUncertaintyInMeters,datasetKey,publishingOrg,catalogNumber,institutionCode,recordedBy,mediaType,typeStatus,establishmentMeans,license,occurrenceStatus,iucnRedListCategory;includeMediaadds each row's media; up to 300 per pagechecklistKeyselects the taxonomy a taxon key is read in. Omitted, ord7dddbf4-2cf0-4f39-9b2a-bb099caae36c, is the GBIF Backbone andtaxonKeytakes its integer keys. Either value also leaves out the records GBIF has not matched to a taxon in that checklist, which a call with nochecklistKeykeeps.7ddf754f-d193-4cc9-b351-99906754a03bis the Catalogue of Life eXtended Release: scope by one of its keys withchecklistTaxonKey(such as3WSJV, the keygbif_match_speciesreturns under the samechecklistKey), which matches the taxon and every descendant, astaxonKeydoes. A key holds uppercase letters and digits only and is matched case-sensitively; a digit-only one such as8288(the genus Tringa) is not the BackbonetaxonKeyof the same spelling.checklistTaxonKeywithout the Catalogue of LifechecklistKey, andtaxonKeywith it, fail asinvalid_filterbefore any request, since GBIF answers a key from the other taxonomy with zero records or an unrelated taxon. Rows keep their BackbonetaxonKeyeither waycountry,basisOfRecord,taxonKey, andchecklistTaxonKeyeach take one value or a non-empty array, and a record matching any one member matches (country: ["ES", "PT"]covers both countries, and a facet call ranks them as one scope).taxonKeyandchecklistTaxonKeytake at most 100 members; an empty array fails at the schema, and each member passes the check a single value does. Different filters still intersect (a taxon key withscientificNameexcepted, below), and an array is echoed inscopeas the arraygadmGidis an uppercase GADM GID (ESP.1_1) GBIF derives from each record's coordinates, so records without coordinates match none; take one from aGADM_LEVEL_0_GID–GADM_LEVEL_3_GIDfacet orgbif_get_occurrence'sgadmfield.catalogNumberandinstitutionCodematch the whole value case-insensitively,recordedByone collector exactly and case-sensitively (take a spelling from aRECORDED_BYfacet), andmediaTypeisStillImage,MovingImage,Sound, orInteractiveResource.limitandoffsetare integers,taxonKeyis an integer or an array of them, andmonthis an integer 1–12 or a stringpublishingOrgis the UUID of the organization that published the records, across all its datasets; take one fromgbif_search_publishers, a dataset's or an occurrence record'spublishingOrganizationKey, or aPUBLISHING_ORGfacet. It is not the organization hosting the installation, and notpublishingCountrytypeStatusandestablishmentMeansare matched case-insensitively against GBIF's TypeStatus (51 concepts) and EstablishmentMeans (7) vocabularies, then sent and echoed in the concept's own spelling. A value matches its concept and every narrower one:Typecovers every kind of type,LectotypecoversIsolectotype,nativecoversnativeEndemicandnativeReintroduced,introducedcoversintroducedAssistedColonisation. A value naming no concept fails asinvalid_filterlisting themlicenseisCC0_1_0,CC_BY_4_0, orCC_BY_NC_4_0; a blank or other value fails at the schema as-32602, notinvalid_filterhasGeospatialIssue: truekeeps records GBIF flagged with a spatial issue (zero coordinates, coordinates out of range, outside the stated country);falsekeeps unflagged ones. GBIF often drops the coordinates of a flagged record, so pairfalsewithhasCoordinate: truefor records to mapAll supplied spatial filters intersect: combining
geometryorgeoDistancewith latitude or longitude ranges restricts results to their overlapgeoDistanceis"latitude,longitude,distance", latitude first, with the distance ending in a lowercasekmorm("38.17,-3.95,25km"and"38.17,-3.95,25000m"are the same circle). The unit is required, because GBIF reads a distance with no unit as meters, so any other form fails asinvalid_filterdecimalLatitude,decimalLongitude,coordinateUncertaintyInMeters,elevation, anddepthare ranges written"min,max", both ends inclusive. A value without a comma is an exact match, not a range around it, and every result carries a notice saying so, with an example range per field (decimalLatitude "38,39",decimalLongitude "-4,-3",coordinateUncertaintyInMeters "0,1000"for within 1 km,elevation "2000,*"for 2,000 m and above,depth "200,*"for 200 m and deeper), listing only the fields the notice names.coordinateUncertaintyInMeters,elevation, anddepthalso take*for one open end ("*,1000","2000,*"); a bare*, padded or not, fails asinvalid_filteron these and onyear,month, andeventDate. A*end with whitespace between it and the comma ("* ,1990","2020, *") also fails asinvalid_filteroncoordinateUncertaintyInMeters,year,month,elevation, anddepth, and the message gives the corrected form ("*,1990"), because GBIF answers that spacing with HTTP 404 and an empty body, as it does a bare*; whitespace on the outer side of a*end (" *,1990") or beside a number end ("*, 1990","1990 ,*") is read by GBIF and forwarded, andeventDatewith that spacing goes to GBIF, whose 400 names the valueyearis one year or a"min,max"range,monthan integer 1–12 or a string holding one month or an ascending range ("3,5"for March through May, with no wrap past December), andeventDateisYYYY,YYYY-MM, orYYYY-MM-DD, each covering its whole period, or a range of any mix of them ("2026-01-01,2026-06-30").*opens one end of each range ("*,1990","2020,*"), and any value,"*,*"included, drops records that carry no value for that field. GBIF rejects a time of day, a descending range, or an impossible date by nameRecords carry
key,taxonKey,taxonomicStatus, coordinates,eventDateandeventTime,basisOfRecord,occurrenceStatus,iucnRedListCategory,datasetKey,institutionCode,catalogNumber, andissues, plus each of these where GBIF has it:acceptedTaxonKeyandacceptedScientificName(the accepted taxon behind a synonym record, the name with authorship),publishingOrganizationKey,license(the record's Creative Commons URL; thelicensefilter takes the code form),rightsHolder,recordNumber(the collector's number, notcatalogNumber),elevationanddepthin meters, andtypeStatusandestablishmentMeans(both go back unchanged to their filters).occurrenceStatusreadsDETECTEDorNOT_DETECTED, as GBIF serves it. WithincludeMedia, each row also carries every media item of its record as{ type, identifier, license, rightsHolder }in source order, whatevermediaTypeselected; it is off by default because it adds to both response surfaces. Enrichment reportstotalCount,endOfRecords, and theoccurrenceStatusappliedSearch, count and facets echo the same
scope: effective supplied biological filters, withoccurrenceStatusalways included and pagination controls excluded.ANYis echoed but omitted upstream.taxonKeyandscientificNamecombine with OR, so a name GBIF cannot resolve (one shared across kingdoms, or one it does not know) empties the combined query, thetaxonKeyrecords included; a zero then carries a notice saying so and naming two ways out: drop the name, or resolve it withgbif_match_speciesand add the returned key to the call'staxonKey(orchecklistTaxonKey) array in place of the name. All 11 GBIF basis-of-record values are accepted, includingFOSSIL_SPECIMEN,OBSERVATION, andUNKNOWNLatitude, longitude and coordinate uncertainty are independent optional facts; text renders each supplied value, including zero, in decimal degrees or meters
offset + limitcaps at 100,001 and GBIF has no cursor; a deeper request fails aspagination_cap_exceeded, and a larger match is reached by partitioning on aDATASET_KEYfacet fromgbif_occurrence_facets. A rejected filter value fails asinvalid_filter
gbif_count_occurrences tool
Accepts every biological filter listed for
gbif_search_occurrences, with the same constraints and spatial intersection.isGeoreferencedremains an alias forhasCoordinate; either alone or both equal works, conflicting values fail asinvalid_filterReturns
count, with theoccurrenceStatusapplied in the enrichment; a count above 100,001 carries a notice naming the partition route, and a rejected filter value fails asinvalid_filter
gbif_get_occurrence tool
One
occurrenceKeyfrom a search result, a positive integer (a non-positive or fractional key is rejected at the schema); an unknown key fails asnot_foundThe Darwin Core record:
occurrenceStatus(NOT_DETECTEDis a survey that found nothing, not a sighting; theoccurrenceStatusfilter takesABSENTorNOT_DETECTEDfor it), coordinates withelevationanddepthin meters and, where the publisher gave them,informationWithheldanddataGeneralizations(the coordinates are coarser than observed on purpose), GADM levels 0–3 undergadm, dates witheventTimeanddateIdentified,taxonomicStatus, the backbone key at every rank (kingdomKeythroughspeciesKey),acceptedTaxonKeyandacceptedScientificName(the accepted taxon behind a synonym record),iucnRedListCategory, institution, collection, and catalog codes,datasetName,recordedBy,identifiedBy, andrecordNumber,occurrenceRemarks,habitat,samplingProtocol,organismQuantitywithorganismQuantityType,typeStatusandestablishmentMeans,license(the Creative Commons URL),rightsHolder, andpublishingOrganizationKey(goes intopublishingOrg),references(the link to the source record),isInCluster,mediawith each item'srightsHolder,identifiers, andissues. Each field is omitted when GBIF sends none
gbif_occurrence_facets tool
facetis one ofCOUNTRY,STATE_PROVINCE,YEAR,MONTH,BASIS_OF_RECORD,DATASET_KEY,PUBLISHING_COUNTRY,KINGDOM_KEY,PHYLUM_KEY,CLASS_KEY,ORDER_KEY,FAMILY_KEY,GENUS_KEY,SPECIES_KEY,OCCURRENCE_STATUS,IUCN_RED_LIST_CATEGORY,GADM_LEVEL_0_GID–GADM_LEVEL_3_GID,INSTITUTION_CODE,MEDIA_TYPE,RECORDED_BY,PUBLISHING_ORG,TYPE_STATUS,ESTABLISHMENT_MEANS,LICENSE; up to 100 values per page (facetLimit, default 10), paged withfacetOffsetAccepts every biological filter listed for
gbif_search_occurrences, with the same constraints and spatial intersection. Repeat them on the facet call and each partition search to preserve the population. ReturnstotalOccurrencesandcountsranked by count; a rejected scope value fails asinvalid_filterEach facet request fetches one extra bucket to prove continuation.
truncated,shown, andcapappear only when that bucket exists; advancefacetOffsetby the exposed page size. GBIF pages a ranking only so far:facetOffset + facetLimitmay reach 1,199,999 on any scope, past which the call fails aspagination_cap_exceededbefore any request, and 500,000 on a scope ranking more than 500,001 buckets, where GBIF refuses a deeper page and the call fails the same way; when the next page at the samefacetLimitwould reach past position 500,001 (the lookahead bucket counts), the continuation notice names thefacetLimitthat lands the next page exactly on it, and that page carries a notice in place of a continuation, withtruncatedstill set, so a walk at anyfacetLimitends at position 500,001. To rank buckets past either, narrow the scope with filters (taxonKeyof a class or order,country,year,basisOfRecord, or adatasetKeyfrom aDATASET_KEYfacet) and page each narrower scope from 0. An exactly full final page carries no truncation flag. Empty later pages give offset-reset guidance; an empty first page distinguishes zero matching occurrences from a dimension with no dataDATASET_KEYbuckets sum to the scope's full total, so it is the facet for partitioning a search too large to page;YEAR,MONTH,STATE_PROVINCE,SPECIES_KEY,INSTITUTION_CODE,MEDIA_TYPE,RECORDED_BY,TYPE_STATUS, andESTABLISHMENT_MEANSdrop records that lack the field, and the GADM levels drop records without coordinates or outside every GADM unit at that level.MEDIA_TYPEandRECORDED_BYbuckets overlap (a record with two media types or two collectors counts in each), and so doTYPE_STATUSandESTABLISHMENT_MEANS(a record counts under its concept and every broader one: anIsolectotypealso underLectotypeandType), so their sums can exceedtotalOccurrences.INSTITUTION_CODEbuckets come back lowercased andinstitutionCodetakes them unchanged;PUBLISHING_ORG,TYPE_STATUS,ESTABLISHMENT_MEANS, andLICENSEbuckets go back unchanged aspublishingOrg,typeStatus,establishmentMeans, andlicense, andGADM_LEVEL_*_GIDbuckets asgadmGid.OCCURRENCE_STATUSbuckets readDETECTEDandNOT_DETECTED, which theoccurrenceStatusfilter takes unchanged.KINGDOM_KEY–SPECIES_KEYbuckets are Backbone keys fortaxonKey, or, under the Catalogue of LifechecklistKey, Catalogue of Life keys forchecklistTaxonKey. Passfacet: OCCURRENCE_STATUSwithoccurrenceStatus: ANYfor the presence/absence splitincludeLabels: truenames each bucket on aKINGDOM_KEY–SPECIES_KEY,DATASET_KEY,PUBLISHING_ORG, orGADM_LEVEL_0_GID–GADM_LEVEL_3_GIDpage:counts[].labelis the taxon'scanonicalName, the datasettitle, the organizationtitle, or the administrative area'sname. Taxon buckets are looked up in the taxonomychecklistKeyselects, never by the shape of the key, since8288is a Catalogue of Life genus and a Backbone family. It costs one GBIF request per exposed bucket (never the lookahead), at most 8 in flight server-wide, no retries, and one 10 s deadline per page; a bucket whose lookup fails, finds no name, or misses it has nolabeland is counted innotice, which points an unlabeled GADM bucket atgbif_get_occurrence'sgadmfield. Other dimensions ignore it, and without it a facet call is one request. Labeling Catalogue of Life buckets reads the/v2route, so aGBIF_BASE_URLnot ending in/v1fails that call as a configuration error
gbif_search_datasets tool
Filters:
q,type(OCCURRENCE,CHECKLIST,METADATA,SAMPLING_EVENT),publishingCountry,publishingOrg,hostingOrg; up to 1,000 per page, whereoffset + limitmay not exceed 125,000Returns
key,title,type,license,doi,recordCount,publishingOrganizationKeyandpublishingOrganizationTitle, and a 300-characterdescriptionpreview, withdescriptionTruncatedflagging a cut (gbif_get_datasethas the full text).publishingOrganizationKeygoes back in aspublishingOrg.limitandoffsetare integerspublishingOrgmatches the organization whose data it is and is the usual chain fromgbif_search_publishers;hostingOrgmatches the organization whose installation serves it, and the two together intersect. Both take the lowercase UUID form; anything else, like any rejected filter value, fails asinvalid_filterGBIF's dataset search serves nothing past an
offset + limitof 125,000. The sum is checked on the appliedlimitbefore any request, and a larger one fails aspagination_cap_exceeded. WhentotalCountexceeds 125,000, every page carries a notice naming the ceiling and the way past it:typesplits the index with no gap or overlap, since every dataset has exactly one of the four types, andq,publishingCountry,publishingOrg, andhostingOrgnarrow it further
gbif_get_dataset tool
One
datasetKeyUUID andcontactLimit(default 10, max 100;0drops contact detail but keepscontactsTotal); a malformed key fails asinvalid_filter, an unknown one asnot_foundReturns
description,citationText,license,doi,publishingOrganizationKey(goes intogbif_search_datasetsaspublishingOrg; the detail record carries no organization name),recordCount,numConstituents,contactswithcontactsTotalandcontactsReturned,temporalCoverages,geographicCoverages(each a description, aboundingBoxas GBIF sends it, or both; aminLongitudeabovemaxLongitudeis a box crossing the antimeridian), anddeleted, GBIF's timestamp for a dataset it no longer publishes (it is then not searchable and GBIF indexes none of its occurrences; absent on a published dataset)
gbif_search_publishers tool
qname fragment andcountry(alpha-2 or alpha-3, any case); up to 1,000 per page with integerlimitandoffsetReturns organization
key,title,country, andcity; the key chains intogbif_search_datasetsaspublishingOrgA blank
q, an emptycountry, or a country GBIF cannot parse fails asinvalid_filter. Besides the codes, GBIF parses its own enum name for a country (UNITED_KINGDOM, orUnited Kingdom), but no other name:Britain,UK, and numeric codes fail
gbif://species/{taxonKey} resource
Taxon usage record as
application/json: classification names,authorship,vernacularName,taxonomicStatuswithacceptedKeyandaccepted,numDescendants,datasetKey(the source checklist), andnubKey(the mapped backbone key the occurrence tools take);keyandacceptedKeyare taxon usage keys of that checklisttaxonKeyis a whole signed decimal integer within the signed 32-bit range;0is the backbone kingdom incertae sedis. The segment is URI-decoded once and surrounding whitespace is trimmed; leading+, zero padding and their percent-encoded equivalents are accepted. An unknown key fails asnot_found; malformed escapes, suffixes, fractions, exponents, hexadecimal forms, embedded whitespace and out-of-range values fail asinvalid_filterbefore a request. Use a backbone key fromgbif_match_speciesor a taxon usage key of any checklist, such as a search result'skey
gbif://dataset/{datasetKey} resource
The
gbif_get_datasetrecord asapplication/json, includingpublishingOrganizationKey, with contacts fixed at 10datasetKeycomes fromgbif_search_datasetsor an occurrence record; an unknown key fails asnot_found, a malformed one asinvalid_filter
Features
Built on @cyanheads/mcp-ts-core: stdio and Streamable HTTP transports, pluggable auth (none / jwt / oauth), swappable storage (in-memory, filesystem, Supabase, Cloudflare KV/R2/D1), structured logging with optional OpenTelemetry tracing.
GBIF-specific:
GBIF API v1 species, occurrence, dataset, organization, and GADM endpoints, plus v2 species matching for the Catalogue of Life, keyless, with an identifying
User-Agenton every requestSynonym-safe keys:
gbif_match_speciesresolves a synonym to its accepted taxon, and the occurrence tools filter on thattaxonKeyOpt-in Catalogue of Life matching:
checklistKeyon both match tools matches against the Catalogue of Life eXtended Release and returns string keys in separate fields, and the occurrence tools take them aschecklistTaxonKey, so a Catalogue of Life key never lands in a backbone integer fieldSightings by default: the search, count, and facet tools default
occurrenceStatustoPRESENT, excluding absence records. Records and facet buckets readDETECTEDandNOT_DETECTED, which the filter takes as well asPRESENTandABSENT. DatasetrecordCountspans every status, so it can exceed agbif_count_occurrencestotal for the same keyStrict country codes:
country(where a record was observed) andpublishingCountry(the publisher's country) on the occurrence tools, andpublishingCountryongbif_search_datasets, accept only uppercase ISO 3166-1 alpha-2, because lowercase and alpha-3 forms silently match nothing there and a country name such asBritaindraws a 400 upstream.stateProvincematches verbatim and case-sensitively, so take values from aSTATE_PROVINCEfacetBlank filters rejected: GBIF reads an empty parameter as no filter, so an optional filter sent blank or whitespace-only fails as
invalid_filterinstead of widening the query. The exception is a blankcountryorpublishingCountryon the occurrence tools, or a blankpublishingCountryongbif_search_datasets, which fails earlier at the uppercase pattern as-32602 invalid_arguments, as does a blank or unknownlicenseat its enum. Omit a field to leave it off
Agent-friendly output:
Scope echo: enrichment reports
totalCount,endOfRecords, theoccurrenceStatusapplied, and the resolvedtaxonScope, with notices on empty results, over-cap totals, and ascientificName,stateProvince,gadmGid, orrecordedBythat matched nothingGraceful partial failure:
gbif_bulk_match_speciesreturns aNONEorERRORrow per name instead of failing the batchTyped errors:
invalid_filter,not_found,no_match,unresolved_taxon_scope,conflicting_taxon_scope, andpagination_cap_exceeded(ongbif_search_occurrences,gbif_occurrence_facets,gbif_search_species, andgbif_search_datasets), each with a recovery hintSparse fields omitted rather than null-filled:
extinctappears only on taxa GBIF explicitly flagsDataset metadata preserves temporal ranges, single dates, and verbatim periods such as
1975-current, and geographic coverage bounding boxes as GBIF sends them; unsupported coverage entries are disclosed. A deleted dataset carries itsdeletedtimestamp. An unavailable supplementary record count carriesrecordCountNoticewhile retaining metadataPublisher descriptions retain paragraph breaks and decode numeric character references once; Markdown output renders publisher text literally, in dataset and occurrence output alike. A value containing Markdown or character-reference syntax appears in
content[]as numeric character references (&#NN;) standing for one character each, never part of the value;structuredContentcarries every string as GBIF sent it. An http(s) URL in an occurrence record (occurrenceID,references, a media oridentifiersentry) renders as a link whose text is the URL, and any other value as escaped text
Getting started
Public Hosted Instance
A public instance is available at https://gbif-biodiversity.caseyjhand.com/mcp — no installation required. Point any MCP client at it via Streamable HTTP:
{
"mcpServers": {
"gbif-biodiversity-mcp-server": {
"type": "streamable-http",
"url": "https://gbif-biodiversity.caseyjhand.com/mcp"
}
}
}Self-Hosted / Local
Add the following to your MCP client configuration file.
{
"mcpServers": {
"gbif-biodiversity-mcp-server": {
"type": "stdio",
"command": "bunx",
"args": ["@cyanheads/gbif-biodiversity-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info"
}
}
}
}Or with npx (no Bun required):
{
"mcpServers": {
"gbif-biodiversity-mcp-server": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@cyanheads/gbif-biodiversity-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info"
}
}
}
}Or with Docker:
{
"mcpServers": {
"gbif-biodiversity-mcp-server": {
"type": "stdio",
"command": "docker",
"args": ["run", "-i", "--rm", "-e", "MCP_TRANSPORT_TYPE=stdio", "ghcr.io/cyanheads/gbif-biodiversity-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.4.4 or higher (or Node.js v24+).
No credentials: the GBIF endpoints this server calls are public.
Installation
Clone the repository:
git clone https://github.com/cyanheads/gbif-biodiversity-mcp-server.gitNavigate into the directory:
cd gbif-biodiversity-mcp-serverInstall dependencies:
bun installConfigure environment:
cp .env.example .env
# optionally set GBIF_USER_AGENT to a contact URL or emailConfiguration
Variable | Description | Default |
| GBIF API base URL. Keep the trailing |
|
| Clamp oversized whole-number read limits to the documented caps and disclose requested/applied values. Bulk matching processes the first 50 names and returns the remainder in |
|
| Per-request HTTP timeout, in ms. |
|
|
| server name, version, and repository URL |
| Transport: |
|
| HTTP server port. |
|
| HTTP session mode: |
|
| Authentication: |
|
| Log level ( |
|
| Log each failed tool call's arguments and result, redacted by key name and capped at |
|
| Directory for log files (Node.js only). |
|
| Storage backend: |
|
| Enable OpenTelemetry. |
|
See .env.example for the full list of optional overrides.
Running the server
Local development
Build and run the production version:
# One-time build bun run rebuild # Run the built server bun run start:http # or bun run start:stdioRun checks and tests:
bun run devcheck # Lints, formats, type-checks, and more bun run test # Runs the test suite
Docker
docker build -t gbif-biodiversity-mcp-server .
docker run --rm -p 3010:3010 gbif-biodiversity-mcp-serverThe Dockerfile defaults to HTTP transport, stateless session mode, and logs to /var/log/gbif-biodiversity-mcp-server. OpenTelemetry peer dependencies are installed by default; build with --build-arg OTEL_ENABLED=false to omit them.
Project structure
Directory | Purpose |
| Tool definitions ( |
| Resource definitions. Species and dataset resources. |
| GBIF API service layer: HTTP client with retry, timeouts, and error mapping, plus raw response types. |
| Server-specific environment variable parsing and validation with Zod. |
| Unit and integration tests, mirroring the |
Development guide
See CLAUDE.md for development guidelines and architectural rules. The short version:
Handlers throw, framework catches — no
try/catchin tool logicUse
ctx.logfor logging,ctx.statefor storageRegister new tools and resources in the
createApp()arrays insrc/index.tsWrap external API calls: validate raw → normalize to domain type → return output schema; never fabricate missing fields
Contributing
Issues are welcome. Run checks and tests before submitting:
bun run devcheck
bun run testLicense
This project is licensed under the Apache 2.0 License. See the LICENSE file for details.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Search ReliefWeb humanitarian reports, disasters, jobs, training, and country profiles via MCP.
GBIF MCP — wraps the Global Biodiversity Information Facility API v1 (free, no auth)
Public MCP endpoint for collaborative research and knowledge discovery.
Query U.S. Census Bureau data, variables, and geography via MCP.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables searching Figshare research articles, datasets, papers, and posters through the MCP protocol.62 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables searching OpenAleph entities and documents using natural language queries through the MCP protocol.16 npm1MIT
- AlicenseNot gradedqualityAmaintenanceGeocode, reverse geocode, and run Overpass spatial queries on OpenStreetMap data via MCP.737 npm9Apache 2.0
- AlicenseNot gradedqualityBmaintenanceSearch and query government open-data portals (Socrata SODA API) via MCP.206 npm4Apache 2.0