Analytics

Ask an AI assistant about your analytics

With the Lettermint MCP server, an AI assistant such as Claude, ChatGPT, or Cursor can query your analytics. You ask a question in plain language. The assistant builds the query, runs it, and explains the result.

The assistant uses the tool query_email_analytics. This tool runs the same query as the API and returns the same numbers.

Before you start

You need:

  • A team on the Pro plan.
  • An AI client that is connected to the MCP server. See Connect your client.
  • A team that allows MCP access.
  • A role with the View analytics permission.

The MCP server uses your Lettermint account. You do not need a Team API token.

Check that analytics are available

Ask the assistant for your teams:

Use Lettermint to list my teams. Show the capabilities of each team.

The assistant calls list_teams. A team that you can query has query_email_analytics in its capabilities.

If the capability is missing, one of these conditions applies:

ConditionSolution
The team is not on the Pro plan.Upgrade the team.
Your role does not have View analytics.Ask an owner or an admin of the team to change your role.
The team does not allow MCP access.A member with Manage team security can turn it on in Manage team > Settings.

Ask a question

A good question names four things. The assistant then has less to guess.

PartExample
The team"for the team Acme"
The metric"the bounce rate"
The window"of the last 7 days, in Amsterdam time"
The split"for each mailbox provider"

For the team Acme, show the bounce rate and the deferral rate of the last 7 days in Amsterdam time, for each mailbox provider. Sort by deferral rate.

You do not need the exact metric names. The assistant reads them from the tool. If you know a name from the metrics page, use it. An exact name removes doubt.

Example prompts

Find a problem:

  • "Which mailbox providers deferred our email yesterday? Show the number of deferrals and the deferral rate."
  • "What are the ten most frequent SMTP replies behind our bounces of this week?"
  • "Show the delivery rate for each hour of today. Tell me when it dropped."

Compare:

  • "Compare the bounce rate of the last 7 days with the 7 days before. Show the change in percentage points."
  • "Compare the complaint rate for each value of the tag campaign, for this month."

Measure speed and engagement:

  • "How long does delivery take? Give the median and the 99th percentile for each provider, for the last 24 hours."
  • "For our broadcast email of last week, how many recipients had a human open, and how many opens came from privacy proxies?"

Check the answer

An assistant can read a correct result and still explain it incorrectly. Ask for the evidence:

Show the query that you sent, the window from meta, and the rate bases.

Then check these points.

PointWhy
The windowAn assistant sometimes selects a different window than you meant. meta.from and meta.to are the facts.
The time zoneThe default is UTC. If you want local days, say so.
The counts behind a rateA rate from a small number of recipients tells you little. The counts are in rate_bases.
Fractions and percentagesThe tool returns rates as fractions. 0.02 is 2 percent.
"Delivered"A delivered email was accepted by the receiving server. It is not proof that the email is in the inbox.
Sums of breakdown rowsA breakdown by provider counts delivery attempts and leaves out the group without a value. The rows can add up to less than the total. See Dimensions that change what is counted.
Sums of open classesThe classes human, privacy, machine, and the others overlap. Their sum is not the total.

Two tools return numbers

The MCP server has two tools for statistics. They use different rules, so their numbers are different.

ToolReturnsUse it for
query_email_analyticsDeliverability analytics, as this section describesRates, breakdowns, filters, latency, and comparisons
get_delivery_statsDaily totals for each project, as the dashboard statistics show themA count that must match the dashboard, and inbound email

Do not let the assistant add or compare the numbers of the two tools. If you want deliverability analytics, say "use query_email_analytics" in your prompt.

When analytics are not available for a team, the assistant must tell you. It must not replace the answer with get_delivery_stats without telling you.

What the assistant can see

  • Your projects only. The tool reads the projects in your project access. Two members of one team can get different totals for the same question.
  • No recipient addresses. Analytics do not store them.
  • No from address or subject by default. These two dimensions hold personal data. They are available only when personal-information filtering is off for the team, and your role has View messages. See Personal-information filtering.

The tool reads data. It cannot change your team, your projects, or your email.

Limits

The MCP server and the API share the query limits of a team: 60 queries in one minute, and 2 at the same time. One question can need several queries. A window can be 90 days at most.

See Limits for the full list.

Troubleshooting

ProblemWhat to check
The assistant says that analytics are not available.Check the plan of the team and the View analytics permission.
The assistant uses get_delivery_stats.Ask for query_email_analytics by name. Check that the team has this capability.
A query on subject or from address fails.Check personal-information filtering and the View messages permission.
The tool reports a combination that is not possible.Not every metric works with every dimension. See Which dimensions work together.
The tool reports that the query reached the time limit.Ask for a shorter window or fewer splits.
The tool reports too many queries.Wait one minute. Ask one question at a time.
The numbers differ from the numbers of a colleague.Compare your project access.

Next steps

  • MCP server. Connect a client and review how access works.
  • Metrics. Learn the exact names and definitions.
  • Examples. See the query behind each common question.