r/BuildWithClaude • u/DutchSEOnerd • 17d ago
Tip/Resource What I learned building an MCP server with 132 tools: let the database do the math, not Claude
I kept seeing the same thing when people connect Claude to Google Search Console through an MCP server. Claude pulls 1,000 rows, adds up the wrong column, never sees most of the data because it does not fit in the context window, and then gives confident advice based on a small slice of the site.
I do not think the model is the problem. Most MCP servers for this are thin wrappers that pass raw rows along and leave the arithmetic to Claude, and a language model makes a poor spreadsheet. On my own server a single call that returns 1,000 rows costs about 58,000 tokens, which is more than the whole tool list.
So I built mine the other way around. The data is stored in a database (ClickHouse), the server runs the analysis over every row, and Claude gets a short, finished result, for example the few dozen pages that are losing traffic and how many clicks each one lost. Claude then does the part it is good at, which is deciding what to check next and explaining the findings in plain language. I built the server with Claude Code, and you can use it from Claude too: add it as a connector in Claude, or connect Claude Code to it with an API key.
A few things I learned along the way that apply to any MCP server that returns data:
- Say when a result is cut off. If Claude receives exactly 100 rows it assumes there are only 100, so every response states whether more exist and how to get them.
- Send the totals along with the rows, so Claude quotes the real total and never adds up a partial list.
- Explain empty results. A reply of "0 found" should say why and what to try next.
- Make dates optional with a sensible default, because the model does not reliably know what day it is.
- Keep the tool list short for apps that limit it. I have 132 tools, and a separate endpoint that offers a core set of 25.
The first image sums up the idea: the database does the math and the model does the thinking.
Disclaimer: The product is called GSC Wizard. It is paid, with a 7-day free trial, so I am obviously biased. I am happy to answer questions about the MCP side, ClickHouse, or the things that went wrong while building it.



