// the find
certinia/apex-mdapi
Apex Wrapper for the Salesforce Metadata API
Apex wrapper around the Salesforce Metadata API, letting you create objects, fields, pages, and deploy zip packages directly from Apex code without leaving the platform. It solves a real gap: Salesforce doesn't expose the Metadata API natively to Apex, so this library does the WSDL-to-Apex gymnastics for you. The audience is Salesforce developers building self-configuring packages or admin automation tools.
The core MetadataService.cls handles all the WSDL quirks that would take hours to figure out yourself — type name collisions, the displayLocationInDecimal patch, CRUD vs async operation split. The included MetadataServicePatcher.cls means you can regenerate the wrapper when Salesforce ships a new API version instead of hand-editing 8000 lines. 100% test coverage on the service class is a serious commitment for generated SOAP code. The examples file covers enough real cases (fields, objects, reports, layouts) that most people won't need to read the Salesforce docs at all.
Last API version update was Summer'16 (v37.0) — that's nearly a decade out of date. Salesforce has shipped 20+ API versions since then, and metadata types like Experience Cloud, Flow versions, and Einstein features won't be covered. Deploy and retrieve still depend on a JavaScript zip library in Visualforce, which breaks the pure-Apex story and hits viewstate limits fast for anything real. The CRUD operations explicitly exclude ApexClass and ApexTrigger, which is the thing most people reach for this library to do. The patcher workflow to upgrade API versions requires Developer Console and manual copy-paste — not something you'd put in a CI pipeline.