Inspiration

Coffee shops depend on small but important inventory items like milk, coffee beans, cups, syrups, and packaging. If any of these items run low, daily operations can slow down and customers may not get what they want. Many small cafés still track stock manually, so we wanted to build an AI agent that can check real inventory, identify shortages, and help managers take safe ordering actions.

What it does

BrewStock Agent helps coffee shop managers check inventory, find low-stock items, match them with suppliers, and create pending demo purchase orders. The agent uses real MongoDB inventory data through MCP tools. It can answer questions like what needs to be ordered, explain why an item is low, recommend order quantities, and create purchase orders. Orders are not confirmed automatically; they stay pending until the manager approves them.

How we built it

We built BrewStock Agent using a Next.js frontend dashboard, a Node.js and Express backend, MongoDB Atlas, Google Cloud Run, and Google Cloud Agent Studio. The frontend is deployed on Vercel and shows inventory, low-stock alerts, and purchase orders. The backend is deployed on Cloud Run and handles inventory and order APIs. We also built a custom BrewStock MCP Server on Cloud Run, which allows the Gemini agent in Agent Studio to call tools such as checking low stock, creating purchase orders, and confirming orders.

Challenges we ran into

One major challenge was connecting multiple parts of the system together: the frontend, backend, MongoDB Atlas, Cloud Run, MCP server, and Agent Studio. We also had to make sure the agent used real tool results instead of inventing inventory data. Another challenge was keeping the workflow safe by ensuring that purchase orders are only demo orders and require manager approval before confirmation.

Accomplishments that we're proud of

We are proud that BrewStock Agent works as an end-to-end agentic system, not just a chatbot. It can read real inventory data from MongoDB, identify low-stock items, create pending demo purchase orders, and confirm them through manager approval. We also successfully deployed the backend and MCP server on Google Cloud Run and connected the Gemini agent to real business actions through MCP tools.

What we learned

We learned how to build a tool-using AI agent with Google Cloud Agent Studio, Gemini, MCP, and MongoDB. We also learned how Cloud Run can be used to host scalable backend and MCP services. Most importantly, we learned that agentic systems should be designed with safety in mind, especially when they perform actions like creating or confirming orders.

What's next for BrewStock Agent

Next, we want to add POS integration, sales-based stock deduction, expiry and waste alerts, demand forecasting, supplier email generation, multi-store support, and role-based approvals. In the future, BrewStock Agent could become a complete inventory and procurement assistant for cafés, bakeries, and small food businesses.

Built With

  • artifact-registry-database:-mongodb-atlas-mcp-/-partner-technology:-mongodb
  • cloud
  • custom-brewstock-mcp-server
  • express.js-ai-/-agent-platform:-gemini-3.5-flash
  • github
  • google
  • google-cloud-agent-studio-cloud-services:-google-cloud-run
  • google-cloud-build
  • javascript-frontend:-next.js
  • mcp-tools
  • model-context-protocol-apis-/-tools:-rest-apis
  • react
  • tailwind-css-backend:-node.js
  • vercel-deployment:-vercel-for-frontend
Share this project:

Updates