Every week, big tech companies spend hundreds of millions of dollars competing over LLM benchmarks. As indie developers and builders, fighting on that turf is a losing game.
Instead of building another thin chat wrapper, I recently tackled a problem Silicon Valley giants will never touch: cleaning 155 messy Japanese public datasets (10.16 million records) and connecting them directly to AI agents via MCP (Model Context Protocol) in a server called japan-data-mcp.
Building this—and achieving a top quality score on MCP directories—gave me a dead-simple framework for understanding what MCP actually is, how it kills hallucinations, and why MCP is the best blue ocean for developers today.
Here is the whole blueprint.
🔌 What is MCP in One Sentence?
MCP is the universal "USB Type-C port" that plugs external tools and data warehouses directly into an AI's brain.
Before MCP, connecting an LLM to a database or local tool required custom glue code for every provider. With MCP, you write a server once and plug it into Claude Desktop, Cursor, Windsurf, Cline, or your own local agent.
It transforms AI from a chatbot relying on fuzzy training memory into an autonomous worker using deterministic tools.
🏗️ The 5 Roles of a Production AI System
A real-world AI system is never just an LLM doing everything alone. Think of it like a company organization (or Mega Man equipping special weapon cassettes):
+-------------------------------------------------------------------+
| [5] Reception Desk (UI / Host: Claude Desktop, Cursor, Mobile UI) |
+-------------------------------------------------------------------+
|
+-------------------------------------------------------------------+
| [4] SOP / Guidelines (System Prompt: "Never guess. Use tools.") |
+-------------------------------------------------------------------+
|
+-------------------------------------------------------------------+
| [1] The Brain (LLM: Claude, Gemini, local Gemma) |
| "Brilliant new-grad elite, but knows zero internal facts" |
+-------------------------------------------------------------------+
| <-- MCP (USB Type-C Port)
+-------------------------------------------------------------------+
| [3] Hands & Tools (MCP Server: Calculator, Query Engine, Alerts) |
+-------------------------------------------------------------------+
|
+-------------------------------------------------------------------+
| [2] Memory & Archive (10.16M-Row DB, or a local Markdown file) |
+-------------------------------------------------------------------+
-
The Brain (LLM: Claude, Gemini, Gemma)
- A brilliant new-grad elite trained with billions of dollars. Great at reasoning and language, but knows nothing about your company's internal data or today's exact numbers.
-
The Memory & Archive (Databases & Files)
- The official ledger and manual in the office cabinet. This could be my 155 cleaned public datasets (10.16M records) or a single Markdown file on your smartphone.
-
The Hands & Tools (MCP & External Tools)
- The calculator, search terminal, telephone, or special weapon you hand to the new hire so they can actually query, calculate, and trigger actions.
-
The SOP / Instruction Memo (System Prompt)
- The manager's strict rule: "Look at the ledger (#2) and use the calculator (#3). Never guess from memory."
-
The Reception Desk (UI / Client)
- The counter that humans touch (Cursor, Claude Desktop, or a mobile app).
🎯 Why Hallucinations Physically Disappear
- Bare LLM (Without MCP): Like a teacher standing at the podium empty-handed, with no textbook and no calculator. When asked for specific figures, they improvise a plausible-sounding lie from fuzzy memory.
- LLM + MCP: You put the official ledger (#2) on the desk, hand them a calculator (#3), and forbid guessing (#4).
Because the AI is reduced to pointing at the official ledger and reading out the calculator's output, factual hallucinations become physically impossible.
🧩 The 3 Archetypes of MCP Servers
You don't need millions of rows of data to build an MCP server. They fall into three distinct patterns:
| Type | Backed By | Best Use Cases |
|---|---|---|
| 1. Data-Backed MCP | Massive, pre-cleaned database (e.g., japan-data-mcp) |
High-moat B2B intelligence, market & government research |
| 2. Stateful Memory MCP | Starts with an empty file (Markdown / SQLite) that the AI updates | Personal AI companions, contradiction-free novel writing, TRPGs |
| 3. Action / Remote MCP | Zero state; triggers OS clicks, APIs, emails, Slack alerts | Workflow automation, RPA replacement |
🌊 Why MCP is the Ultimate Blue Ocean for Builders
- Sell Pickaxes, Avoid the LLM War: Building "The Brain" (#1) costs billions. Building MCP tools (#3) means whichever LLM wins next week, your tool plugs right into it.
- Big Tech Won't Clean "Dirty" Local Data: Japanese government open data is full of merged Excel cells, legacy Shift_JIS encodings, and imperial era dates (Showa/Heisei/Reiwa). Google and Anthropic will never unmerge those cells or join them via 13-digit corporate numbers and 5-digit municipal codes. Cleaning and owning the messy ledger (#2) gives you an unbreakable moat.
- B2B Expense Budgets vs. Consumer Pocket Change: An MCP server that turns 3 days of manual procurement or market research into a 10-second query directly replaces overtime and consulting fees—making it an easy corporate expense.
🚀 What's Live Now & 3 Next-Gen Ideas
What We Built: japan-data-mcp
We cleaned and normalized 155 official datasets (10.16M+ records)—including 100% of disclosed GEPS central government procurement awards (2020–2026), 44 years of land price valuations (1983–2026), and all 1,741 municipalities—and exposed them via MCP.
{
"mcpServers": {
"japan-data": {
"command": "npx",
"args": ["-y", "japan-data-mcp"],
"env": {
"RAPIDAPI_KEY": "YOUR_API_KEY"
}
}
}
}
- Open Parquet Samples (Hugging Face): japan-official-data-megabank-showcase
- Production API Hub (RapidAPI): Japan Open Data Lab
3 Ideas I'm Exploring Next
- B2B Action MCPs: Combining our 10.16M-row database with Action MCPs to auto-detect new government tenders, notify teams on Slack, and draft initial proposals from historical winning bid prices.
- Zero-Cost Offline AI Companion on Pixel: Pairing an on-device LLM (like Gemma) with a Stateful Memory MCP that appends daily memories to local Markdown files—100% offline, zero API cost.
- Contradiction-Free "Novelist & TRPG" MCP: Letting the AI manage character sheets, world lore, and timelines via MCP so long-form stories and RPG campaigns never suffer from plot holes.
What kind of MCP server are you building (or planning to build) next? Data-backed, Stateful Memory, or Action-oriented? Let's discuss in the comments! 👇
Top comments (4)
Mostly SEC and macro data: EDGAR filings and XBRL facts, 13D/13G ownership, FINRA short interest, FOMC statements, Fed and other macro series, plus quant analytics and backtest validation. It's canli-mcp: 306 tools, MIT, no key, runs locally (
npx -y canli-mcp; repos are github.com/arhancanli/canlicapital and github.com/arhancanli/alphac). I built it, so weigh my view accordingly.Your three checks cover the data side well, and the golden-answer anchors are the right idea. The one I'd add is on the query side, because that is where "silver price" went wrong for us: the data was right, the lookup picked the wrong series. With 155 datasets that look alike (several ministries publish a "land price" table), I'd write questions whose answer lives in exactly one dataset, plus near-duplicates that should not match, and count how often the right tool or dataset comes back first. We ran 48 held-out requests over our tool list and got the right tool first on 46.
Also worth testing: a question the data cannot answer, such as a year outside dataset_available_range. A good server says so instead of returning the nearest row.
Packing 306 tools across SEC EDGAR, XBRL, FINRA short interest, and FOMC/Fed macro into
canli-mcpis seriously impressive.Your point about query-side routing evaluation (Top-1 tool/dataset recall on held-out prompts) hits home. As you mentioned with the "land price" example, Japanese government data has multiple overlapping tables across different ministries and categories (e.g., official land valuations vs. regional surveys, or subsidy grants vs. public procurement awards).
Building a held-out benchmark set specifically designed with near-duplicate traps to measure Top-1 dataset selection accuracy (like your 46/48 benchmark) is a great methodology. We will definitely implement a routing eval suite like that across our 155 tables.
And totally agree on out-of-range refusal testing:
When a user asks for a year outside
dataset_available_range(for example, asking for 2015 procurement awards when digital GEPS disclosure only starts in 2020), returning the nearest available year is a silent trap. Our endpoints enforce temporal bounds—returning zero rows (or an explicit coverage status) alongside"dataset_available_range": "2020-2026"in the envelope so the LLM can clearly state that 2015 is outside the available range rather than guessing from the closest year.Really appreciate you sharing your practical learnings from building
canli-mcp!I'd soften "factual hallucinations become physically impossible". A tool removes one failure, the model inventing the number from memory. Three others stay, and I've hit each of them building an MCP server over financial data:
With 155 merged datasets I'd expect the third to matter most: do the records keep their original publisher, unit and reference date per row, and does the tool return them next to the value? If it does, the model can quote the source instead of just the figure, and you can test it with a set of questions whose answers you already know. How are you checking the 10.16M records after cleaning: a sample against the originals, or per-dataset row counts?
Thank you for this exceptionally sharp comment, Arhan! You can immediately tell when someone has actually built an MCP server over production financial data.
You are 100% right to distinguish between fabrication from model weights (which tool use eliminates) and retrieval/schema-alignment failures (wrong series, entity collision, and unit/date misinterpretation). Those exact three failure modes were the biggest engineering hurdles when unifying all 155 datasets.
Here is how we designed the schema and QA pipeline to handle each of the points you raised:
1. Preserving Publisher, Units, and Reference Dates per Row (Your 3rd Point)
Every single dataset is forced into a strict 24-column core schema (
ARROW_SCHEMA_24COL) before it ever touches the MCP layer, and the tool returns these metadata fields right alongside the figures:source_name&source_attribution): Every row retains its exact primary agency source (e.g., Digital Agency GEPS, MLIT, MHLW), plus the API envelope returnsdataset_available_rangeandsource_attributionso the model can cite the exact ministry and coverage window.capital_amount_jpy,amount_usd,land_price_per_sqm_jpy). The model never has to guess a multiplier.established_date/fiscal_year, converted from Japanese imperial eras to ISO-8601YYYY-MM-DD) from the publication/pipeline refresh timestamp (updated_at).2. Preventing "Wrong Row" Entity Collisions (Your 2nd Point)
Company name collisions are huge in Japan (thousands of unrelated SMEs share identical names). We avoid fuzzy name-only joins by resolving corporate records to their official 13-digit National Tax Agency Corporate Number (
corporate_number) and geographic records to 5-digit JIS Municipality Codes (municipality_code), stored strictly as zero-padded strings.3. Preventing "Wrong Series" Lookups (Your 1st Point)
Instead of a single blind keyword search across 155 tables, the MCP workflow uses a two-step discovery pattern (
list_datasets/get_dataset_schema-> query), exposing explicit descriptions, time ranges, and sample rows so the agent verifies the table semantics before querying.How We Validate the 10.16M Records After Cleaning
We use a three-layer automated gate (
test_all_packages_quality.py+validate_24col_schema) against the untouched originals kept indata/raw/:"nan","N/A", float.0artifacts).I really appreciate you pointing this out—I'll also add a note in the article clarifying "memory-based hallucinations" vs. schema alignment. What kind of financial data are you running your MCP server on?