family_tree_mcp_demo
If you are the rightful owner of family_tree_mcp_demo and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
This project provides a Model Context Protocol (MCP) server for exploring and querying a fictitious family tree.
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.