Worms Marine Taxa Mcp Server

io.github.cyanheads由 GitHub 帳號 cyanheads 發布v0.2.0更新於 Oct 29, 2026

Resolve WoRMS marine species names; fetch classifications, synonyms, distributions, traits, and IDs.

已驗證Streamable HTTP可網頁執行知識與記憶資料與分析

概覽

AI 產生的概覽

唯讀的 WoRMS 海洋分類伺服器:把物種名解析為 AphiaID,並取得分類階層、異名、分布、性狀與外部識別碼。

可以做什麼
  • 把學名(精確或模糊)或單一俗名解析為 AphiaID,並附上接受名連結
  • 取得完整分類單元記錄,可選擇附帶俗名或來源文獻
  • 取得從根到末端的分类階層,可選擇附帶直系子單元;查詢接受名的異名
  • 取得已記錄的分布,可依記錄狀態、引入方式、入侵性與出現情形篩選,並可選擇合併異名
  • 取得性狀/屬性樹,支援繼承屬性與依測量類型篩選
  • 把 AphiaID 對應到九種外部識別碼系統,或由外部 ID 反查
適用情境
當助理需要權威的海洋物種名稱、接受名更正、分類譜系、異名清單、分布記錄或性狀資料時適用,例如海洋生物研究、生物多樣性資料清理,或把分類單元連結到外部資料庫。
執行需求
可使用公開託管端點(免安裝),或透過 npx 在本機執行(需要 Node.js);從原始碼建置需要 Bun 1.4.0 以上或 Node.js 24 以上。不需要 API 金鑰或帳號,WoRMS REST API 是公開的。選用的框架設定包括 MCP_TRANSPORT_TYPE、MCP_HTTP_PORT、MCP_AUTH_MODE 與 MCP_LOG_LEVEL。需要能連線到 WoRMS 的網路。
安裝前請注意
八個工具都是唯讀的,但請求會經過共用佇列限速(同一時間只有一個上游請求,間隔 500 毫秒),專案要求逐次呼叫、不做大量擷取,因此大批量工作會很慢。性狀與分布涵蓋不完整,沒有資料不代表不存在。重複使用結果時須標明 WoRMS Editorial Board 並保留每筆記錄的引用。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Worms Marine Taxa Mcp Server,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/io.github.cyanheads%2Fworms-marine-taxa-mcp-server/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "worms-marine-taxa": {
      "type": "http",
      "url": "https://worms-marine-taxa.caseyjhand.com/mcp"
    }
  }
}

README

@cyanheads/worms-marine-taxa-mcp-server

Resolve WoRMS marine species names; fetch classifications, synonyms, distributions, traits, and IDs via MCP. STDIO or Streamable HTTP.

8 Tools


Overview

Marine taxonomy from the World Register of Marine Species (WoRMS). Resolve scientific or common names to AphiaIDs, follow accepted names, and pull classifications, synonyms, distributions, traits, and external identifiers from the keyless WoRMS REST API.

Every AphiaID selector accepts a positive safe integer, a decimal string, or a canonical WoRMS LSID such as urn:lsid:marinespecies.org:taxname:137205; returned AphiaIDs remain numbers. For other LSIDs use worms_crosswalk_id with externalId and type: "lsid", or resolve a scientific name with worms_resolve_taxon.

Tools

ToolDescription
worms_resolve_taxonResolve scientific names (exact or fuzzy) or one common name to AphiaIDs, with accepted-name links
worms_get_taxonFetch full Aphia records by AphiaID, optionally with common names or sources
worms_get_classificationFetch the root-to-tip classification, optionally with direct children
worms_get_synonymsList synonyms of the accepted taxon behind an AphiaID
worms_get_distributionsFetch recorded distributions, filtered by status, establishment means, invasiveness, or occurrence
worms_get_traitsFetch attribute trees (body size, functional group, conservation listings) with sources and inheritance
worms_crosswalk_idMap an AphiaID to nine external identifier systems, or reverse an external ID
worms_list_referenceList identifier systems, statuses, environment flags, distribution filter values, ranks, and trait definitions

