A Model Context Protocol (MCP) server that exposes the Gramps Web HTTP API as a set of MCP tools for AI assistants.
- Complete CRUD operations for People, Families, Events, and Places
- Tree navigation helpers (ancestors, descendants, family relationships)
- Health checking and API metadata
- Read-only mode support
- Comprehensive error handling with structured MCP errors
- Full TypeScript implementation with Zod schema validation
# Install dependencies
pnpm install
# Build the project
pnpm run buildConfigure via environment variables:
GRAMPS_WEB_BASE_URL(required) - Base URL of Gramps Web API (e.g.,https://my-gramps/api)GRAMPS_WEB_AUTH(recommended) - Username and password inusername:passwordformat; uses JWT token flow with automatic refreshGRAMPS_WEB_API_TOKEN(optional) - Static bearer token (bypasses JWT flow)GRAMPS_WEB_TREE_ID(optional) - Default tree ID if API supports multiple treesGRAMPS_WEB_REQUEST_TIMEOUT_MS(optional, default: 15000) - HTTP timeout in millisecondsGRAMPS_WEB_VERIFY_TLS(optional, default: true) - Set to "false" to disable TLS verificationGRAMPS_WEB_READ_ONLY(optional, default: false) - Set to "true" to disable mutation operations
# Start the server (uses stdio transport)
node dist/index.js# Use the CLI version for OpenClaw integration
node dist/cli.js# Run in development mode
pnpm run dev
# Type check without building
pnpm run typecheckgramps_health- Check API connectivity and get metadata
gramps_list_people- List people with filters and paginationgramps_get_person- Get person by handle or Gramps IDgramps_search_people- Full-text search across peoplegramps_create_person- Create new person recordgramps_update_person- Update existing persongramps_delete_person- Delete person by handle
gramps_list_families- List family unitsgramps_get_family- Get family by handle or Gramps IDgramps_create_family- Create family linking parents and childrengramps_update_family- Update family relationships
gramps_list_events- List events with optional type filtergramps_get_event- Get event by handle or Gramps IDgramps_create_event- Create new event record
gramps_list_places- List places with optional query filtergramps_get_place- Get place by handle or Gramps IDgramps_create_place- Create new place record
gramps_get_person_with_family- Get person with immediate family recordsgramps_get_ancestors- Get ancestors up to specified generationsgramps_get_descendants- Get descendants up to specified generations
The server maps HTTP errors to structured MCP errors:
NOT_FOUND- Resource not found (HTTP 404)VALIDATION- Invalid input or validation error (HTTP 400, 422)AUTH- Authentication/authorization error (HTTP 401, 403)SERVER- Server error or network issues (HTTP 5xx, timeouts)
ISC