Playbook: Build a Client Reporting Portal from Your Homegrown Analytics System

Your company has an internal analytics platform that powers all reporting. It might be a data warehouse with a SQL interface, a custom analytics API, or a BI tool with an API layer. Generating a client-facing report requires an analyst to log in, write or run queries, format the output, and email it as a PDF or spreadsheet. Account managers cannot do this themselves. They request reports, wait, and sometimes get something that does not quite answer the client's question. This playbook walks you through building a reporting portal where account managers generate their own reports, all built from inside Claude Desktop or ChatGPT.

What you will build

By the end of this playbook, you will have:

  • Custom tools that query your analytics system with parameterized, safe queries (no raw SQL exposed)
  • A sandcastle app where account managers select a client, pick metrics, choose a date range, and generate a formatted report
  • Report templates that enforce consistent branding and data presentation
  • A report history collection so generated reports are saved and can be reshared without regenerating
  • A scheduled agent that generates recurring reports automatically and stores them for pickup

What you need before you start

  • An Assist workspace with an MCP server set up. If you have not created one yet, follow Creating an MCP server.
  • Your AI client connected to the MCP server. See Connect your client.
  • Access credentials for your analytics system's API or database connection. You will need read access to the tables or endpoints that power client reporting.
  • A list of the reports your team generates most often. What metrics do clients ask about? What dimensions (date ranges, segments, channels) do they want to filter by?

Step 1: Identify the report types

Start by telling the AI what reports your team produces:

"I want to build a client reporting portal. Our analytics platform is at https://analytics.internal.company.com/api. We generate these reports for clients most often:

  1. Performance summary: impressions, clicks, conversions, spend, and ROI for a date range
  2. Channel breakdown: same metrics broken down by channel (search, social, display, email)
  3. Audience insights: demographics, geography, and device breakdown of who engaged
  4. Trend report: weekly performance over time with comparison to prior period
  5. Campaign comparison: side-by-side metrics for two or more campaigns

Each report is scoped to a specific client (by client_id) and date range. Some clients also want data filtered by specific campaigns or channels."

The AI will help you plan the tool set. It will probably suggest one tool per report type, plus a few utility tools for looking up clients and campaigns.

Step 2: Build the query tools

Build tools that encapsulate the queries. The key is that these tools accept parameters (client_id, date range, filters) but do not expose raw SQL or arbitrary queries. Account managers cannot accidentally query another client's data or run an expensive unfiltered query.

"Create a tool called 'get_performance_summary' that takes client_id, start_date, and end_date. It should query our analytics platform and return: total impressions, total clicks, click-through rate, total conversions, conversion rate, total spend, cost per conversion, and ROI. Format numbers with commas and percentages with two decimal places."

"Create a tool called 'get_channel_breakdown' that takes client_id, start_date, end_date, and an optional channel filter. Return the performance metrics broken down by channel. Each row should have: channel name, impressions, clicks, CTR, conversions, conversion rate, spend, and cost per conversion."

"Create a tool called 'get_weekly_trend' that takes client_id, start_date, end_date, and optionally a comparison_start_date and comparison_end_date. Return weekly metrics for the primary period and, if comparison dates are provided, the comparison period. Include week-over-week change percentages."

"Create a tool called 'list_clients' that returns all clients the current user has access to, with client_id, client_name, and active status."

"Create a tool called 'list_campaigns' that takes client_id and returns all campaigns with campaign_id, campaign_name, status, start_date, and end_date."

Test each tool with real data:

"Get the performance summary for client_id 'acme-corp' for March 2026."

"Show me the channel breakdown for the same client and period."

Verify the numbers against what your analytics platform shows directly. Fix any discrepancies in the tool logic before moving on.

Step 3: Build the reporting app

Now build the sandcastle app that account managers will use to generate reports:

"Build me a sandcastle app for client reporting. It should have these views:

  1. Report generator: A form with these steps:

    • Step 1: Select a client from a dropdown (populated by the list_clients tool)
    • Step 2: Select a report type (performance summary, channel breakdown, audience insights, trend report, campaign comparison)
    • Step 3: Set parameters based on report type:
      • All reports: date range picker (start and end date) with presets (last 7 days, last 30 days, last quarter, custom)
      • Channel breakdown: optional channel filter multi-select
      • Trend report: optional comparison period toggle with its own date range
      • Campaign comparison: multi-select for campaigns (populated by list_campaigns)
    • Step 4: Preview the report data in a formatted view
    • Step 5: Confirm and save
  2. Report library: A list of all generated reports with: report_id, client_name, report_type, date_range, generated_by, generated_at. Click to view. Include a search bar and filters for client and report type.

  3. Report viewer: The formatted report with:

    • Header with client name, report type, date range, and generation date
    • Data tables with clear column headers and formatted numbers
    • Charts where appropriate (bar chart for channel breakdown, line chart for trends)
    • A 'regenerate' button that refreshes the data with the same parameters
    • A 'share link' button that copies a direct link to this report"

Iterate on the formatting:

"The report viewer should look professional. Use a clean layout with the company logo placeholder at the top. Use consistent typography -- headers in bold, data in a monospace font for alignment. Color-code metrics: green for positive changes, red for negative."

