{"slug": "wrapping-22-esg-certification-registries-into-one-mcp-server", "title": "Wrapping 22 ESG certification registries into one MCP server", "summary": "A developer built an MCP server that unifies 22 ESG certification registries behind four tools, translating a single query shape into each registry's idiosyncratic search fields and normalizing records into a fixed envelope with nulls for unpublished fields. The design collapses 22 per-registry tools into esg_list_actors, esg_search, esg_run_async and esg_get_run_items, with async runs returning a runId and datasetId for paging large registries. The developer reports tool-selection accuracy improved versus a flat tool list and that agents can answer certification questions without inventing records.", "body_md": "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.\n\nI build data products for a living, so I did the boring part twenty-two times and then wrapped it once.\n\nGreen building and sustainable procurement runs on certificates:\n\nEach 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:\n\nSo 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.\n\nThe 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.\n\nInstead the server exposes four:\n\n| Tool | Why | \n|---|---|\n| `esg_list_actors` | browse the catalog by category or keyword | \n| `esg_search` | run one registry synchronously, return items | \n| `esg_run_async` | long runs → `runId` +`datasetId` | \n| `esg_get_run_items` | page a dataset later | \n\nThe 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.\n\nEvery registry names its search box differently. Real field names from the twenty-two actors:\n\n```\nsearchQuery, searchKeyword, keyword, brandKeyword,\nmanufacturerQuery, productQuery, certificateHolder, producer\n```\n\nNobody should have to memorise that. So the server keeps a per-actor field map and translates a single shape:\n\n```\n{ \"actor\": \"pefc\", \"query\": \"plywood\", \"country\": \"Vietnam\", \"maxItems\": 25 }\n```\n\nbecomes 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.\n\nRegistries disagree about everything except that they are disagreeable. Each record is normalised to a fixed envelope:\n\n```\n{\n  \"recordId\": \"spot-portfolio-insulation\",\n  \"recordType\": \"BRAND_CERTIFICATION_PORTFOLIO\",\n  \"productName\": \"...\",\n  \"manufacturer\": \"...\",\n  \"productType\": \"Building Materials & Finishes\",\n  \"csiMasterFormat\": \"09 00 00 Finishes\",\n  \"certifications\": \"GREENGUARD Gold Certification | GREENGUARD Certification\",\n  \"ulStandardNumber\": \"UL 2818 - 2022 Gold Standard for Chemical Emissions\",\n  \"eligibleGreenCredits\": \"LEED v5 BD+C | LEED v5 ID+C | WELL v2 Pilot\",\n  \"leedV5Compliant\": true\n}\n```\n\nFields 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.\n\n`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.\n\n```\n> Find BREEAM-certified heat pump manufacturers in the UK with EPDs\n\n→ esg_search { \"actor\": \"breeam\", \"query\": \"heat pump\", \"country\": \"United Kingdom\" }\n← 23 items · manufacturer, certificateNumber, validUntil, epdReference, csiMasterFormat\n> Which GOTS-certified organic cotton mills ship to the EU?\n\n→ esg_list_actors { \"keyword\": \"gots\" }\n→ esg_search { \"actor\": \"gotspulse\", \"country\": \"EU\", \"maxItems\": 100 }\n← 61 items with certification body, licence number, product category, country\n```\n\nThe registry quirks stay in the server. The agent sees two tools' worth of vocabulary.\n\nClaude Desktop:\n\n```\n{\n  \"mcpServers\": {\n    \"esg-compliance\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"apify-esg-compliance-mcp-hub\"],\n      \"env\": { \"APIFY_TOKEN\": \"apify_api_xxx\" }\n    }\n  }\n}\n```\n\nSame block works in Cursor, VS Code, Cline and Continue; any stdio host can run `node src/server.js` directly.\n\nThe 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.\n\n**Tool count is a budget.** Four well-described tools outperformed 22 narrow ones. Spend that budget on input mapping instead.\n\n**Normalise nulls.** `null` is information: \"this registry does not publish EPD references\". A missing key is ambiguity, and ambiguity is where models start inventing.\n\n**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.\n\n**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.\n\n`esg_compare(company)` tool that fans out across registries and returns one cross-certification profile`validUntil` monthly and emit changes\nThe repo is MIT: [clestigon/apify-esg-compliance-mcp-hub](https://github.com/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](https://apify.com/clestigon) and each one runs standalone.\n\nCertification data is public, it is just unreadable. Making it readable is the whole job.", "url": "https://wpnews.pro/news/wrapping-22-esg-certification-registries-into-one-mcp-server", "canonical_source": "https://dev.to/clestigon/wrapping-22-esg-certification-registries-into-one-mcp-server-11bf", "published_at": "2026-12-06 16:31:03+00:00", "updated_at": "2026-12-06 16:44:15.794952+00:00", "lang": "en", "topics": ["ai-agents", "agent-protocols", "ai-tools", "large-language-models"], "entities": ["MCP", "Claude Desktop", "PEFC", "BREEAM", "GOTS", "SPOT", "GREENGUARD"], "also_reported_by": [], "takeaway": "Exposing four well-described MCP tools with a per-actor field map and null-filled record envelope beat a flat list of 22 registry-specific tools on tool-selection accuracy.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/wrapping-22-esg-certification-registries-into-one-mcp-server", "markdown": "https://wpnews.pro/news/wrapping-22-esg-certification-registries-into-one-mcp-server.md", "text": "https://wpnews.pro/news/wrapping-22-esg-certification-registries-into-one-mcp-server.txt", "jsonld": "https://wpnews.pro/news/wrapping-22-esg-certification-registries-into-one-mcp-server.jsonld"}}