You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
14
14
15
15
In this specific example, we work with a knowledge assistant that can help with
16
16
17
17
1. **Employees & talent:** Skills analysis, talent search, and team formation
18
18
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.
20
20
21
-
== Graph & MCP Server Setup
21
+
== Setup
22
22
23
-
The Setup for this example is split into 2 steps:
23
+
The setup for this example is split into 2 steps:
24
24
25
25
1. Graph & MCP Server Setup
26
26
2. MCP Client Configuration
27
27
28
28
=== 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:
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.
35
35
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**.
37
37
38
-
After this you can do the following:
38
+
After this, you can do the following:
39
39
40
40
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.
41
41
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.
44
43
45
44
=== 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.
<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 expertcrafted 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. )
92
91
<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.
94
93
95
94
96
95
the `*-cypher` servers use the already available https://github.com/neo4j-contrib/mcp-neo4j/tree/main/servers/mcp-neo4j-cypher[`mcp-neo4j-cypher`].
97
96
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.
100
98
101
99
== Sample Questions
102
100
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?
104
106
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.
106
108
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.
108
110
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