Hook (1-2 sentences): Writing boilerplate wrapper functions for every Domo API endpoint is tedious — and if your endpoint list grows, doing it by hand stops scaling fast. This walkthrough shows how to turn a Postman collection into auto-generated Python functions, then expose them as an MCP server using FastMCP and DomoLibrary.
Why It Matters (2-4 sentences): Without this, every new Domo integration means manually inspecting network traffic, reverse-engineering endpoint signatures, and writing functions that all follow the same pattern anyway. Automating that generation step means you can scaffold 50 consistent, callable functions in the time it takes to click through a Domo UI. Once those functions exist, wrapping them in an MCP server makes them available to any AI agent or tool that speaks the Model Context Protocol — turning your Domo instance into a first-class data source for LLM-powered workflows.
What You'll Learn
- Inspect browser network traffic to discover undocumented Domo API endpoints
- Use a Postman collection as a structured source of truth for endpoint signatures
- Auto-generate Python wrapper functions with consistent signatures from that collection
- Understand how DomoLibrary handles auth headers and base URL abstraction
- Wire generated functions into a FastMCP server so AI agents can call them
From Network Traffic to MCP Tool: The Code Generation Pipeline
The process starts at the browser dev tools. By clicking through Domo features with the Network tab open, you capture the exact requests the UI makes — including endpoints that have no official documentation. These requests get saved into a Postman collection, which becomes the canonical list of everything you want to wrap.
The generation step reads that collection and emits Python functions that all share the same handwriting: they accept an auth object carrying a base_url, destructure auth headers onto the request, and call requests with the assembled URL. The result isn't production-ready — the generated functions need massaging — but they give you working scaffolding that's consistent across every endpoint, which is the hard part.
DomoLibrary does the underlying heavy lifting: it normalizes how credentials and base URLs flow through your code so individual functions don't have to re-implement auth logic. The pattern is worth studying even if you're not targeting Domo, because the same "capture traffic → generate wrappers → standardize auth" approach applies to any undocumented internal API.
FastMCP then takes those functions and exposes them as MCP tools. The setup is minimal — decorate your functions, spin up the server, and any MCP-compatible client (Claude, Cursor, a custom agent) can now call into Domo with structured tool calls. The real payoff is that the generation step and the MCP wrapping step are both repeatable: add new endpoints to your Postman collection, regenerate, redeploy.