"On the channel breakdown report, add a horizontal bar chart showing spend by channel. On the trend report, add a line chart with both periods overlaid."

"Add a 'key takeaways' section at the top of each report. This should be a bulleted list that the AI generates by analyzing the data: biggest channel by spend, highest performing channel by ROI, significant week-over-week changes, and any anomalies."

The key takeaways section is where the AI adds real value beyond data retrieval. It reads the data, identifies what matters, and surfaces it in plain language. Account managers get analysis, not just numbers.

Step 4: Add report storage

Generated reports should be saved so they can be reshared without regenerating:

"When an account manager generates a report, store it in a 'reports' collection with: report_id, client_id, client_name, report_type, parameters (date range, filters), generated_by, generated_at, data (the full report data), and takeaways. The report viewer should read from this collection."

"Add a 'share' button to the report viewer. It copies a URL that opens this specific saved report. Anyone with access to the app can view it."

"On the report library view, add a 'favorites' toggle so account managers can bookmark reports they reference frequently."

Saved reports serve two purposes. Account managers can reshare a report without regenerating it (the data is frozen at generation time, which is often what clients want -- "the numbers we discussed on our call"). And the collection creates a history of what was reported to whom and when.

Step 5: Add report templates

Account managers should not have to configure every parameter from scratch each time:

"Add a 'templates' collection. An account manager can save their current report configuration as a template with a name like 'Acme Corp Monthly Performance' or 'Q4 Channel Review'. Templates store: client_id, report_type, default date range logic (e.g., 'last 30 days' rather than fixed dates), filters, and any other parameters."

"On the report generator, add a 'Use template' option at Step 1. When selected, show a list of the user's templates. Selecting one pre-fills all the form fields. The user can adjust parameters before generating."

"Add a 'Save as template' button on Step 5 of the generator. After generating a report, the user can save the configuration for next time."

Templates turn a 5-step process into a 2-step process: pick a template, hit generate.

Step 6: Build the recurring report agent

Some reports are generated on the same schedule every time. Build an agent that handles these:

"Create a subagent that runs every Monday at 5:00 AM. It should:

  1. Pull all report templates that are marked as 'recurring' from the templates collection
  2. For each recurring template:
    • Calculate the date range based on the template's logic (e.g., 'last 7 days' means Monday through Sunday of the prior week)
    • Generate the report using the appropriate tools
    • Generate the key takeaways
    • Store the report in the reports collection
    • Post a notification to Slack: 'Weekly report for [client name] is ready: [link]'
  3. If any report fails to generate (API error, no data), post an alert to #analytics-alerts with the error details"

"Add a 'recurring' toggle to the template editor in the app. When enabled, show options for frequency (weekly on Monday, biweekly, monthly on the 1st) and a Slack channel for notifications."

Now account managers set up recurring reports once and they generate automatically. The reports are in the library ready to share. If a client calls asking for their weekly numbers, the account manager has a link before the call.

Step 7: Add conversational report access

The app handles structured, repeatable reporting. But sometimes account managers need ad-hoc answers. Because the tools are on the MCP server, they can ask from their AI client:

"What was Acme Corp's conversion rate last week compared to the week before?"

"Which channel drove the most conversions for Beta Inc in Q1?"

"Show me the top 5 clients by spend last month."

The AI calls the same tools the app uses. The account manager gets a quick answer without generating a formal report. If the answer leads to a deeper question, they can keep going:

"Why did Acme Corp's display spend drop 40% in the third week of March? Show me the daily breakdown."

"Compare that to their search spend for the same period."

This is the conversational advantage. The account manager follows their curiosity. The tools provide the data. The AI connects the dots.

Step 8: Extend the system

As the team uses the portal, add capabilities:

"Create a tool called 'get_audience_insights' that returns demographic and geographic breakdowns for a client's campaigns. Add it as a new report type in the app."

"Add a 'benchmarks' feature. Create a tool that calculates average metrics across all clients for a given time period. In the report viewer, show how this client's metrics compare to the portfolio average -- 'CTR is 15% above average', 'CPA is 8% below average'."

"Add a 'data freshness' indicator to the report generator. Before generating, check the latest data timestamp in the analytics platform. If data is more than 24 hours old, show a warning: 'Data was last updated at [timestamp]. Results may not include the most recent activity.'"

"Create a tool that exports a generated report to PDF format. Add a 'Download PDF' button to the report viewer. Account managers can download and email it to clients who want a document."

"Add an 'annotations' feature to saved reports. Account managers can add notes to specific data points: 'Spike in conversions on March 15 due to product launch.' Annotations are stored in the collection and appear in the report viewer."

What you built

You now have a complete client reporting system:

  • Query tools that pull data from your analytics platform with parameterized, safe access
  • A reporting app where account managers generate formatted reports with charts, tables, and AI-generated takeaways
  • Report templates that turn recurring reports into a two-click process
  • A scheduled agent that generates recurring reports automatically every week
  • A report library that stores every generated report for resharing and audit
  • Conversational access for ad-hoc questions that do not need a formal report

Analysts are no longer the bottleneck for standard reports. They focus on building new analyses and answering complex questions. Account managers get reports faster and can follow up with clients immediately. The data is consistent because everyone uses the same tools. Every report is saved and traceable.

Related guides