Gramps MCP MCP Server

v0.2.1
io.github.oliverhruby/gramps-mcp Checked 20 hours ago Published 1 month ago

MCP server for Gramps genealogy via the Gramps Web API: CRUD, search, merge, timelines, DNA.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

ping

Health check. Read-only. Args: (none) Returns: dict: {"pong": true, "version": <server version>}.

get_instances

List the configured target instances. Read-only. Args: (none) Returns: dict: {"instances": [<base url>, ...], "scope": "<value of GRAMPS_MCP_INSTANCES, or 'auto-discovery' when unset>"}.

manage_person

Create, read, update or delete Gramps Person records. Writes: create, update, delete. `action=get` lists people (`handle` empty, paginated) or returns one person (`handle` set, `?profile=&extend=` via `query`). `action=create` posts a full Person JSON object in `data` (handles are assigned by the server). `action=update` PUTs `data` to /people/<handle>; `action=delete` removes it. Person payload fields follow the Gramps schema (gramps_id, gender, primary_name, names, event_ref_list, family_list, person_ref_list, attribute_list, media_list, address_list, url_list, n…

ParameterTypeDescription
action *string
dataobject
handlestring
instancestring
queryobject

manage_family

Create, read, update or delete Gramps Family records. Writes: create, update, delete. `action=get` lists families (`handle` empty) or returns one family by handle. `action=create` posts a full Family JSON object in `data`; `action=update` PUTs `data` to /families/<handle>; `action=delete` removes it. Family payload fields: gramps_id, father_handle, mother_handle, child_ref_list, event_ref_list, attribute_list, media_list, note_list, change, relationship, ... . Creating a family rewrites its parents' and children's person records, so it requires edit + add permissio…

ParameterTypeDescription
action *string
dataobject
handlestring
instancestring
queryobject

manage_event

Create, read, update or delete Gramps Event records. Writes: create, update, delete. `action=get` lists events (`handle` empty) or returns one event by handle. `action=create` posts a full Event JSON object in `data`; `action=update` PUTs `data` to /events/<handle>; `action=delete` removes it. Event payload fields: gramps_id, type, date, description, place, citations, notes, attribute_list, media_list, change, ... . Events are typically referenced by Person/Family event_ref_list entries. Args: action: The operation, "get", "create", "update" or "delete".…

ParameterTypeDescription
action *string
dataobject
handlestring
instancestring
queryobject

manage_place

Create, read, update or delete Gramps Place records. Writes: create, update, delete. `action=get` lists places (`handle` empty) or returns one place by handle. `action=create` posts a full Place JSON object in `data`; `action=update` PUTs `data` to /places/<handle>; `action=delete` removes it. Place payload fields: gramps_id, name, type, longitude, latitude, alt_names, place_ref_list, enclosed_by, media_list, note_list, change, ... . Use manage_place with a filter query instead of search when you need raw object data rather than full-text hits. Args: a…

ParameterTypeDescription
action *string
dataobject
handlestring
instancestring
queryobject

manage_source

Create, read, update or delete Gramps Source records. Writes: create, update, delete. `action=get` lists sources (`handle` empty) or returns one source by handle. `action=create` posts a full Source JSON object in `data`; `action=update` PUTs `data` to /sources/<handle>; `action=delete` removes it. Source payload fields: gramps_id, title, author, pubinfo, abbrev, reporef_list, media_list, note_list, change, ... . Citations of a source are managed with manage_citation. Args: action: The operation, "get", "create", "update" or "delete". handle: Sourc…

ParameterTypeDescription
action *string
dataobject
handlestring
instancestring
queryobject

manage_citation

Create, read, update or delete Gramps Citation records. Writes: create, update, delete. `action=get` lists citations (`handle` empty) or returns one citation by handle. `action=create` posts a full Citation JSON object in `data`; `action=update` PUTs `data` to /citations/<handle>; `action=delete` removes it. Citation payload fields: gramps_id, source_handle, date, page, confidence, note_list, media_list, change, ... . Attach a citation to a Person/Family/Event by adding its handle to that object's citation_list. Args: action: The operation, "get", "create"…

ParameterTypeDescription
action *string
dataobject
handlestring
instancestring
queryobject

manage_note

Create, read, update or delete Gramps Note records. Writes: create, update, delete. `action=get` lists notes (`handle` empty) or returns one note by handle. `action=create` posts a full Note JSON object in `data`; `action=update` PUTs `data` to /notes/<handle>; `action=delete` removes it. Note payload fields: gramps_id, type, text, format, note_list, change, ... . Notes are referenced by other objects' note_list fields; DNA match segment strings live in notes (see analyze_dna). Args: action: The operation, "get", "create", "update" or "delete". han…

ParameterTypeDescription
action *string
dataobject
handlestring
instancestring
queryobject

manage_media

Manage Gramps Media objects and their files. Writes: create, update, delete, upload. Standard CRUD via /media/ plus binary operations: get/create/update/delete -> as in manage_person (GET/POST/PUT/DELETE). upload -> POST /media/ streaming `file_path` bytes with `mime_type` (required); the API computes the checksum and creates the Media row. file -> GET /media/<handle>/file; returns base64 bytes. thumbnail -> GET /media/<handle>/thumbnail/<s…

ParameterTypeDescription
action *string
dataobject
file_pathstring
handlestring
instancestring
mime_typestring
queryobject
sizeinteger

manage_repository

Create, read, update or delete Gramps Repository records. Writes: create, update, delete. `action=get` lists repositories (`handle` empty) or returns one by handle. `action=create` posts a full Repository JSON object in `data`; `action=update` PUTs `data` to /repositories/<handle>; `action=delete` removes it. Repository payload fields: gramps_id, type, name, address_list, url_list, note_list, change, ... . Sources link to a repository through their reporef_list entry. Args: action: The operation, "get", "create", "update" or "delete". handle: Repos…

ParameterTypeDescription
action *string
dataobject
handlestring
instancestring
queryobject

manage_tag

Create, read, update or delete Gramps Tag records. Writes: create, update, delete. Tags are lightweight labels attachable to any object. `action=get` lists tags (`handle` empty) or returns one by handle; `action=create` posts a Tag JSON object (`name` required) in `data`; `action=update` PUTs `data` to /tags/<handle>; `action=delete` removes it. To tag an object, reference the tag handle in that object's `tag_list`. Args: action: The operation, "get", "create", "update" or "delete". handle: Tag handle; required for get-one, update, delete. data…

ParameterTypeDescription
action *string
dataobject
handlestring
instancestring
queryobject

merge_objects

Merge two Gramps objects of the same type into one. Writes: merge. `handle1` (the "phoenix") survives; `handle2` (the "titanic") is absorbed and deleted. Supported obj_type values: person, family, event, place, source, citation, repository, media, note. Person merges accept {"family_merger": bool} in `data`; family merges accept {"phoenix_father_handle", "phoenix_mother_handle"}. Requires edit+delete permissions upstream. For duplicate handling of other object types, use manage_* to probe first, then merge_objects to combine. Args: obj_type: Object typ…

ParameterTypeDescription
handle1 *string
handle2 *string
obj_type *string
dataobject
instancestring

get_timeline

Chronological event timeline for a person, family, or the whole tree. Read-only. `kind=person` -> /people/<handle>/timeline; `kind=family` -> /families/<handle>/timeline; `kind=people` and `kind=families` return tree-wide timelines (no handle). Events can be grouped into generations (`ancestors`/`offspring`), filtered by event class (`event_classes` via `query`), and paged (`page`/`pagesize`). Args: kind: "person", "family", "people" or "families". handle: Person/family handle; required for kinds 'person' and 'family'. page: 1-based page of the…

ParameterTypeDescription
kind *string
ancestorsinteger
discard_emptyboolean
handlestring
instancestring
keysstring
offspringinteger
omit_anchorboolean
pageinteger
pagesizeinteger
precisioninteger
queryobject
ratingsboolean
skipkeysstring
stripboolean

get_relation

Compute a genealogical relationship between two people. Read-only. Without `all`, returns the shortest/most direct relationship (relationship string plus distances). With `all=true`, lists every possible relationship, including common ancestors per path. Uses /relations/<h1>/<h2> or /relations/<h1>/<h2>/all with an optional `depth` cap on generations. Args: handle1: First person handle. handle2: Second person handle. all: If true, return all possible relationships (and ancestors). depth: Maximum generations to search for a common ancestor (…

ParameterTypeDescription
handle1 *string
handle2 *string
allboolean
depthinteger
instancestring

get_living

Estimate whether (or until when) a person is alive. Read-only. `mode=status` returns {"living": bool} from /living/<handle>; `mode=dates` returns probable birth/death date estimates plus an explanation from /living/<handle>/dates. Tune the heuristic with the three optional integer parameters (upstream defaults: 20 / 110 / 20). Args: handle: Person handle. mode: "status" (default) or "dates". average_generation_gap: Average years between generations (>= 1). max_age_probably_alive: Max age in years still considered alive (>= 1). max_s…

ParameterTypeDescription
handle *string
average_generation_gapinteger
instancestring
max_age_probably_aliveinteger
max_sibling_age_differenceinteger
modestring

analyze_dna

DNA match analysis and raw match-string parsing. Writes: parse only. Actions: matches -> GET /people/<handle>/dna/matches; per-match relationship, segments, common-ancestor profiles and citation-linked notes. ydna -> GET /people/<handle>/ydna; Y-DNA haplogroup clade lineage. parse -> POST /parsers/dna-match with `data` = the raw DNA match text (e.g. 23andMe/Ancestry segment blocks); returns parsed segments. `matches` accepts `raw=true` to include the raw segment strings. Matches are stored as "DNA" associations plus notes; s…

ParameterTypeDescription
action *string
datastring
handlestring
instancestring
rawboolean

manage_import

List importers or import a family tree file (Gramps XML, GEDCOM...). Writes: file, restore. `action=list` returns every available importer (GET /importers/); `action=info` describes one importer (GET /importers/<extension>); `action=file` uploads `file_path` to /importers/<extension>/file (raw body, extension picks the importer) and returns the import counts; `action=restore` resets the tree to match an uploaded Gramps backup via /importers/<extension>/file/restore (replaces all content; requires batch delete permission). Use `dry_run=true` on file/restore to previ…

ParameterTypeDescription
action *string
dry_runboolean
extensionstring
file_pathstring
instancestring

manage_export

List exporters or produce an export file (GEDCOM, Gramps XML...). Writes: run. `action=list` returns every available exporter (GET /exporters/); `action=info` describes one exporter (GET /exporters/<extension>); `action=run` starts an asynchronous export (POST /exporters/<extension>/file) and returns a task reference (poll with manage_transaction or re-call to fetch); `action=file` runs a synchronous export (GET /exporters/<extension>/file) and returns the file as base64. Exports run on the whole tree unless filtered; pass `options` as a dict of query params: compr…

ParameterTypeDescription
action *string
extensionstring
instancestring
optionsobject

manage_report

List, configure or generate Gramps reports (PDF, text, web...). Writes: run. `action=list` returns all available reports (GET /reports/); `action=info` describes one report and its options (GET /reports/<id>); `action=run` generates a report in the background (POST /reports/<id>/file?options=<json>) returning a task reference; `action=file` generates it synchronously (GET /reports/<id>/file) and returns the produced file as base64; `action=result` downloads a previously generated file by `filename` (pass via `options` or a separate call: GET /reports/<id>/file/…

ParameterTypeDescription
action *string
include_helpboolean
instancestring
localestring
optionsobject
report_idstring

manage_transaction

Apply raw DB transactions, undo history, or bulk create/delete. Writes: all actions. Low-level database operations that the object endpoints cannot express: apply -> POST /transactions/ replaying `payload` (a raw transaction dict of {add, update, delete} operations). undo -> POST /transactions/?undo=1 applying the inverse of `payload`; pass a recent transaction to revert it. history -> GET /transactions/history/ (list of past transactions). history_id -> GET /transactions/hist…

ParameterTypeDescription
action *string
handlesarray
instancestring
namespacestring
paramsobject
payloadobject
transaction_idinteger

manage_user

Administer Gramps Web users. Writes: create, update, delete, change_password. `action=list` lists users (GET /users/); `action=get` returns one user by name; `action=create` POSTs `data` (full_name, email, password, role and tree required by the API) to /users/; `action=update` PUTs `data` (role, email, full_name, name_new, tree) to /users/<user_name>/; `action=delete` removes the user; `action=change_password` POSTs with data = {"old_password", "new_password"}. Requires owner/admin permissions upstream for most actions. Args: action: "list", "get", "creat…

ParameterTypeDescription
action *string
dataobject
instancestring
user_namestring

manage_tree

Inspect or administer Gramps Web family trees. Writes: create, update, disable, enable, repair, migrate, verify, config_set. `action=list` lists trees (GET /trees/); `action=get` inspects one tree (tree_id '-' means the current tree); `action=create` adds a tree (data = {"name": <required>, "quota_media", "quota_people", "min_role_ai"}); `action=update` renames/rescales a tree; `action=disable`/`action=enable` toggle login for a tree; `action=repair` checks/repairs its database; `action=migrate` upgrades its schema; `action=verify` runs integrity checks; `action=co…

ParameterTypeDescription
action *string
dataobject
instancestring
tree_idstring

manage_bookmark

Read or edit bookmarks per object namespace. Writes: add, remove. Bookmarks are per-user, per-type handle shortcuts. `namespace` is one of: citations, events, families, media, notes, people, places, repositories, sources. `action=list_all` returns every namespace's bookmarks (GET /bookmarks/); `action=list` returns one namespace (GET /bookmarks/<ns>); `action=add` bookmarks a handle (PUT /bookmarks/<ns>/<handle>, idempotent); `action=remove` unbookmarks it (DELETE). Adding validates that the object exists. Args: namespace: Bookmark namespace (one of th…

ParameterTypeDescription
namespace *string
actionstring
handlestring
instancestring

manage_type

List Gramps type vocabularies (custom + default) for all object types. Read-only. Enumerates the controlled vocabularies used across the schema, e.g. event types, name types, place types, child reference types, gender types. `action=all` merges default and custom types (GET /types/); `action=defaults` lists every default vocabulary; `action=default` returns one vocabulary (e.g. 'event_types'); `action=default_map` returns its machine-readable mapping (standard key -> localized string); `action=customs` lists every custom vocabulary; `action=custom` returns one. Dat…

ParameterTypeDescription
actionstring
datatypestring
instancestring
localeboolean

get_server_info

Read Gramps Web server, database, locale and object-count metadata. Read-only. Wraps GET /metadata/: database id/name/type, Gramps + Gramps Web API + QL versions, locale, per-type object counts, tree researcher info, search index details, and server capabilities (multi-tree, task queue, OCR, semantic search, chat, face detection, thumbnails). When `surnames` is true, the response additionally lists every surname in the database. Args: surnames: If true, include the full list of surnames in the database. instance: Gramps Web base URL from get_instances;…

ParameterTypeDescription
instancestring
surnamesboolean