Skip to main content
Glama

Pedigree MCP Server

Installation

{
  "mcpServers": {
    "pedigree": { "command": "npx", "args": ["pedigree-mcp"], "env": {} }
  }
}

From source: npm install && npm run build, then run node dist/index.js.

Chromium requirement (v2)

Since 2.0 (XML only) the layout and drawing are done by open-pedigree-xml (OPX, vendored unmodified in vendor/opx/, LGPL-2.1, see NOTICE) running in headless Chromium, driven by playwright-core (pinned to 1.62.0, Chromium revision 1234).

  • The server installs the browser itself in the background at startup if it is missing (chromium-headless-shell, no sudo, no --with-deps; output on stderr, cross-process lock, retried on failure). A render that arrives meanwhile waits for it. Opt out with PEDIGREE_SKIP_BROWSER_INSTALL=1; npm install never downloads browsers.

  • Or point to any Chromium: PEDIGREE_CHROMIUM_PATH=/path/to/chrome.

  • Chromium starts lazily on the first render and exits after 3 idle minutes, so an idle server holds no browser.

Env var

Default

Meaning

PEDIGREE_CHROMIUM_PATH

(Playwright's own build)

Chromium executable to use

PEDIGREE_SKIP_BROWSER_INSTALL

unset

1 disables the automatic Chromium install

PEDIGREE_BROWSER_INSTALL_TIMEOUT_MS

300000

Install timeout

PEDIGREE_IDLE_MS

180000

Idle time before Chromium is closed

PEDIGREE_SHUTDOWN_DRAIN_MS / PEDIGREE_SHUTDOWN_HARD_MS

1200 / 1500

SIGTERM drain bound and hard-exit bound. The defaults fit PM2's default kill_timeout (1.6 s); raise them only together with PM2's kill_timeout

PEDIGREE_MAX_PAGES

2

Max concurrent renders (1 page normally, a 2nd only when renders overlap; extra requests queue)

PEDIGREE_RENDER_TIMEOUT_MS

60000

Per-render timeout

PEDIGREE_CHROMIUM_ARGS

--disable-gpu --disable-dev-shm-usage

Space-separated Chromium flags

MCP_TRANSPORT / MCP_HOST / MCP_PORT

stdio / 127.0.0.1 / 8000

MCP_TRANSPORT=http serves stateless streamable HTTP on /mcp

Related MCP server: Gramps MCP

Tools

get_pedigree_documentation

Returns how to call generate_pedigree plus the OPX LLM reference (vendor/opx/LLMInstructions.md, pinned) for writing the XML. Call it first.

generate_pedigree

The input is OPX/Invitae XML only (the open-pedigree-xml format). The XML is drawn exactly as written: nothing is added, inferred or corrected.

Parameter

Default

Description

xml

required

A complete OPX/Invitae XML document

format

png

png (image block) or svg (text block)

dpi

150

PNG resolution: 150, 300 or 600

max_dimension

2048

Longest side in pixels; larger pedigrees are scaled down so vision models can read them

legend

true

Draw the condition legend

Render path: xml -> pre-import checker (src/opx/xml-check.ts, read-only) -> OPX import in headless Chromium (createGraphFromImportData) -> OPX's own export (SVG / PNG) -> optional down-scaling to max_dimension. The result is a text summary plus an image block (PNG) or an <svg text block (SVG).

The checker only reports what OPX itself would silently mis-draw or report poorly, naming the offending ids and the LLMInstructions rule: not well-formed XML (bare &, unknown entities, unquoted attribute values, control characters, non-<tree> root, size limit), duplicate <indi> ids, <fam> members/children/siblings pointing to missing ids, a person who is a child of two families or listed twice in one, the same person as both parents, ancestry cycles, invalid <gender>/<status>/<age> (one number and one unit)/ex/consanguinity values, more than one <male>/<female> per <fam>, not exactly one proband (pat="1"), disconnected groups (listing every group's ids), and twin links that are not reciprocal, of different type, not in the same <fam> or monozygotic with different sexes. Not checked because OPX handles it correctly: which of <male>/<female> a partner is listed in (symbols follow <gender>) and two conditions sharing a colour (OPX reassigns colours). OPX's own errors are mapped to actionable tool errors.

What is drawn is what the XML says: the name under a symbol is <first_name>, the text under it is <comments>, ages come from <age>, and each distinct condition is drawn with its name and diagnosis age (atdiag="41 yrs" gives "Breast cancer dx 41y"; do not repeat it in <comments>) and gets its own colour in the fill and the legend. The page is loaded with OPX's own label preference showDisorders on, and all requests other than to the local static server are blocked.

Development

npm install
npm test            # vitest (renderer tests need a Chromium, see above)
npx tsc --noEmit
npm run lint

References

License

MIT for this code. vendor/opx/ is LGPL-2.1, unmodified (see NOTICE).

Available Tools

2 tools
generate_pedigreeA

Generates a pedigree tree (Bennett 2008 standard) in PNG or SVG format. IMPORTANT: Use mother/father for ALL individuals with known parents - siblings share same parents. Only use top_level:true for founders with NO known parents.

Inputs: dataset (required), width, height, symbol_size, +3 more.

get_pedigree_documentationA

Returns comprehensive documentation for the pedigree data format. ALWAYS call this first before generating a pedigree to understand the required data structure, properties, and examples.

Inputs: no named parameters.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.2/5.0

    Scored across 2 tools

    Disambiguation5/5

    The two tools have completely distinct purposes: one generates a pedigree tree in visual formats, while the other provides documentation about the data format. There is no overlap in functionality, making it impossible for an agent to confuse them.

    Naming Consistency5/5

    Both tools follow a consistent verb_noun naming pattern (generate_pedigree, get_pedigree_documentation) with clear, descriptive names that align well with their functions. There are no deviations or mixed conventions.

    Tool Count2/5

    With only two tools, the server feels under-scoped for a pedigree domain, which typically involves more operations like data validation, editing, or querying. While the tools cover core tasks, the count is too low for comprehensive coverage.

    Completeness2/5

    The server lacks essential operations for a pedigree system, such as creating, updating, or deleting pedigree data, validating input, or querying specific individuals. The tools only handle generation and documentation, leaving significant gaps that will likely cause agent failures in real-world workflows.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to create, edit, and query genealogical data from GEDCOM files. Supports complex genealogy searches, automatic data enrichment from web sources, relationship analysis, and biography generation for individuals and families.
      17
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to interact with Gramps genealogy databases for intelligent family tree research and management. Provides comprehensive tools for searching family data, creating records, analyzing relationships, and tracking genealogy research through natural language.
      53
      AGPL 3.0
    • A
      license
      A
      quality
      B
      maintenance
      Enables AI assistants to read and write a self-hosted Gramps Web family tree through the REST API, creating facts with citations attached and auditing unsourced or duplicate data with 83 evidence-disciplined tools. It also exposes legacy GEDCOM exports as a read-only reference layer of untrusted hints, with living-person privacy filtering on by default.
      97
      29 PyPI
      MIT