1. Install Meshagent CLI
    pip install "meshagent[all]"
    
  2. Sign Up and Authenticate with Meshagent
    Follow these instructions.
  3. Run the MCP Neo4j Memory Service in a Room
    meshagent service test --room=test --role=agent --image=meshagent/mcp-neo4j-memory:latest \
      --env MESHAGENT_PORT=8001 \
      --env NEO4J_URL=<bolt://host.docker.internal:7687> \
      --env NEO4J_USERNAME=<neo4j> \
      --env NEO4J_PASSWORD=<password> \
      --port="num=8001 path=/webhook liveness=/ type=meshagent.callable" \
      --name=mcp-neo4j-memory-service-test
    
    • This command starts a Meshagent Room containing a test MCP server tool instance.
    • Room and its agents will close if inactive.
    Environment Variables (required):
    • NEO4J_URL: URL for connecting to your Neo4j database (e.g. bolt://host.docker.internal:7687)
    • NEO4J_USERNAME: Neo4j database username (default: neo4j)
    • NEO4J_PASSWORD: Neo4j database password (default: password)
    • MESHAGENT_PORT: Internal port for the MCP server (default: 8001)
  4. Join Room with a Chatbot linked to the Tools
    meshagent chatbot join --room=test --agent-name=mcp-neo4j-memory --name=mcp-neo4j-memory --toolkit=mcp-neo4j-memory
    
    • This will launch a chatbot in the Meshagent Room that can use the Neo4j memory tools.
    • Multiple toolkits can be attached to an agent in the same room.
    • Room access link is provided after running this command.
  5. Try it Out
    • Open the provided Room link in your browser.
    • Send a message to the agent (chatbot) to interact with the MCP Neo4j memory tools in real time!

Project-Level Deployment (Persistent Tools in Every Room)

To have the MCP server tools and chatbot automatically available in all new Rooms under your Meshagent project (ideal for production):
  1. Create Persistent MCP Neo4j Memory Service
    meshagent service create --role=agent --image=meshagent/mcp-neo4j-memory:latest \
      --env MESHAGENT_PORT=8001 \
      --env NEO4J_URL=<bolt://host.docker.internal:7687> \
      --env NEO4J_USERNAME=<neo4j> \
      --env NEO4J_PASSWORD=<password> \
      --port="num=8001 path=/webhook liveness=/ type=meshagent.callable" \
      --name=mcp-neo4j-memory-service
    
  2. Create Persistent Chatbot Service Linked to Tools
    meshagent service create --image="meshagent/cli:latest" \
      --port="num=9001 path=/agent liveness=/ type=meshagent.callable participant_name=mcp-neo4j-memory-chatbot" \
      --env="MESHAGENT_PORT=9001" \
      --name="mcp-neo4j-memory-chatbot-service" \
      --command="meshagent chatbot service --agent-name=mcp-neo4j-memory-chatbot --toolkit=mcp-neo4j-memory"
    
  • Now, every new Room created in your Meshagent project will automatically gain the Neo4j MCP server and linked chatbot agent.
  • No local or manual server management required.

Tools Available

This MCP Server provides persistent memory capabilities using Neo4j and exposes the following tools:

Tool Summary

ToolShort Description
add_observationsAdd new observations to existing entities in the knowledge graph
create_entitiesCreate multiple new entities in the knowledge graph
create_relationsCreate multiple new relations between entities in the knowledge graph.
delete_entitiesDelete multiple entities and their associated relations from the knowledge graph
delete_observationsDelete specific observations from entities in the knowledge graph
delete_relationsDelete multiple relations from the knowledge graph
find_nodesFind specific nodes in the knowledge graph by their names
open_nodesOpen specific nodes in the knowledge graph by their names
read_graphRead the entire knowledge graph
search_nodesSearch for nodes in the knowledge graph based on a query

Tools Details

add_observations

Add new observations to existing entities in the knowledge graph
ParameterTypeDescription
observationsarray

create_entities

Create multiple new entities in the knowledge graph
ParameterTypeDescription
entitiesarray

create_relations

Create multiple new relations between entities in the knowledge graph. Relations should be in active voice
ParameterTypeDescription
relationsarray

delete_entities

Delete multiple entities and their associated relations from the knowledge graph
ParameterTypeDescription
entityNamesarrayAn array of entity names to delete

delete_observations

Delete specific observations from entities in the knowledge graph
ParameterTypeDescription
deletionsarray

delete_relations

Delete multiple relations from the knowledge graph
ParameterTypeDescription
relationsarrayAn array of relations to delete

find_nodes

Find specific nodes in the knowledge graph by their names
ParameterTypeDescription
namesarrayAn array of entity names to retrieve

open_nodes

Open specific nodes in the knowledge graph by their names
ParameterTypeDescription
namesarrayAn array of entity names to retrieve

read_graph

Read the entire knowledge graph

search_nodes

Search for nodes in the knowledge graph based on a query
ParameterTypeDescription
querystringThe search query to match against entity names, types, and observation content

For additional information on MCP servers and the Model Context Protocol or why it’s safer to run MCP Servers with Docker, see the linked resources.