Capability reference

worms_resolve_taxon tool

  • A nonempty names list (no total-input ceiling, at most 50 per upstream request) or one vernacular, never both. fuzzy: true opts into TAXAMATCH matching; marineOnly and extantOnly default to true for names. Vernacular search matches a whole recorded common name, or with vernacularMatch: "contains" every recorded name containing the text (grouper finds no exact match but many by contains); it applies neither filter
  • Each result keeps its inputIndex (duplicates included), every match with status, validAphiaId, and validName, and a guidance line on a miss; continue with nextInputOffset and nextMatchOffset
  • Vernacular results page with the upstream offset (1-based, steps of 50) and the local resultOffset

worms_get_taxon tool

  • A nonempty aphiaIds list with no total-input ceiling, at most 50 fetched per request; continue with nextInputOffset using the unchanged list. Unknown IDs stay in position as found: false; every submitted element is validated before fetching
  • includeVernaculars: true (one ID only) adds common names, paged with vernacularOffset; a failed lookup returns vernacularError beside the record
  • includeSources: true (one ID only, not with includeVernaculars) adds the taxon's sources, such as its original description and basis of record, with reference, page, url, link, fulltext, and doi verbatim. Optional sourceUse: "original description" filters whole use values ignoring case before sourceOffset and the byte budget; blanks omit the filter, populated values stay untrimmed. Continue nextSourceOffset with unchanged options to repeat the full primary record and reconstruct every selected row in order
  • Successful source results report sourceTotalCount for the complete selected bibliography and unfilteredSourceCount only with an effective filter. Notices distinguish no matching use, an empty bibliography, and a past-end offset. A failed lookup returns sourcesError beside the record without counts; sourceUse is inactive without includeSources

worms_get_classification tool

  • One aphiaId; ranks is the root-to-tip lineage, with found: false when WoRMS has none
  • includeChildren: true adds one 50-row page of direct children (offset, marineOnly, extantOnly); a failed children lookup returns childrenError beside the lineage
  • The submitted AphiaID keeps its own recorded lineage. A notice names its linked accepted AphiaID, or the preferred AphiaID for an accepted alternative representation; a failed status lookup returns statusError beside the lineage

worms_get_synonyms tool

  • One aphiaId, accepted or not: synonyms are listed for its accepted taxon (validAphiaId), 50 per upstream offset
  • found and guidance separate a missing taxon from a name with no known accepted ID

worms_get_distributions tool

  • One aphiaId; optional recordStatus (valid, doubtful, inaccurate), establishmentMeans, invasiveness, and occurrence filters combine with AND. recordStatus ignores case and surrounding whitespace and echoes its lowercase code; the others match case-insensitive whole values without trimming populated strings, with observed values in worms_list_reference topic distribution_terms. Blank filters are omitted
  • Reports unfilteredCount and filteredCount; rows carry the locality, its MarineRegions locationId, and status fields in source order
  • WoRMS attaches records to individual name usages, so by default the tool reads that AphiaID's own records. includeSynonyms: true combines the accepted taxon's records with those of its synonyms, 10 synonyms per call, each row tagged sourceAphiaId; synonymUnion reports the window, the nextSynonymOffset to continue from, and any failedSynonyms
  • A notice names the linked accepted AphiaID, distinguishing an accepted alternative representation from its preferred AphiaID; without includeSynonyms, a failed status lookup returns statusError beside the rows

worms_get_traits tool

  • One aphiaId; includeInherited (default true) adds attributes recorded on higher taxa. On an accepted taxon WoRMS also returns attributes recorded on its synonyms whatever includeInherited is set to; inheritedFrom names the source taxon in both cases
  • A notice names the linked accepted AphiaID, distinguishing an accepted alternative representation from its preferred AphiaID; a failed status lookup returns statusError beside the attributes
  • Every node keeps nodeIndex, parentIndex, and depth from the full tree, so units and qualifiers stay attached to their values across pages; values and references are verbatim
  • measurementType (case-insensitive whole value, such as Body size) keeps each matching node with its subtree and ancestors, indices unchanged; totalCount counts that set and unfilteredCount the whole tree

