Knowledge Base · AI infrastructure
Giving other agents an interface: wrapping a site's endpoints as MCP tools
The symptom
Automation against the site meant screen-scraping and hand-written HTTP calls, with the payment flow reimplemented each time.
What was actually wrong
Each capability needed a typed tool with a description, plus a machine-readable view of the site's live state. Publishing that over a transport an agent framework already speaks removes the scraping layer entirely.
The fix
A small server exposing eight tools — order creation, ad listing, the paid assistant, invoice retrieval, balance lookup, status, market data and a raw HTTP escape hatch — plus two resources for status and ads, run under a supervisor and proxied by the web server.
What we took away
One implementation detail worth knowing: the proxy must forward the host header the application expects, or the framework's own host validation rejects every request. When an embedded server sits behind a proxy, that header is part of the contract.