If you have ever tried to answer a question like "which PEFC chain-of-custody sawmills in Vietnam are flagged for EUDR due diligence?" with an LLM, you know the failure mode: the model will happily invent a plausible sawmill. The data exists — it is just locked inside twenty different certification registries, each with its own search form, its own pagination, and no API.
I build data products for a living, so I did the boring part twenty-two times and then wrapped it once.
Green building and sustainable procurement runs on certificates:
Each registry is a search page. Some are cold-fusion era ASP.NET, some are modern JS apps, one is a PDF index. None of them gives you:
So a retrieval-augmented agent cannot answer a certification question even when the answer is public. That is the gap MCP is perfect for: one server, many tools, one schema.
The naive design exposes 22 tools — breeam_search, spot_search, geca_search... Twenty-two tools in a tool list is a tax on every prompt: the model has to read 22 descriptions before deciding anything.
Instead the server exposes four:
| Tool | Why |
|---|---|
esg_list_actors |
browse the catalog by category or keyword |
esg_search |
run one registry synchronously, return items |
esg_run_async |
long runs → runId +datasetId |
esg_get_run_items |
page a dataset later |
The agent does discovery with one call, then acts. Tool-selection accuracy went up immediately compared to a flat list — fewer, better-described tools beat more, narrower ones when the input space is homogeneous.
Every registry names its search box differently. Real field names from the twenty-two actors:
searchQuery, searchKeyword, keyword, brandKeyword,
manufacturerQuery, productQuery, certificateHolder, producer
Nobody should have to memorise that. So the server keeps a per-actor field map and translates a single shape:
{ "actor": "pefc", "query": "plywood", "country": "Vietnam", "maxItems": 25 }
becomes the actor's actual input, with input available as an escape hatch that always wins. This is the difference between a tool an agent can use on the first try and a tool that needs a schema-reading round trip.
Registries disagree about everything except that they are disagreeable. Each record is normalised to a fixed envelope:
{
"recordId": "spot-portfolio-insulation",
"recordType": "BRAND_CERTIFICATION_PORTFOLIO",
"productName": "...",
"manufacturer": "...",
"productType": "Building Materials & Finishes",
"csiMasterFormat": "09 00 00 Finishes",
"certifications": "GREENGUARD Gold Certification | GREENGUARD Certification",
"ulStandardNumber": "UL 2818 - 2022 Gold Standard for Chemical Emissions",
"eligibleGreenCredits": "LEED v5 BD+C | LEED v5 ID+C | WELL v2 Pilot",
"leedV5Compliant": true
}
Fields a registry does not publish come back as null, never missing. Downstream code stops branching on hasOwnProperty, and the model stops hallucinating a field that was simply absent.
run-sync-get-dataset-items is the right default: the agent gets rows in one hop. But registries with 40k rows do not finish in 300 seconds. Those get esg_run_async returning a runId and a console link, plus esg_get_run_items for paging. One extra tool, no extra concepts.
> Find BREEAM-certified heat pump manufacturers in the UK with EPDs
→ esg_search { "actor": "breeam", "query": "heat pump", "country": "United Kingdom" }
← 23 items · manufacturer, certificateNumber, validUntil, epdReference, csiMasterFormat
> Which GOTS-certified organic cotton mills ship to the EU?
→ esg_list_actors { "keyword": "gots" }
→ esg_search { "actor": "gotspulse", "country": "EU", "maxItems": 100 }
← 61 items with certification body, licence number, product category, country
The registry quirks stay in the server. The agent sees two tools' worth of vocabulary.
Claude Desktop:
{
"mcpServers": {
"esg-compliance": {
"command": "npx",
"args": ["-y", "apify-esg-compliance-mcp-hub"],
"env": { "APIFY_TOKEN": "apify_api_xxx" }
}
}
}
Same block works in Cursor, VS Code, Cline and Continue; any stdio host can run node src/server.js directly.
The server itself is about 250 lines: MCP SDK, zod schemas, a catalog JSON, and one fetch wrapper around the Apify API. No framework, no build step, no Docker.
Tool count is a budget. Four well-described tools outperformed 22 narrow ones. Spend that budget on input mapping instead.
Normalise nulls. null is information: "this registry does not publish EPD references". A missing key is ambiguity, and ambiguity is where models start inventing.
Make the escape hatch explicit. input: { raw: true }-style passthroughs kept me from shipping a mapper for every exotic field, and kept users from being blocked when a registry adds one.
Credential, not demo. Running against a paid API ($6 per 1,000 results) means there is no free demo endpoint that silently returns three fake rows — the first call either works or tells you exactly why it did not.
esg_compare(company) tool that fans out across registries and returns one cross-certification profilevalidUntil monthly and emit changes
The repo is MIT: clestigon/apify-esg-compliance-mcp-hub. If you are building agents for construction, procurement or compliance, the twenty-two actors behind it are on the Apify Store and each one runs standalone.
Certification data is public, it is just unreadable. Making it readable is the whole job.