Analytics MCP
Enables AI-powered analytics from Stripe, PayPal, and Google Analytics 4 (BigQuery) data sources with built-in guardrails and automated workflows for financial and web performance insights.
README
Analytics MCP
Mastra-based agents and workflows for weather insights and payment analytics. The project sets up two agents (weather and Stripe/PayPal analytics), automated workflows, and an MCP server that exposes analytics tools.
Features
- Weather agent & workflow: uses OpenRouter LLM + Open-Meteo for weather-driven activity suggestions.
- Analytics agent & workflow: summarizes Stripe, PayPal, and GA4 (BigQuery) performance with guardrails to avoid hallucinations.
- MCP server: exports analytics tools (Stripe) and the analytics agent for integration with other MCP clients.
- Utilities: currency conversion (exchangerate.host), time zone info, and LibSQL-backed memory.
Prerequisites
- Node.js >= 20.9
- NPM
- API credentials: OpenRouter, Stripe, PayPal, and a GCP service account with access to the BigQuery events table.
Environment setup
- Copy the sample env:
cp .env.example .env.development(or.env.staging/.env.production). - Fill the variables you need; the file
.env.<APP_ENV>is picked based onAPP_ENV(defaultdevelopment). - Put
GOOGLE_CLOUD_CREDENTIALSas a single-line service account JSON; replace newline characters in the private key with\\n.
Key variables:
APP_ENV: selects.env.<APP_ENV>.- OpenRouter:
OPENROUTER_API_KEY,OPENROUTER_MODEL_DEFAULT, optional overrides for agent/scorer. - Stripe:
STRIPE_API_KEY,STRIPE_BASE_URL(optional; defaults to Stripe API). - PayPal:
PAYPAL_CLIENT_ID,PAYPAL_CLIENT_SECRET,PAYPAL_BASE_URL(sandbox/production). - FX:
FX_BASE_URL(default exchangerate.host). - BigQuery GA4:
GOOGLE_CLOUD_PROJECT_ID,GOOGLE_CLOUD_CREDENTIALS,BIGQUERY_EVENTS_TABLE,BIGQUERY_DEV_EVENTS_TABLE.
Running
- Install deps:
npm install - Mastra dev mode:
npm run dev - Build:
npm run build - After build, start:
npm start
Note: observability storage defaults to :memory:; adjust in src/mastra/index.ts if you need persistence.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.