family-tree-mcp
Publishes an exported family tree site (a single read-only index.html) to a Cloudflare Pages project via wrangler, giving a free permanent https://.pages.dev link that can optionally be restricted with Cloudflare Access.
Generates Mermaid diagram source for the whole tree or a person's ancestors/descendants, and exports .mmd files with a mermaid.live link for downloading the chart as PNG/SVG/PDF.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@family-tree-mcpstart a tree with my parents Maria and José, and grandma Rosa on my mom's side"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
family-tree-mcp
An MCP server that lets any agent build family trees and reason about how people are related. Built with FastMCP.
Install
Requires uv. Add the server to your MCP client:
{
"mcpServers": {
"family-tree": {
"command": "uvx",
"args": ["--from", "git+https://github.com/jaiamin/family-tree-mcp", "family-tree-mcp"]
}
}
}For Claude Code:
claude mcp add family-tree -- uvx --from git+https://github.com/jaiamin/family-tree-mcp family-tree-mcpTrees are saved as JSON files in ~/.family-tree-mcp/. Set FAMILY_TREE_DIR to store them elsewhere. Every change keeps a backup of the previous version (the last 50 per tree), so undo can revert mistakes or restore a deleted tree.
Related MCP server: Gramps MCP
Model
A tree contains people. Each person has an id, a name, optional details (sex, birth_date, death_date, birth_place, notes), and two kinds of links:
parents: at most two per person, with cycles rejected.
partners: always recorded on both people, optionally with a status (
married,divorced,partners), marriage date and place, and divorce date.
Everything else (children, siblings, aunts, cousins, in-laws, step-relations) is derived from those links, so the data stays consistent and the agent never has to keep inverse relations in sync. Linking two people as sibling gives them the same parents, adding a placeholder parent when neither has one. Children and siblings are listed oldest first when birth dates are known.
Tools
Tool | Purpose |
| Manage trees |
| Revert the last change, or restore a deleted tree |
| Add a whole family and its links in one call |
| Manage one person |
| Combine a duplicate (or a placeholder parent) into one person |
| Link people as |
| Search by name to get ids |
| Details with parents, partners (and marriage details), children and siblings (half-siblings marked) |
| Name the relation, e.g. "Sam is Ava's first cousin once removed", "mother-in-law", "former stepfather" |
| Lineage grouped by generation |
| Mermaid chart of the whole tree or one person's ancestors/descendants |
| Save that chart as a |
| Save the tree as a GEDCOM file for other genealogy apps |
| Save a read-only, interactive web page of the tree to share as a link |
get_diagram returns Mermaid source, which Claude, ChatGPT, GitHub and most Markdown viewers render as a chart. Couples join at a dot above their children (with dotted lines once divorced), boxes are colored by sex (blue, pink, gray when unknown), deceased people are dashed and faded, and the focus person has an orange border.
export_gedcom writes a GEDCOM 5.5.1 file to ~/.family-tree-mcp/exports/, which Ancestry, FamilySearch, MyHeritage, Gramps and most other genealogy apps can import. The last word of a name becomes the surname, and dates that aren't ISO are kept as text.
Ask your agent something like "Start a tree for my family: my parents are Maria and José, and my grandmother on my mom's side is Rosa", then "How is Rosa related to my cousin Luis?"
Sharing a tree
export_html writes a single index.html to ~/.family-tree-mcp/exports/<tree>-site/. Viewers can browse the chart, tap anyone for their details, and pick two people to see how they're related. Nothing can be edited. By default, birth dates, birthplaces and notes are hidden for anyone who may be living: no death date, and not born over 100 years ago. The page also asks search engines not to index it.
To get a free, permanent link, publish the folder to Cloudflare Pages. This needs a free Cloudflare account, and you run the same command again after each re-export:
npx wrangler pages deploy ~/.family-tree-mcp/exports/<tree>-site --project-name <tree>The page is then at https://<tree>.pages.dev. Anyone with the link can view it. To limit it to specific people, turn on Cloudflare Access for the project (free for up to 50 users).
Updating
uvx caches the server, so refresh it after an update, then restart your MCP client:
uvx --refresh --from git+https://github.com/jaiamin/family-tree-mcp family-tree-mcpYour trees are not affected.
Development
uv sync
uv run pytest
uv run ruff format . && uv run ruff check . && uv run ty checkLicense
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Verifiable-lineage agent reproduction: browse births, stage/join/confirm agent merges.
Human Lineage MCP server — search and query the public genealogical graph of all humanity
Persistent memory and knowledge management for AI agents with semantic search and 50+ tools.
Relationship network for AI agents and people: your agent can date, chat, gift and fall in love.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables 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.17MIT
- AlicenseNot gradedqualityDmaintenanceEnables 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.45AGPL 3.0
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to query genealogy data from GEDCOM files with 24 tools for search, navigation, relationship analysis, and timeline events.1MIT
- AlicenseAqualityDmaintenanceReads and searches GEDCOM 5.5.1 files, enabling AI agents to look up individuals, families, sources, and multimedia references in a family tree.10MIT