Skip to content

Commit daa3424

Browse files
Merge pull request #386 from neo4j-documentation/mcp-employee-customer
Update MCP Employee Customer Example
2 parents 14568c2 + 74692ca commit daa3424

File tree

2 files changed

+60
-58
lines changed

2 files changed

+60
-58
lines changed
-38.3 KB
Loading

modules/genai-ecosystem/pages/mcp-employee-customer.adoc

Lines changed: 60 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -9,101 +9,103 @@ include::_graphacademy_llm.adoc[]
99
:page-product: mcp-employee-customer
1010

1111
image::mcp-customer-employee.png[align=center]
12-
This is a context engineering example demonstrating how to create intelligent agents across multiple business domains with graph databases and model context protocol (MCP). Graph Databases represent context & associated metadata in an optimal matter, enabling agents to better decompose tasks and use mcp servers to execute intelligent workflows across multiple data sources.
13-
GraphRAG is involved in this process - as tools focus on graph retrieval, but think of graph context as a sort of meta-GraphRAG process. We aren't just telling agents how to retrieve data, we are guiding them over how to reason about what context to use.
12+
This is a context engineering example demonstrating how to create intelligent agents across multiple business domains with graph databases and model context protocol (MCP). Graph Databases represent context & associated metadata in an optimal manner, enabling agents to better decompose tasks and use MCP servers to execute intelligent workflows across multiple data sources.
13+
GraphRAG is involved in this process, as tools focus on graph retrieval, but think of graph context as a sort of meta-GraphRAG process. We aren't just telling agents how to retrieve data; we are guiding them on how to reason about what tools, metadata, and queries (a.k.a context) to use.
1414

1515
In this specific example, we work with a knowledge assistant that can help with
1616

1717
1. **Employees & talent:** Skills analysis, talent search, and team formation
1818
2. **Customer experience:** Analyze & understand customer purchasing behavior & journeys. Specifically for a retail store in this example.
19-
3. **Identifying risks & making recommendations:** Putting the above together to understanding opportunities, costs, and make project and resourcing recommendations to improve ROI, reduce churn, etc.
19+
3. **Identifying risks & making recommendations:** Putting the above together to understand opportunities, costs, and make project and resourcing recommendations to improve ROI, reduce churn, etc.
2020
21-
== Graph & MCP Server Setup
21+
== Setup
2222

23-
The Setup for this example is split into 2 steps:
23+
The setup for this example is split into 2 steps:
2424

2525
1. Graph & MCP Server Setup
2626
2. MCP Client Configuration
2727

2828
=== Graph & MCP Server Setup
29-
For this example, you will need to setup 2 knowledge graphs, and we will use the below two separate projects for the respective graphs:
30-
29+
For this example, you will need to set up 2 knowledge graphs using the two separate projects below:
3130

3231
1. https://github.com/neo4j-product-examples/neo4j-employee-graph/tree/mcp-toolbox[Employee Graph]
3332
2. https://github.com/neo4j-product-examples/demo-cx/tree/mcp-example/mcp-tools-subgraph[Customer Graph]
3433

34+
While these demos were built separately, not under the assumption they come from the same company, we will treat them as if they do here to demonstrate how this works over multiple domains.
3535

36-
For each graph you will need a respective Neo4j database. You can create Neo4j AuraDB instances at https://console.neo4j.io/. You can use the Aura Pro free trial for the customer graph and Aura free for the employee graph. During setup, you'll download a credentials file needed for later configuration. **Remember to make 2 databases**.
36+
For each graph, you will need a respective Neo4j database. You can create Neo4j AuraDB instances at https://console.neo4j.io/. You can use the Aura Pro Free Trial for the customer graph and Aura Free for the employee graph. During setup, you'll download a credentials file needed for later configuration. **Remember to make 2 databases**.
3737

38-
After this you can do the following:
38+
After this, you can do the following:
3939

4040
1. For the Employee graph, run the 4 module notebooks in order (modules 1, 2, 3 & 4) from https://github.com/neo4j-product-examples/neo4j-employee-graph/tree/mcp-toolbox[this GitHub repo branch]. See the directions for deploying MCP Toolbox at the end of the module 4 notebook as well.
4141

42-
2. For the Customer graph, see the readme in https://github.com/neo4j-product-examples/demo-cx/tree/mcp-example/mcp-tools-subgraph[this GitHub repo branch] for instructions. You will run a notebook and some similar scripts to get MCP Toolbox servers deployed.
43-
42+
2. For the Customer graph, see the readme in https://github.com/neo4j-product-examples/demo-cx/tree/mcp-example/mcp-tools-subgraph[this GitHub repo branch] for instructions. You will run a notebook and some similar scripts to deploy MCP Toolbox servers.
4443

