About paleobiology-mcp-server
paleobiology-mcp-server gives researchers and other users access to fossil and biodiversity records from the Paleobiology Database. It combines occurrence searches with taxon ranges, diversity curves, and geologic-time lookups, including modern and paleo coordinates.
Key features
- 01Search fossil occurrences and collections
- 02Resolve taxa and fossil age ranges
- 03Calculate diversity and extinction curves
- 04Look up geologic time intervals
- 05Query staged occurrence data with read-only SQL
Use cases
- 01Find fossils by taxon, time, or location
- 02Compare clade diversity across geologic intervals
- 03Identify collections matching formation or lithology
- 04Analyze broad occurrence results with SQL
MCP support
Exposes Paleobiology Database searches, taxon and interval lookups, diversity calculations, references, and record resources through MCP. Supports STDIO and Streamable HTTP; DataCanvas SQL tools are available when enabled.
Configuration
Remote servers need no local install. Pick your client, then copy the config or install in one click.
https://paleobiology.caseyjhand.com/mcpclaude mcp add --transport http cyanheads-paleobiology https://paleobiology.caseyjhand.com/mcp{"mcpServers":{"cyanheads-paleobiology":{"type":"http","url":"https://paleobiology.caseyjhand.com/mcp"}}}Open in Cursor{"servers":{"cyanheads-paleobiology":{"type":"http","url":"https://paleobiology.caseyjhand.com/mcp"}}}Open in VS Code{"mcpServers":{"cyanheads-paleobiology":{"type":"http","url":"https://paleobiology.caseyjhand.com/mcp"}}}{"mcpServers":{"cyanheads-paleobiology":{"serverUrl":"https://paleobiology.caseyjhand.com/mcp"}}}Run commands in a terminal; paste JSON into the client’s MCP config and restart. Servers that need sign-in will prompt on first connect.
Tools
8| Parameter | Type | Required | Description |
|---|---|---|---|
| limit | integer | No | Maximum occurrences to pull per page. Up to 500 are pulled per call; a larger value is served at 500, and the paging notice names that cap when more matches remain. A page can show fewer rows than it pulled when more would exceed the inline response size — the notice then names the offset that continues. Pair with offset to walk the whole match set. |
| latmax | number | No | Northern edge of the bounding box, decimal degrees (−90…90). Valid on its own — a lone latitude edge filters as a half-plane. |
| latmin | number | No | Southern edge of the bounding box, decimal degrees (−90…90). Valid on its own — a lone latitude edge filters as a half-plane. |
| lngmax | number | No | Eastern edge of the bounding box, decimal degrees (−180…180). Longitude is a closed pair — supply lngmin with it or neither. |
| lngmin | number | No | Western edge of the bounding box, decimal degrees (−180…180). Longitude is a closed pair — supply lngmax with it or neither. |
| max_ma | number | No | Older age bound in millions of years ago. Alternative to interval. When paired with min_ma it must be strictly greater — max_ma is the deeper-time end of the window. |
| min_ma | number | No | Younger age bound in millions of years ago. Alternative to interval. When paired with max_ma it must be strictly smaller — min_ma is the nearer-to-present end of the window. |
| offset | integer | No | Number of matching occurrences to skip before this page — page with limit by advancing offset. The response notice names the exact offset that reaches the next page. |
| base_id | integer | No | Clade-inclusive taxon filter by PBDB taxon id — the taxon_no from paleobiology_get_taxon, or accepted_no on an occurrence row. Same clade-inclusive semantics as base_name, but unambiguous where a name is not (homonyms, synonyms, unresolved spellings). Supply this or base_name, never both. |
| interval | string | No | Named geologic interval bounding the age, e.g. "Cretaceous" or "Maastrichtian". Alternative to max_ma/min_ma. |
| base_name | string | No | Clade-inclusive taxon filter — this taxon and all descendants, e.g. "Dinosauria". The usual choice. Supply this or base_id, never both. |
| canvas_id | string | No | Canvas id from a prior call to re-stage onto the same workspace. Used only when this page spills: reusing it REPLACES (overwrites) the prior occurrence table — each search restages the full result, it does not append to or accumulate across earlier ones — while a page that fits inline leaves that canvas untouched. Omit to start fresh; a spilled response returns a new id. |
| taxon_name | string | No | Exact taxon filter — only this taxon, not descendants. Use instead of base_name when you want a single taxon. |
| environment | enum | No | Depositional environment: "marine", "terrestrial", or "freshwater" (lacustrine + fluvial). Omit for all.marine | terrestrial | freshwater |
| collection_no | integer | No | Restrict to one collection (locality) by its PBDB collection_no — the fauna found together at that site. Take the id from a paleobiology_search_collections row to drill from a locality into its occurrences. |
Details
From the project README@cyanheads/paleobiology-mcp-server
Search fossil occurrences, resolve taxon fossil ranges, plot diversity through deep time, and look up the geologic time scale via MCP. STDIO or Streamable HTTP.
Public Hosted Server: https://paleobiology.caseyjhand.com/mcp
Overview
Fossil biodiversity over the Paleobiology Database (PBDB), spanning roughly 540 million years. Resolve taxon fossil ranges, search fossil occurrences and collections by taxon, geologic time, and location, and plot diversity through deep time.
Tools
| Tool | Description |
|---|---|
paleobiology_search_occurrences | Search fossil occurrences by taxon, geologic time, geography, and depositional environment. Every row carries both modern and paleo coordinates; with DataCanvas on, broad results spill to a canvas for SQL. |
paleobiology_get_taxon | Resolve a taxon by name or taxon_no to its accepted name, rank, classification, and FAD/LAD range — the name-resolution gateway. |
paleobiology_get_diversity | Compute a diversity / origination / extinction curve for a clade across geologic time. |
paleobiology_list_intervals | Look up the geologic time scale — named intervals ↔ absolute Ma boundaries. |
paleobiology_search_collections | Find fossil collections (localities) by area, geologic time, formation, and lithology. |
paleobiology_get_references | Resolve the reference_no on occurrence and collection rows to full citations — authors, year, title, publication, pages, DOI. |
paleobiology_dataframe_query | Run a read-only SQL SELECT over occurrence sets staged on a DataCanvas. Listed only when DataCanvas is on. |
paleobiology_dataframe_describe | List the tables and columns staged on a DataCanvas. Listed only when DataCanvas is on. |
paleobiology_dataframe_drop | Drop a single staged table to free memory before its TTL expires. Opt-in; also needs DataCanvas. |
Resources
| Resource | Description |
|---|---|
paleobiology://occurrence/{occurrence_no} | One fossil occurrence with full detail — modern + paleo coordinates, classification, strata, locality. |
paleobiology://taxon/{taxon_no} | One taxon record with its fossil range and classification. |
paleobiology://reference/{reference_no} | One bibliographic reference — the formatted citation plus its structured fields. |
All resource data is also reachable via tools — the resources mirror a single-record read of paleobiology_search_occurrences / paleobiology_get_taxon / paleobiology_get_references for clients that surface resources. Tool-only clients lose nothing.
Capability reference
paleobiology_search_occurrences tool
- Requires at least one taxon, time, geographic, environment, or
collection_nofilter. Usebase_nameorbase_idfor a clade,taxon_namefor an exact match; page withlimit(default 100, max 500 per call) andoffset. Responses stay within 100,000 bytes, and the notice names the offset that continues - Returns modern and paleo coordinates, named intervals and Ma ages, strata, and higher classification, with
totalCountfor PBDB's true match count. Errors:missing_filter,conflicting_taxon_filter,incomplete_bbox,inverted_ma_range, andpbdb_invalid_parameter(with PBDB's reason) for a value PBDB cannot use - With DataCanvas on, a page too large to inline is staged on a canvas and returns
canvas_id+table_nameforpaleobiology_dataframe_describe, then SQL. If the canvas cap is reached, it fails with retryablecanvas_capacity_exhausted: pass an existingcanvas_idor lowerlimitto the value the message names. Without DataCanvas, an overflowing page is cut
paleobiology_get_taxon tool
- Resolve by
nameortaxon_noto accepted name, rank, classification, parent, occurrence count, and FAD/LAD range in Ma. The returnedtaxon_nois thebase_idaccepted by occurrence, diversity, and collection searches show_childrenadds up to 200 immediate child taxa per call;children_truncatedandchildren_offsetsay whether and where to continue- Typed errors:
taxon_not_found,missing_selector,conflicting_selectorwhen bothnameandtaxon_noare sent
paleobiology_get_diversity tool
- Requires a clade (
base_nameorbase_id), optionally bounded byintervalormax_ma/min_ma. Choosecount(genera,species,families) andresolution(period,epoch,age); defaults are genera by period - Returns the full bin set inline, oldest-first, with sampled, implied, origination, extinction, range-through, and occurrence counts
- Typed errors:
missing_filter,conflicting_taxon_filter,inverted_ma_range,pbdb_invalid_parameterfor a value PBDB cannot use (an unknown interval)
paleobiology_list_intervals tool
- Filter by
name, amin_ma/max_maoverlap window, orlevel(eon,era,period,epoch,age); omit filters to browse the bundled ICS scale - Returns interval rank, Ma boundaries,
parent_no, and an upstreamscalewhere available.source(bundled_ics/pbdb_upstream) andsnapshot_versionidentify the source; names outside the snapshot use PBDB - Typed errors:
interval_not_foundfor an unmatched name; retryableinterval_lookup_unavailablewhen PBDB cannot resolve a name outside the snapshot;inverted_ma_rangewhenmax_mais belowmin_ma
paleobiology_search_collections tool
- Requires at least one taxon, time, geographic,
formation,lithology, orenvironmentfilter. Page withlimit(default 100, max 500 per call) andoffset. Responses stay within 100,000 bytes, and the notice names the offset that continues - Returns locality coordinates, age, strata, lithology, environment, and
n_occs, with totals. Passcollection_notopaleobiology_search_occurrencesfor the fauna at that locality - Typed errors:
missing_filter,conflicting_taxon_filter,incomplete_bbox,inverted_ma_range,pbdb_invalid_parameterfor a value PBDB cannot use (an unknown interval, or an unknown lithology sent as the only filter)
paleobiology_get_references tool
- Pass 1–500
reference_nosfrom occurrence or collection rows; the first 25 distinct ids resolve in one PBDB request, and the rest come back inremaining_reference_nosfor the next call - Returns references in request order: the plain-text
citationexactly as PBDB formats it, plustitle,year,authors,editors,publication,volume,issue, pages,publisher,language, anddoiwhere recorded - Ids PBDB has no reference for land in
not_foundwith a notice — a miss is a result, not an error
paleobiology_dataframe_query tool
- Runs a read-only SQL
SELECTagainst occurrence sets staged bypaleobiology_search_occurrences, using thetable_nameit returned; writes and file-reading functions are rejected - The
classificationcolumn is JSON — roll up by rank withjson_extract_string(classification, '$.family')(also$.phylum,$.class,$.order,$.genus) - Responses stay within 100,000 bytes; the notice names the
ORDER BY … LIMIT/OFFSETthat reads the rest.truncated: truemeansrow_countstopped at the canvas row cap - Listed only when DataCanvas is on (
CANVAS_PROVIDER_TYPE=duckdb)
paleobiology_dataframe_describe tool
- Lists the tables staged on a canvas, each with its row count and column names/types/nullability — call before
paleobiology_dataframe_queryto discover identifiers - Listed only when DataCanvas is on (
CANVAS_PROVIDER_TYPE=duckdb)
paleobiology_dataframe_drop tool
- Drops one staged table by
canvas_id+table_nameto free memory before its TTL expires; dropping a nonexistent table returnsdropped: false, not an error - Opt-in — needs DataCanvas on and
PALEOBIOLOGY_DATAFRAME_DROP_ENABLED=true - Typed error:
canvas_not_foundwhen the canvas has expired or never existed
paleobiology://occurrence/{occurrence_no} resource
- Path param
occurrence_nois a bare positive integer (regex-validated), frompaleobiology_search_occurrencesoutput - Returns the same full occurrence detail as the tool — accepted/identified names, age, modern + paleo coordinates, formation/strata, locality — plus a CC BY 4.0
attributionfield - Typed error:
occurrence_not_found
paleobiology://taxon/{taxon_no} resource
- Path param
taxon_nois a bare positive integer (regex-validated), frompaleobiology_get_taxonor an occurrence'saccepted_no - Mirrors
paleobiology_get_taxon's shape exactly — accepted name, rank, classification, parent, FAD/LAD range — plus a CC BY 4.0attributionfield - Typed error:
taxon_not_found
paleobiology://reference/{reference_no} resource
- Path param
reference_nois a bare positive integer (regex-validated), from an occurrence or collection row - Returns the same record as one
paleobiology_get_referencesentry plus a CC BY 4.0attributionfield - Typed error:
reference_not_found
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.
PBDB-specific:
- Type-safe client for the Paleobiology Database (PBDB) REST API, requesting
vocab=pbdbso readable field names come straight from upstream instead of hand-mapped terse codes - Bundled ICS geologic time-scale snapshot —
paleobiology_list_intervalsresolves the international scale's named intervals ↔ absolute Ma boundaries with no network call, falling back to a PBDB lookup for sub-stage and regional names - Optional DataCanvas spill for broad occurrence queries (
CANVAS_PROVIDER_TYPE=duckdb): an inline preview plus a staged table queryable with read-only SQL (count by interval, group by formation/country, roll up by family from theclassificationJSON column) - No auth, no API key — PBDB is fully open (
MCP_AUTH_MODEdefaults tonone) - Diversity counts reflect sampling and collection effort, not true past diversity
Agent-friendly output:
- Two coordinate systems on every occurrence — modern lng/lat and paleo lng/lat, distinctly labeled, so an agent never plots a deep-time fossil on a modern coastline
- Both temporal representations on every age — the named interval and its Ma boundaries
- Provenance on every row:
reference_noforpaleobiology_get_references, plus CC BY attribution on tools and resources - Sparse upstream fields (paleo-coords, formation,
late_interval) are omitted rather than zeroed
Getting started
Public Hosted Instance
A public instance is available at https://paleobiology.caseyjhand.com/mcp — no installation required. Point any MCP client at it via Streamable HTTP:
{
"mcpServers": {
"paleobiology-mcp-server": {
"type": "streamable-http",
"url": "https://paleobiology.caseyjhand.com/mcp"
}
}
}
Self-Hosted / Local
Add one of the following to your MCP client configuration file. PBDB is keyless — no API key required.
With bunx:
{
"mcpServers": {
"paleobiology-mcp-server": {
"type": "stdio",
"command": "bunx",
"args": ["@cyanheads/paleobiology-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info"
}
}
}
}
Or with npx (no Bun required):
{
"mcpServers": {
"paleobiology-mcp-server": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@cyanheads/paleobiology-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info"
}
}
}
}
Or with Docker:
{
"mcpServers": {
"paleobiology-mcp-server": {
"type": "stdio",
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "MCP_TRANSPORT_TYPE=stdio",
"ghcr.io/cyanheads/paleobiology-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/mcp
To enable SQL over large occurrence sets, set CANVAS_PROVIDER_TYPE=duckdb (the @duckdb/node-api peer dep ships in dependencies). Without it, paleobiology_search_occurrences still returns its inline preview, and the paleobiology_dataframe_* tools are left off tools/list (the HTTP landing page shows them as disabled, with the setting that enables them).
Prerequisites
- Bun v1.4 or higher (or Node.js v24+).
- No API key — the Paleobiology Database is fully open.
Installation
- Clone the repository:
git clone https://github.com/cyanheads/paleobiology-mcp-server.git
- Navigate into the directory:
cd paleobiology-mcp-server
- Install dependencies:
bun install
- Configure environment (optional):
cp .env.example .env
# edit .env to override defaults — all vars are optional
Configuration
All variables are optional — the server runs with no configuration against the public PBDB API.
| Variable | Description | Default |
|---|---|---|
PBDB_BASE_URL | Paleobiology Database API base. Override for a mirror/proxy or pinned API version. | https://paleobiodb.org/data1.2 |
PBDB_TIMEOUT_MS | Per-request timeout in milliseconds. Diversity queries over large clades can be slow. | 30000 |
PBDB_MAX_OCCURRENCES | Cap on rows pulled per occurrence/collection call (tools pull at most 500, so only a lower value matters). | 1000 |
CANVAS_PROVIDER_TYPE | Set to duckdb to enable the DataCanvas spill path and list the paleobiology_dataframe_* tools. | none |
PALEOBIOLOGY_DATAFRAME_DROP_ENABLED | Enable paleobiology_dataframe_drop (DataCanvas must also be on). | false |
MCP_TRANSPORT_TYPE | Transport: stdio or http. | stdio |
MCP_HTTP_PORT | Port for HTTP server. | 3010 |
MCP_SESSION_MODE | HTTP session mode: stateless, stateful, or auto. | stateless |
MCP_AUTH_MODE | Auth mode: none, jwt, or oauth. | none |
MCP_LOG_LEVEL | Log level (RFC 5424). | info |
OTEL_ENABLED | Enable OpenTelemetry instrumentation (spans, metrics, completion logs). | false |
OTEL_EXPORTER_OTLP_ENDPOINT | Base OTLP URL for traces and metrics. Logs require their own endpoint. | unset |
OTEL_EXPORTER_OTLP_LOGS_ENDPOINT | Enable OTLP log export to this exact URL. | unset |
LOG_TOOL_FAILURE_PAYLOADS | Log failed tool arguments and results, with key-name redaction; secrets in free-form values remain. | false |
LOG_TOOL_FAILURE_PAYLOAD_MAX_BYTES | UTF-8 byte cap per logged payload. | 16384 |
See .env.example for the full list of optional overrides.
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:http -
Run 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 paleobiology-mcp-server .
docker run --rm -p 3010:3010 paleobiology-mcp-server
The Dockerfile defaults to HTTP transport, stateless session mode, and logs to /var/log/paleobiology-mcp-server. OpenTelemetry peer dependencies are installed by default — build with --build-arg OTEL_ENABLED=false to omit them.
Project structure
| Directory | Purpose |
|---|---|
src/index.ts | createApp() entry point — registers tools/resources and inits services. |
src/config | Server-specific environment variable parsing and validation with Zod. |
src/mcp-server/tools | Tool definitions (*.tool.ts). |
src/mcp-server/resources | Resource definitions (*.resource.ts). |
src/services/pbdb | Paleobiology Database HTTP client, normalization, and domain types. |
src/services/intervals | In-memory index over the bundled ICS geologic time-scale snapshot. |
tests/ | Unit and integration tests mirroring src/. |
Development guide
See CLAUDE.md/AGENTS.md for development guidelines and architectural rules. The short version:
- Handlers throw, framework catches — no
try/catchin tool logic - Use
ctx.logfor request-scoped logging,ctx.statefor tenant-scoped storage - Register new tools and resources via the barrels in
src/mcp-server/*/definitions/index.ts - Wrap external API calls: validate raw → normalize to domain type → return output schema; never fabricate missing fields (a missing paleo-coordinate is "unknown", not
0,0)
Data attribution
Data is from the Paleobiology Database, licensed CC BY 4.0 — credit it in downstream use.
Contributing
Issues are welcome. Run checks and tests before submitting:
bun run devcheck
bun run test
License
Apache-2.0 — see LICENSE for details.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.