home / mcp / tree analyzer mcp server

Tree Analyzer MCP Server

Provides family tree analysis, error detection, and report generation via the MCP protocol for genealogy data.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "ibarrajo-tree-analyzer-mcp": {
      "command": "python",
      "args": [
        "-m",
        "tree_analyzer_mcp.server"
      ]
    }
  }
}

You can run the Tree Analyzer MCP Server to perform family tree analysis, error detection, and report generation through the MCP protocol. It integrates with Claude Code and related tools to identify duplicates, validate timelines, check relationships, and surface missing sources, all while producing Markdown reports you can share or export.

How to use

To use the Tree Analyzer MCP Server, you connect your MCP client to the server using the standard MCP protocol. The server exposes a set of analysis tools that you can invoke through explicit function calls, each returning Markdown reports, timelines, and structured recommendations. Focus your usage on the most critical areas first, such as detecting name duplicates, validating timelines, and assessing source coverage, then move to comprehensive audits and targeted research leads.

How to install

Prerequisites you need before starting include Python 3.11 or newer and pip for package management.

Option 1 β€” Via Claude Desktop configuration (recommended for quick setup) : a configuration entry is added to your Claude Desktop config file as shown below.

{
  "mcpServers": {
    "tree-analyzer": {
      "command": "python",
      "args": ["-m", "tree_analyzer_mcp.server"],
      "cwd": "/path/to/tree-analyzer-mcp-standalone"
    }
  }
}

Option 2 β€” Via Docker

Run the MCP server in a container and mount your data directory to the container’s data path.

docker run -v /path/to/data:/app/data tree-analyzer-mcp

Option 3 β€” From source

Clone the repository, create a virtual environment, and install the package in editable mode.

git clone https://github.com/ibarrajo/tree-analyzer-mcp
cd tree-analyzer-mcp

# Create virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install in development mode
pip install -e ".[dev]"

Starting the MCP server

When starting from any installation method, use the final runtime command to run the MCP server. The following command starts the server in stdio mode and enables the protocol communication with an MCP client.

python -m tree_analyzer_mcp.server

Available tools

detect_name_duplicates

Find potential duplicate persons using fuzzy name matching with configurable surname focus and similarity threshold.

validate_timeline

Check for impossible dates, age issues, and parent-child age gaps across the tree.

check_relationships

Detect structural problems such as circular ancestry, orphans, and problematic marriages.

analyze_source_coverage

Identify persons or events missing source citations within a defined generational window.

generate_person_profile

Create a detailed Markdown profile for a single person, including facts, relationships, and sources.

generate_audit_report

Produce a comprehensive audit of the tree with statistics and recommendations.

generate_research_leads

Provide prioritized next steps for genealogy research based on current findings.

compare_persons

Deeply compare two persons to identify potential duplicates by combining multiple similarity criteria.