4544
=== MCP Client Configuration
46-
You will leverage 4 MCP servers for this example. You can use any https://modelcontextprotocol.io/clients[MCP client], but here we will assume [https://claude.ai/downloadClaude Desktop] for which you would use the below configuration. See https://modelcontextprotocol.io/quickstart/user#installing-the-filesystem-server[MCP Desktop instructions] for more details on how to set this up. Other client configurations will vary, please see their associated docs.
45+
You will leverage 4 MCP servers for this example, which were configured above in the respective repos. You can use any https://modelcontextprotocol.io/clients[MCP client], but here we will assume [https://claude.ai/downloadClaude Desktop] for which you would use the below configuration. See https://modelcontextprotocol.io/quickstart/user#installing-the-filesystem-server[MCP Desktop instructions] for more details on how to set this up. Other client configurations may vary; please refer to their associated documentation.
4746
[source,json]
4847
----
4948
{
50-
"mcpServers": {
51-
"employee-cypher": { <1>
52-
"command": "uvx",
53-
"args": [
54-
"mcp-neo4j-cypher"
55-
],
56-
"env": {
57-
"NEO4J_URI":"neo4j+s://xxxxxxxx.databases.neo4j.io",
58-
"NEO4J_USERNAME":"neo4j",
59-
"NEO4J_PASSWORD": "xxxxxxxxxxxx"
60-
}
61-
},
62-
"employee-tools": { <2>
63-
"command": "npx",
64-
"args": [
65-
"mcp-remote",
66-
"https://employee-toolbox-xxxxxxxxxxxx.us-central1.run.app/mcp"
67-
]
68-
},
69-
"customer-cypher": { <3>
70-
"command": "uvx",
71-
"args": [
72-
"mcp-neo4j-cypher"
73-
],
74-
"env": {
75-
"NEO4J_URI":"neo4j+s://xxxxxxxx.databases.neo4j.io",
76-
"NEO4J_USERNAME":"neo4j",
77-
"NEO4J_PASSWORD": "xxxxxxxxxxxx"
78-
}
79-
},
80-
"customer-tools": { <4>
81-
"command": "npx",
82-
"args": [
83-
"mcp-remote",
84-
"https://customer-toolbox-xxxxxxxxxxxx.us-central1.run.app/mcp"
85-
]
86-
}
87-
}
49+
"mcpServers": {
50+
"employee-cypher": { <1>
51+
"command": "uvx",
52+
"args": [
53+
"mcp-neo4j-cypher"
54+
],
55+
"env": {
56+
"NEO4J_URI":"neo4j+s://xxxxxxxx.databases.neo4j.io",
57+
"NEO4J_USERNAME":"neo4j",
58+
"NEO4J_PASSWORD": "xxxxxxxxxxxx"
59+
}
60+
},
61+
"employee-tools": { <2>
62+
"command": "npx",
63+
"args": [
64+
"mcp-remote",
65+
"https://employee-toolbox-xxxxxxxxxxxx.us-central1.run.app/mcp"
66+
]
67+
},
68+
"customer-cypher": { <3>
69+
"command": "uvx",
70+
"args": [
71+
"mcp-neo4j-cypher"
72+
],
73+
"env": {
74+
"NEO4J_URI":"neo4j+s://xxxxxxxx.databases.neo4j.io",
75+
"NEO4J_USERNAME":"neo4j",
76+
"NEO4J_PASSWORD": "xxxxxxxxxxxx"
77+
}
78+
},
79+
"customer-tools": { <4>
80+
"command": "npx",
81+
"args": [
82+
"mcp-remote",
83+
"https://customer-toolbox-xxxxxxxxxxxx.us-central1.run.app/mcp"
84+
]
85+
}
86+
}
8887
}
8988
----
9089
<1> `employee-cypher`: Enables the client (AI agent) to get the schema and execute its own Cypher (graph queries) against the employee graph
91-
<2> `employee-tools`: Provides specific Cypher templates to the AI agent. Think of these as expert crafted tools for finding similarities and summaries of employees and talent which can accept arguments/parameters from the agent (such as employee names, skill types, domains, etc. )
90+
<2> `employee-tools`: Provides specific Cypher templates to the AI agent. Think of these as expert-crafted tools for finding similarities and summaries of employees and talent, which can accept arguments/parameters from the agent (such as employee names, skill types, domains, etc. )
9291
<3> `customer-cypher`: Like `employee-cypher` enables the client (AI agent) to get the schema and execute its own Cypher (graph queries) against the customer graph.
93-
<4> `customer-tools`: Similar to `employee-tools` provides specific Cypher templates to the AI agent but to access the customer graph.
92+
<4> `customer-tools`: Similar to `employee-tools`, provides specific Cypher templates to the AI agent but to access the customer graph.
9493

9594

9695
the `*-cypher` servers use the already available https://github.com/neo4j-contrib/mcp-neo4j/tree/main/servers/mcp-neo4j-cypher[`mcp-neo4j-cypher`].
9796

98-
The `*-tool` servers use Google MCP Toolbox to create servers with parameterized Cypher templates. The code for doing so is located in the respective repositories below
99-
97+
The `*-tool` servers come from https://neo4j.com/blog/developer/ai-agents-gen-ai-toolbox/[Google MCP Toolbox] to create servers with parameterized Cypher templates. These were covered and created in the above sections in each respective repository.
10098

10199
== Sample Questions
102100

103-
Below are some sample questions you can ask via Claude Desktop or your chosen client
101+
Below are some sample questions you can ask via Claude Desktop or your chosen client:
102+
103+
1. How many of our employees are familiar with Python?
104+
105+
2. Who is most similar to Lucas Martinez and why?
104106

105-
1. Can you summarize my technical talent and skills distribution? Feel free to include simple graphics.
107+
3. Can you summarize my technical talent and skills distribution? Feel free to include simple graphics.
106108

107-
2. Let's switch focus to our customers. Can you tell me about my customer purchase patterns and segments? What does my churn risk look like? Feel free to include simple graphics.
109+
4. Let's switch focus to our customers. Can you tell me about my customer purchase patterns and segments? What does my churn risk look like? Feel free to include simple graphics.
108110

109-
3. Who from our team can I put on this to figure out the right type of outreach? Can you write a brief project proposal?
111+
5. Who from our team can I put on this to figure out the right type of outreach? Can you write a brief project proposal?

0 commit comments

Comments
 (0)