家谱数据管理服务

一个用于与Gramps Web家谱API交互的MCP服务器,支持搜索、检索和创建家谱记录。

  • by nikkoxgonzales
  • TypeScript
  • 本地部署
  • 4 星标
  • 更新于
在 GitHub 查看 nikkoxgonzales/mcp-grampsweb

使用说明

mcp-grampsweb

用于与以下对象交互的MCP(模型上下文协议)服务器 Gramps Web 谱系API。这允许像Claude这样的人工智能助手在Gramps Web实例中搜索、检索和创建家谱记录。

安装

npx mcp-grampsweb

或全局安装:

npm install -g mcp-grampsweb

配置

服务器需要以下环境变量:

变量 描述 必填
GRAMPS_API_URL Gramps Web实例的基本URL(例如。, https://gramps.example.com) 是
GRAMPS_USERNAME 您的Gramps Web用户名 是
GRAMPS_PASSWORD 您的Gramps Web密码 是
GRAMPS_TREE_ID 多树实例的树ID(请求使用 /api/trees/{id}/...) 没有

使用Claude Desktop

将以下内容添加到您的Claude Desktop配置文件中:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json 视窗: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "grampsweb": {
      "command": "npx",
      "args": ["mcp-grampsweb"],
      "env": {
        "GRAMPS_API_URL": "https://your-gramps-web.com",
        "GRAMPS_USERNAME": "your-username",
        "GRAMPS_PASSWORD": "your-password",
        "GRAMPS_TREE_ID": "optional-tree-id"
      }
    }
  }
}

可用工具

搜索与检索

工具 说明
gramps_search 基于GQL的任何实体类型(人、家庭、事件、地点等)的搜索
gramps_find 在所有记录中进行全文搜索
gramps_get 通过句柄或Gramps ID获取完整的实体详细信息

数据管理

工具 说明
gramps_create_person 创建新的人员记录
gramps_create_family 创建新的家庭单位
gramps_create_event 创造一个新的生活事件(出生、死亡、婚姻等)
gramps_create_place 创建新的地理位置
gramps_create_source 创建新的源文档
gramps_create_citation 创建新引用
gramps_create_note 创建新的文本注释
gramps_create_media 创建新的媒体对象
gramps_create_repository 创建新存储库

分析

工具 说明
gramps_tree_stats 获取树统计信息(所有实体类型的计数)
gramps_get_ancestors 查找一个人的祖先(最多10代)
gramps_get_descendants 查找一个人的后代(最多10代)
gramps_recent_changes 获取最近修改的记录

例子

搜索具有特定姓氏的人

Use gramps_search to find people with surname "Smith"

获取某人的祖先

Find the ancestors of person with handle "abc123" going back 4 generations

创建新用户

Create a person named John Smith, male gender

发展

# Clone the repository
git clone https://github.com/nikkoxgonzales/mcp-grampsweb.git
cd mcp-grampsweb

# Install dependencies
npm install

# Build
npm run build

# Run tests
npm test

# Run in development mode
npm run dev

MCP检验员测试

npx @modelcontextprotocol/inspector node dist/index.js

许可证

麻省理工学院