Google Analytics in LibreChat

Connect Google Analytics to your self-hosted LibreChat instance and give all users access to real-time GA4 data. Add Safe MCP to your config file — Streamable HTTP is the recommended production transport.

mcpServers:
  safe-mcp-ga4:
    type: streamable-http
    url: https://api.safe-mcp.com/mcp
Zero data storage GDPR compliant Hosted in Germany Read-only access

Setup steps

  1. Edit your librechat.yaml and add the config shown above under mcpServers.
  2. Restart LibreChat to apply the changes.
  3. Users authenticate with their Google account on first use to grant GA4 access.
  4. Google Analytics tools are now available in any LibreChat conversation.

LibreChat is a self-hosted, open-source AI chat platform that supports multiple AI providers and multi-user deployments. By connecting Google Analytics to LibreChat via MCP, every user on your instance can query live website traffic, campaign performance, and conversion data directly in the chat interface — with full control over your data since it never leaves your infrastructure. Safe MCP uses Streamable HTTP, LibreChat's recommended transport for production MCP servers.

Stop wasting time on manual analytics

Exporting CSVs from GA4 and pasting them into chat as context
LibreChat queries GA4 directly — always fresh, no manual uploads
Switching between GA4 and your self-hosted chat to share numbers
Query analytics in the same interface your team already uses
Building dashboards that nobody reads
AI-written summaries with actionable insights, generated on demand

What you can do

Built for teams running their own AI infrastructure.

Executive summaries

Weekly and monthly performance narratives ready for email or slides. What changed, why, what to do next.

Campaign analysis

Breakdowns by channel with ROAS, cost efficiency, and budget reallocation suggestions.

Landing page insights

Find high-traffic pages with poor engagement. Get prioritized recommendations to improve conversion.

Funnel analysis

Visualize user journeys and identify where potential customers drop off. Optimize your conversion paths.

Try these prompts

Just ask in plain English inside LibreChat. Here's what works well.

Executive Summary

Write a 1-page exec summary of last week vs prior week. Include wins, risks, and next actions.

Paid Performance

Compare Meta vs Google Ads last 14 days: efficiency, conversion quality, budget suggestions.

Landing Pages

Which landing pages get the most sessions but underperform on engagement? Top 5 with fixes.

SEO Growth

Analyze organic sessions by landing page for the last 8 weeks. Which pages are growing fastest?

Funnel Drop-off

Show the checkout funnel from product page to purchase. Where is the biggest drop-off?

Property Audit

Audit this Google Analytics property: tracking gaps, suspicious drops, top growth opportunities.
Secure & Private

Full Access

€4.99 / month
Try free for 14 days
  • Unlimited Google Analytics queries
  • Works with ChatGPT, Claude & Copilot
  • Executive summaries & reports
  • Campaign & ROAS analysis
  • Statistical significance checks
  • Funnel analysis & drop-off insights
Get Started

FAQ

Does this change anything in Google Analytics?

No. Safe MCP uses read-only access. We cannot modify your analytics configuration or data.

Does LibreChat support Streamable HTTP?

Yes. LibreChat documents streamable-http as a supported connection type and recommends it for production MCP servers.

Is setup per-user or instance-wide?

Configuration is done once in librechat.yaml by the instance admin. After a restart, the MCP server is available to all users. Each user authenticates with their own Google account on first use.

Do you store my analytics data?

No. Queries are processed in real-time and results are immediately discarded. We only store encrypted OAuth tokens. See our Privacy Policy.

What happens after the free trial?

After 14 days, the subscription is €4.99/month. You can cancel anytime with two clicks — no questions asked.

Where is the Safe MCP service hosted?

All Safe MCP infrastructure runs in AWS Frankfurt (eu-central-1), Germany. Your analytics data never leaves the EU.

What is an MCP Server?

Model Context Protocol (MCP) is the industry standard for integrating external data and tools with AI. It ensures you stay in control of your data.

Can I revoke access?

Yes. You can revoke Safe MCP's access to your Google Analytics account in one click from your account page. Tokens are invalidated immediately across all systems.

Ready to add Google Analytics to your LibreChat?

Add the config. Restart LibreChat. Start asking. 14 days free, no credit card required.

mcpServers:
  safe-mcp-ga4:
    type: streamable-http
    url: https://api.safe-mcp.com/mcp