efetch

Pack: ncbi-eutils · Endpoint: https://gateway.pipeworx.io/ncbi-eutils/mcp

Full records. Returns text (XML/GenBank/FASTA/…) per rettype.

Parameters

NameTypeRequiredDescription
dbstringyes
idsarrayyes
itemsstringno
rettypestringnoe.g. “abstract”, “fasta”, “gb”, “xml”
retmodestringnotext (default) | xml | json

Example call

Arguments

{
  "db": "pubmed",
  "ids": [
    "35897812"
  ],
  "rettype": "abstract"
}

curl

curl -X POST https://gateway.pipeworx.io/ncbi-eutils/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"efetch","arguments":{"db":"pubmed","ids":["35897812"],"rettype":"abstract"}}}'

TypeScript (@pipeworx/sdk)

import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();

const result = await pipeworx.call('efetch', {
  "db": "pubmed",
  "ids": [
    "35897812"
  ],
  "rettype": "abstract"
});

More examples

{
  "db": "nucleotide",
  "ids": [
    "NC_000001.11"
  ],
  "rettype": "fasta",
  "retmode": "text"
}

Response shape

Full JSON Schema
{
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "content_type": {
          "type": "string",
          "description": "HTTP Content-Type header value"
        },
        "body": {
          "type": "string",
          "description": "Response body as text (XML/GenBank/FASTA/etc)"
        }
      },
      "required": [
        "content_type",
        "body"
      ]
    },
    {
      "type": "object",
      "description": "JSON response when retmode=json"
    }
  ]
}

Connect

Add this to your MCP client config, or use one-click install buttons:

{
  "mcpServers": {
    "ncbi-eutils": {
      "url": "https://gateway.pipeworx.io/ncbi-eutils/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build July 6, 2026