About the Building an MCP Server for Liferay Data... category

Building an MCP Server for Liferay Data Platform — and the Lessons That Followed

Presenters:

  • Nilton Vieira, Sr Software Engr, Liferay
  • Leslie Wong, Sr Software Engineer, Liferay

Getting your analytics to answer questions in plain English feels like magic the first time it works. Liferay Data Platform exposes a rich API over individuals, segments, accounts, channels, and content — and the moment we wrapped it in a Model Context Protocol server, an AI assistant could answer in one sentence what used to take a segment, a set of filters, and a CSV export. But the demo that wows a room is the easy 20%. The other 80% is making it safe, affordable, and trustworthy.We will demonstrate how we converted the Liferay Data Platform API into a Model Context Protocol server, enabling an AI assistant to process analytics queries in natural language. The session explores how our server manages challenging assistant requests — from those that trigger massive data warehouse scans to those that nearly breach multi-tenant boundaries. We walk through the practices that turned our server production-ready — each with a real failure and the fix that followed: data aggregation (expose summaries, never raw row dumps, to a consumer that can’t read ten thousand records), cost control (treating spend as a correctness requirement and attributing every byte to the tenant that caused it), permissioning (the agent acts as the calling user, so the conversational layer can never escalate privilege), error handling (structured, actionable errors the model recovers from instead of hallucinating around), and observability (logging every tool call, argument, and per-tenant cost so you can see inside a conversation after the fact).We close with a live look under the hood: a single plain-English question traced end to end — the tool calls it triggers, the tenant scope it inherits, the cost it incurs, and the guardrails that keep it from ever crossing a line. You’ll leave knowing not just what an MCP server can do, but what it actually takes to ship one over a real product.