A growth-marketing consultant stopped spending an entire afternoon pulling data from fourteen browser tabs and endless spreadsheets by building a Model Context Protocol (MCP) server. The server lets an AI assistant fetch and act on data from Google Ads, Meta, GA4 and Search Console. It now generates monthly reports, runs audits and applies optimizations without manual hand-holding, freeing the marketer to focus on strategy instead of data wrangling.
Why the shift mattered
Reporting on paid-search, social and analytics platforms used to be a manual choreography: open each dashboard, copy numbers into a spreadsheet, reconcile mismatches, then write insights. The effort ate up valuable time and introduced human error. MCP changes the workflow by giving the AI direct access to the platforms’ native query languages and APIs, turning “tell me the numbers” into “go get the numbers for me.”
The technical foundation
MCP is a protocol that lets an LLM-powered assistant call external tools as part of its reasoning. In practice the consultant set up a small web service that exposes the raw query language of each platform (Google Ads → GAQL) and the standard REST endpoints for Meta, GA4 and Search Console. The AI builds queries, sends them to the server, receives structured results and can issue write-operations followed by verification reads.
Three design choices that paid off
- Expose native query languages instead of thin wrappers – The first attempt wrote a separate function for each data need (e.g.,
get_campaigns). New reporting angles quickly ballooned the codebase. By exposing GAQL directly, a single endpoint lets the AI draft any query it needs. The assistant’s GAQL compositions outperformed the consultant’s manual scripts, and the same pattern works for the other platforms. - Verify every write with a read – APIs often return a success flag even when the change didn’t stick. The server now reads back after each write; if the expected value is missing, it logs a failure and alerts the user. This guardrail stops silent errors that could corrupt performance data.
- Maintain a markdown error log – Every bug, mis-typed field or misunderstood rule lands in
learned-errors.md. The AI reads this file at the start of each session, teaching itself what not to repeat.
Three pitfalls that cost time
- Name collisions between tools and imports – A function shared the same name as an imported module, causing the server to crash at runtime. Giving each import a distinct alias eliminated the conflict.
- Neglecting hot reloads – The MCP server loaded code once at launch. Changes to the codebase didn’t take effect until the whole client process restarted, leading to hours of debugging dead code. Adding a full restart workflow after each edit fixed the problem.
- Missing dependencies – A stray import absent from the virtual environment brought the server down on start-up. Pre-flight checks now install and verify all required packages before a restart, catching the issue early.
Takeaway
A modest MCP server can turn a labor-intensive reporting ritual into an automated, audit-ready workflow, but it demands disciplined coding practices and a willingness to maintain a small service. Marketers who invest the setup time trade spreadsheet drudgery for strategic analysis.