worms_crosswalk_id tool

  • Exactly one of aphiaId (forward) or externalId with type (reverse). Forward reads one type or all nine: algaebase, bold, dyntaxa, fishbase, iucn, lsid, ncbi, tsn, gisd
  • Forward returns ids per type, typeTotals (0 means none recorded), and failedTypes for systems that errored; reverse returns found and the full record. IDs stay opaque strings, leading zeros included

worms_list_reference tool

  • topic: external_id_types, statuses, environment_flags, and distribution_terms are served offline; ranks and trait_types are read live
  • statuses covers the 28 statuses the WoRMS manual and REST API document, each with a one-line meaning and a group (accepted, unaccepted, uncertain, technical). A record's status can be the specific reason itself, such as junior subjective synonym, so test the group rather than status === "unaccepted"; the guide is non-exhaustive
  • distribution_terms lists the establishmentMeans, invasiveness, and occurrence values observed in WoRMS distributions, for the whole-value filters of worms_get_distributions; the lists are non-exhaustive
  • Pages with resultOffset; trait definitions keep their tree indices across pages

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.

WoRMS-specific:

  • Exact and TAXAMATCH fuzzy name matching with marine and extant filters; every match and record carries its accepted-name links
  • One shared request queue: one upstream request at a time, 500 ms between starts, a 45-second tool deadline, and an 8 MiB response ceiling
  • Per-call retrieval with no cache or bulk harvesting, as the WoRMS webservice guidance asks
  • Every response carries WoRMS attribution (doi:10.14284/170); credit the WoRMS Editorial Board and keep per-record citations when reusing results (terms)

Agent-friendly output:

  • Byte-bounded pages: reads return whole items within a 24,000-byte response and name the next offset (nextResultOffset, nextInputOffset, upstream page.nextOffset); a full 50-row upstream page reports hasMore: null rather than guessing
  • Unknown stays unknown: null and absent fields pass through, a null environment flag means not recorded, and empty evidence never claims biological absence
  • Partial failure: optional lookups (vernacularError, sourcesError, childrenError, statusError), synonym-union failedSynonyms, and crosswalk failedTypes keep the data that did arrive, with typed reasons and recovery hints

Getting started

Connect to the hosted instance, no install:

sh
claude mcp add --transport http worms-marine-taxa-mcp-server https://worms-marine-taxa.caseyjhand.com/mcp

Or run it locally:

sh
claude mcp add worms-marine-taxa-mcp-server -- npx -y @cyanheads/worms-marine-taxa-mcp-server

For other clients, add this to the MCP config file:

json
{  "mcpServers": {    "worms-marine-taxa-mcp-server": {      "command": "npx",      "args": ["-y", "@cyanheads/worms-marine-taxa-mcp-server"]    }  }}

No API key or account is needed: the WoRMS REST API is public. For Docker or a source build, see Running the server.

Configuration

The server has no variables of its own; these are the common framework settings.

VariableDescriptionDefault
MCP_TRANSPORT_TYPETransport: stdio or http.stdio
MCP_HTTP_PORTHTTP server port.3010
MCP_SESSION_MODEHTTP session mode: stateless, stateful, or auto.stateless
MCP_AUTH_MODEAuthentication: none, jwt, or oauth.none
MCP_LOG_LEVELLog level (debug, info, warning, error, etc.).info
LOGS_DIRDirectory for log files (Node.js only).<app-root>/logs
STORAGE_PROVIDER_TYPEStorage backend: in-memory, filesystem, supabase, cloudflare-kv/r2/d1.in-memory
OTEL_ENABLEDEnable OpenTelemetry.false

See .env.example for the common framework overrides.

Running the server

Local development

