- Explore MCP Servers
- family_tree_mcp_demo
Family Tree Mcp Demo
What is Family Tree Mcp Demo
family_tree_mcp_demo is a Model Context Protocol (MCP) server designed for exploring and querying a fictitious family tree. It is built using C# and .NET, providing functionalities for managing family members and their relationships.
Use cases
Use cases include visualizing family trees, conducting relationship analyses, developing family-related applications, and serving as a backend for family history websites.
How to use
To use family_tree_mcp_demo, clone the repository and run the web server to provide JSON data. Then, you can run either the Semantic Kernel based client or the Microsoft.Extensions.AI based client to interact with the MCP server.
Key features
Key features include listing all family members, querying individual members by ID, analyzing relationships such as parents, children, and spouses, and the ability to easily extend the server with new tools.
Where to use
family_tree_mcp_demo can be used in educational settings, family research projects, genealogy studies, and as a demonstration tool for MCP server capabilities.
Overview
What is Family Tree Mcp Demo
family_tree_mcp_demo is a Model Context Protocol (MCP) server designed for exploring and querying a fictitious family tree. It is built using C# and .NET, providing functionalities for managing family members and their relationships.
Use cases
Use cases include visualizing family trees, conducting relationship analyses, developing family-related applications, and serving as a backend for family history websites.
How to use
To use family_tree_mcp_demo, clone the repository and run the web server to provide JSON data. Then, you can run either the Semantic Kernel based client or the Microsoft.Extensions.AI based client to interact with the MCP server.
Key features
Key features include listing all family members, querying individual members by ID, analyzing relationships such as parents, children, and spouses, and the ability to easily extend the server with new tools.
Where to use
family_tree_mcp_demo can be used in educational settings, family research projects, genealogy studies, and as a demonstration tool for MCP server capabilities.
Content
Family Tree MCP Demo
This project provides a Model Context Protocol (MCP) server for exploring and querying a ficticious family tree. It is implemented in C# using .NET, and exposes tools for retrieving/adding/updating 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
family_tree_mcp_demo/
family_webapi/
– a super simple webservice that returns JSON datamcp_server/
– a console based (stdio) server to use with MCP clients like VSCode/Claude.mcp_client_meai/
– a MCP client that uses Microsoft.Extensions.AImcp_client_sk/
– a MCP client that uses Semantic Kernelmcp_tests/
– unit tests for the service and toolsmcp_webapi/
– not used in the MCP server, but useful for demos.
Create a .vscode/mcp.json
MCP server configuration when you use VSCode as your client. (Can be adapted to Claude as well.)
{
"servers": {
"my-mcp-server-abc123": {
"type": "stdio",
"command": "dotnet",
"args": [
"run",
"--project",
"<your_path>\\mcp_server\\mcp_server.csproj"
]
}
}
}
Getting Started
Prerequisites
Running the MCP Client
-
Clone the repository:
git clone https://github.com/AlfredBr/family_tree_mcp_demo.git
-
Run the web server that provides the json data:
dotnet run --project family_tree_mcp_demo/family_webapi/family_webapi.csproj
-
Run the Semantic Kernel based client:
dotnet run --project family_tree_mcp_demo/mcp_client_sk/mcp_client_sk.csproj
or the Microsoft.Extensions.AI based client:
dotnet run --project family_tree_mcp_demo/mcp_client_meai/mcp_client_meai.csproj
-
Or you can just run the server and use VSCode as your client:
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.