family_tree_mcp_demo
0
The Family Tree MCP Demo is an MCP server that allows exploration and querying of family tree data. It supports operations like listing family members and analyzing relationships, implemented in C# using .NET.
Family Tree MCP Demo
This project provides a Model Context Protocol (MCP) server for exploring and querying a family tree. It is implemented in C# using .NET, and exposes tools for retrieving family members and their relationships.
Features
- List all people in the family tree
- Query individual family members by ID
- Analyze relationships (parents, children, spouses)
- Easily extendable with new tools
Project Structure
mcp/
— Main service codeFamilyService.cs
— Loads and serves family dataFamilyTools.cs
— MCP tools for querying the family treePerson.cs
— Data model for a personpeople.json
— Family data
mcp_tests/
— Unit tests for the service and tools.vscode/mcp.json
— MCP server configuration
Getting Started
Prerequisites
Running the MCP Server
-
Clone the repository:
git clone <your-repo-url> cd mcp
-
Run the server:
dotnet run --project mcp/mcp.csproj
or
Open 'mcp.json' in VSCode and select 'Start' to start the MCP server
The server will start and listen for MCP requests as configured in .vscode/mcp.json
.
Testing
Run all tests with:
cd mcp_tests
dotnet test
Sample Questions
Here are some example questions you can ask this MCP server:
- List all people in the family tree.
- Who are the parents of Elizabeth Carter?
- What are the names of all children of Margaret Carter?
- List all last names in the family tree.
- Who is the youngest male in the family?
- How old was Linda Carter when her child was born?
- Get the details of the person with ID
p5
. - Who are the spouses of Susan Smith?
- List all people born after 1980.
- What is the relationship between Emily Smith and William Carter?
License
MIT License
This project is intended for demonstration and educational purposes.