Requires Bun v1.4.0 or higher (or Node.js v24+).

  • Clone and install:

    sh
    git clone https://github.com/cyanheads/worms-marine-taxa-mcp-server.gitcd worms-marine-taxa-mcp-server && bun installcp .env.example .env
  • Build and run the production version:

    sh
    # One-time buildbun run rebuild
    # Run the built serverbun run start:http# orbun run start:stdio
  • Run checks and tests:

    sh
    bun run devcheck  # Lints, formats, type-checks, and morebun run test      # Runs the test suite

Docker

sh
docker run --rm -p 3010:3010 ghcr.io/cyanheads/worms-marine-taxa-mcp-server:latest

The image defaults to HTTP transport, stateless session mode, and logs to /var/log/worms-marine-taxa-mcp-server. To run it over stdio from an MCP client, use "command": "docker" with "args": ["run", "-i", "--rm", "-e", "MCP_TRANSPORT_TYPE=stdio", "ghcr.io/cyanheads/worms-marine-taxa-mcp-server:latest"]. To build locally, docker build -t worms-marine-taxa-mcp-server .; OpenTelemetry peer dependencies are installed by default — build with --build-arg OTEL_ENABLED=false to omit them.

Project structure

DirectoryPurpose
src/mcp-server/tools/definitionsTool definitions (*.tool.ts). Eight read-only tools.
src/services/wormsWoRMS service: paced transport, normalization, domain schemas, response budgeting, and formatting.
docs/Design contract (design.md) and the generated directory tree.
tests/Service, tool-contract, and JSON-RPC integration tests.

Development guide

See CLAUDE.md for development guidelines and architectural rules. The short version:

  • Handlers throw, framework catches; optional lookups report classified failures beside the primary data instead of discarding it
  • Register new tools in the createApp() arrays in src/index.ts
  • Internal imports are relative ESM paths with .js extensions
  • Wrap 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:

sh
bun run devcheckbun run test

License

This project is licensed under the Apache 2.0 License. See the LICENSE file for details.

來源:README.md,提交 5cd80f6

工具

8

worms_list_reference

Worms List Reference

List supported external identifier systems, a non-exhaustive taxonomic-status guide grouped as accepted, unaccepted, uncertain, or technical, environment-flag semantics, observed worms_get_distributions filter values, live taxonomic ranks, or live trait definitions. Resume nextResultOffset as resultOffset with the same topic. Identifier codes, statuses, environment flags, and distribution terms are available offline. A record status can be the specific reason itself, such as junior subjective synonym, rather than unaccepted. IUCN identifiers are not threat categories; null flags mean not recorded. Trait definitions retain complete-tree preorder indices across pages; parents may be on earlier pages.

輸入參數topic必填resultOffset

worms_resolve_taxon

Worms Resolve Taxon

Resolve exact or explicitly fuzzy scientific names, or search one vernacular name as a whole recorded common name or, with vernacularMatch: "contains", as part of one. Names default to marine-or-brackish and extant taxa; vernacular cannot filter. Resume scientific segments with nextInputOffset and nextMatchOffset against unchanged names and options; inputIndex preserves duplicates and partialGroup identifies split groups. For vernacular, consume nextResultOffset within the same upstream offset before advancing page.nextOffset and resetting resultOffset to zero. Full 50-match upstream groups remain completeness-unknown; accepted-name fields do not choose an ambiguous match.

輸入參數fuzzynamesoffsetextantOnlymarineOnlyvernacularinputOffsetmatchOffsetresultOffsetvernacularMatch

worms_get_taxon

Worms Get Taxon

Retrieve full Aphia records by numeric IDs or canonical WoRMS LSIDs in byte-budgeted segments. Resume nextInputOffset as inputOffset using unchanged aphiaIds and options; inputIndex preserves duplicate and missing positions. includeVernaculars (common names) or includeSources (original description, basis of record, and other sources) requires one submitted ID, one of the two per call; resume nextVernacularOffset as vernacularOffset or nextSourceOffset as sourceOffset, repeating the full primary record. sourceUse filters whole use values ignoring case before sourceOffset; populated values are not trimmed. Successful source results report sourceTotalCount before slicing and unfilteredSourceCount only with an effective filter. Optional failure retains the record without source counts; unknown facts remain omitted or null.

