3.3 · Lesson

Review and Test the Scaffold

The server is in server/main.py. Read the file, and find each part:

  • app_lifespan - opens the Neo4j connection when the server starts, and closes it when the server stops. The connection details come from your .env file
  • mcp = FastMCP(...) - creates the MCP server
  • read() - runs a read-only query using the connection. The tools call it
  • get_schema and get_sample_nodes - the two example tools
  • YOUR TOOLS GO HERE - the place for the tools you will build
  • mcp.run(...) - starts the server over streamable HTTP