輸入參數aphiaIds必填sourceUseinputOffsetsourceOffsetincludeSourcesvernacularOffsetincludeVernaculars

worms_get_classification

Worms Get Classification

Retrieve root-to-tip classification and optional direct children for an AphiaID or canonical WoRMS LSID. resultOffset indexes lineage followed by fetched children; consume nextResultOffset with unchanged options and upstream offset before advancing page.nextOffset and resetting resultOffset to zero. Missing ranks remain unknown; child offset and filters are inactive without includeChildren. A full fetched 50-row child page has uncertain continuation and can lead to an empty page. The submitted ID keeps its own recorded lineage; a notice names its linked accepted ID, distinguishing an accepted alternative representation from its preferred ID.

輸入參數offsetaphiaId必填extantOnlymarineOnlyresultOffsetincludeChildren

worms_get_synonyms

Worms Get Synonyms

Retrieve synonyms for the accepted taxon linked from an AphiaID obtained with worms_resolve_taxon. Consume nextResultOffset within the same upstream offset before advancing page.nextOffset and resetting resultOffset to zero. A present name without an accepted ID has no synonym lookup; inspect it with worms_get_taxon. A full fetched 50-row page has uncertain continuation and may lead to an empty page.

輸入參數offsetaphiaId必填resultOffset

worms_get_distributions

Worms Get Distributions

Retrieve recorded distributions for an AphiaID or canonical WoRMS LSID in byte-budgeted segments; resume nextResultOffset as resultOffset with unchanged selectors and filters. WoRMS attaches records to individual name usages, so one AphiaID's rows can miss those of its synonyms: includeSynonyms combines the accepted taxon's rows with those of up to 10 synonyms per call, each row tagged sourceAphiaId; consume nextResultOffset before advancing synonymOffset to synonymUnion.nextSynonymOffset with resultOffset 0. Filters apply to the complete fetched set before pagination and combine by conjunction: recordStatus normalizes case and surrounding whitespace before exact matching; others use case-insensitive whole-value equality without trimming. Rows retain duplicates and source order; no rows does not prove biological or taxon absence. A notice names the linked accepted ID, distinguishing an accepted alternative representation from its preferred ID.

輸入參數aphiaId必填occurrenceinvasivenessrecordStatusresultOffsetsynonymOffsetincludeSynonymsestablishmentMeans

worms_get_traits

Worms Get Traits

Retrieve recorded attributes for an AphiaID or canonical WoRMS LSID, including inherited attributes by default. Resume nextResultOffset as resultOffset with unchanged selectors and options. Whole rows retain original preorder nodeIndex and parentIndex across pages; parents may be on earlier pages. measurementType keeps each matching node with its subtree and ancestors, indices unchanged; totalCount counts that set and unfilteredCount the whole tree. Values, references and inheritance markers remain unchanged; on an accepted taxon WoRMS also returns attributes recorded on its synonyms whatever includeInherited is set to, marked by inheritedFrom. A notice names the linked accepted ID, distinguishing an accepted alternative representation from its preferred ID. Missing traits do not prove biological absence; IUCN list membership is not a threat category.

輸入參數aphiaId必填resultOffsetmeasurementTypeincludeInherited

worms_crosswalk_id

Worms Crosswalk Id

Crosswalk an AphiaID from worms_resolve_taxon to one or all nine external identifier systems, or reverse an externalId with required type to a full taxon record. Supply exactly one selector. Forward resultOffset indexes whole identifiers across types in requested order; resume nextResultOffset with unchanged selectors. typeTotals distinguishes successful absence from IDs on another segment; failed types remain separate. IDs stay opaque, including leading zeros and LSIDs. No IDs cannot establish taxon absence; IUCN identifiers are not threat categories.

輸入參數typeaphiaIdexternalIdresultOffset

版本歷史

4
  1. v0.2.0最新Oct 29, 2026
  2. v0.1.3Oct 25, 2026
  3. v0.1.2Oct 21, 2026
  4. v0.1.1Oct 21, 2026

評分

已滿足適用檢查項的 100%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分