# From Days to Hours on a Full Product Integration source: https://developer.mastercard.com/blog/agentic-integration/index.md Authors: Filipe Alves. Dogfooding the Mastercard Developers Agent Toolkit We used the Mastercard Developers Model Context Protocol (MCP) server to integrate Consumer Clarity from scratch. Our time-to-first-successful-API-call dropped from days to hours. The toolkit compressed tedious discovery work, freeing us to focus on security, quality, and product fit. From Skepticism to Speed: Our Agentic Integration Experiment I'd like to paint you a picture: you are staring at API documentation for a new integration. Tabs multiply across your browser as you piece together OAuth flows, endpoint paths, and request structures. Three hours later, you are still hunting for that one missing header blocking your first successful call. When we launched the Mastercard Developers Agent Toolkit, we wanted to test if AI assistants could compress this discovery phase. So, we dogfooded it. We picked Ethoca Consumer Clarity as our integration target and challenged ourselves to go from zero to working sandbox implementations across 3 languages: Node.js, Python, and Java with Spring Boot. Our setup was straightforward: Cursor, Claude Desktop, and VS Code with GitHub Copilot, all connected to the Mastercard MCP server. Our rule: lean on the AI assistant at every step, but never compromise on security or quality. The result: time normally spent on tedious discovery and boilerplate setup collapsed from days into hours. Most AI coding assistants fly blind when it comes to external APIs. They sometimes hallucinate endpoints, invent parameters, and generate authentication code that looks plausible but fails silently. But using our Agent Toolkit MCP changes this by giving AI assistants direct access to authoritative documentation, OpenAPI specifications, and sample payloads. How It Works in Practice Pairing with an AI assistant directly in the IDE lets it propose, refine, and iterate on boilerplate while you guide the architecture and verify the output. With the Mastercard MCP server wired up, here is a typical flow: Discovery Prompt: "What Mastercard APIs are available related to transaction enrichment for issuers?" The assistant enumerated products and surfaced Ethoca Consumer Clarity documentation without us hunting through the developer portal. Scaffold the First Call Prompt: "Generate a minimal Ethoca Consumer Clarity sandbox call in Python, authenticating as per the documentation. Leave credentials as environment variable placeholders." The assistant drafted an OAuth-signed request with proper headers, pulling structure directly from the OpenAPI spec. No guesswork, no hallucinated endpoints. Iterate on Errors When our first attempt failed with a 401, we did not need to debug blind: Prompt: "I'm getting a 401. Check the OpenAPI spec for required headers and verify my request structure." The assistant caught a missing content-type header and corrected the signature base string format. Fixes that would have taken 20 minutes of manual doc diving. The Prompt Pattern That Worked After several iterations, we landed on this structure: Use the Mastercard Developers MCP to discover Ethoca Consumer Clarity, load its OpenAPI spec, and generate a sandbox request in \[LANGUAGE\] for \[ENDPOINT\]. Requirements: Authenticate per documentation guidelines Include all required headers from the OpenAPI spec Use environment variables for credentials Show me a curl equivalent for verification Validate everything against the OpenAPI specification. Notice the guardrails: we explicitly asked for OpenAPI validation and a curl equivalent. This forced the assistant to show the work. What Actually Got Faster We tracked 2 key metrics: upfront analysis time (discovering endpoints, reading docs, understanding request structure) and time-to-first-successful-API-call (from project creation to a working sandbox request). Results across all 3 language targets: 70% reduction in upfront analysis time Time-to-first-successful-API-call dropped from days to hours, consistently Error resolution loops shortened dramatically because the assistant referenced OpenAPI specs instead of hallucinating fixes The speed gains came from compression of tedious work, not elimination of engineering judgment. We still wrote tests, designed retry logic, and made architectural decisions. We just stopped wasting time hunting for endpoint paths or hand-crafting OAuth signatures. Here is a concrete example. In our Java Spring Boot implementation, generating the full OAuth 1.0a signature flow manually would have taken an experienced developer 2 to 3 hours. This includes finding the right library, understanding parameter ordering, and debugging signature mismatches. With the agent, we had working code in 25 minutes, including time to verify against Mastercard's official OAuth library. Where We Applied Extra Scrutiny (and Why You Should Too) Agentic coding is not a substitute for experienced engineers. Two areas where your judgment remains non-negotiable: Security and governance: We used Mastercard's official OAuth library, stored credentials outside source control, and implemented log redaction for sensitive values. AI assistants can suggest patterns, but they cannot own your threat model or understand your compliance requirements. Every security decision got human review. Integration quality: Retry semantics, idempotency keys, pagination logic, and failure simulation all required human-driven test design. The assistant could generate the boilerplate, but we designed the test cases and verified behavior under failure conditions. Fast scaffolding can tempt you into shallow testing. Resist that trap. Three Common Problems and Their Fixes Hallucinated API paths Without MCP, AI assistants frequently invent endpoints that don't exist because they're working from patterns they've seen in training data rather than accurate specifications. Our MCP server eliminates this problem by providing the assistant with authoritative OpenAPI specifications directly from Mastercard. Fix: Add this to every prompt: "Use only endpoints documented in the OpenAPI specification. If an endpoint is not in the spec, tell me instead of inventing one." This eliminated hallucination drift entirely. Scope creep in code generation Without constraints, the assistant would refactor unrelated code or add new dependencies. Fix: Be explicit about boundaries: "Touch only files in /integrations/mastercard and associated tests. Reuse existing HttpClient; do not add new HTTP libraries." Client preference paralysis We tested Cursor, Claude Desktop, and VS Code with GitHub Copilot. Outcome: it did not matter which we used. The MCP contract delivered the value, not the specific client. Takeaway: Use whichever IDE agent your team already knows. Do not switch tools for this. What We Recommend if You Start Tomorrow Start with the IDE you already use. The agent client is secondary to the MCP connection. Use Cursor, Claude Desktop, VS Code, or whatever your team has muscle memory for. Force the agent to show its work. Always ask for OpenAPI validation and curl equivalents. This makes verification instant and catches hallucinations before they become bugs. Keep secrets out of the conversation loop. Use environment variable placeholders in generated code. Never paste credentials into chat contexts. Configure actual credentials separately after code generation. Create an agent-specific instructions file for your project Spend 30 minutes documenting your module structure, shared utilities, and integration patterns in the format your IDE agent recognizes (.github/copilot-instructions.md for GitHub Copilot, .claude/CLAUDE.md for Claude, AGENTS.md for Codex, etc.). This upfront investment will save hours of correcting misplaced code. Use tests as guardrails. Write your integration test first, with the structure and assertions you want. Let the assistant fill in the implementation that makes the test pass. This naturally enforces your architectural patterns. The Real Value: Removing Drudgery So Engineers Can Focus on What Matters Agentic development is not about replacing engineers. It is about removing tedious work so developers can focus on system design, quality, and product fit. Discovery work (finding the right endpoint, understanding authentication requirements, structuring request bodies) happens dramatically faster. The critical decisions (designing failure modes, ensuring security, building great user experiences) remain firmly in human hands, where they belong. After dogfooding the Mastercard Developers Agent Toolkit, our conclusion is simple: with MCP in the loop, you get to the real work faster. Less time fighting documentation. More time building what matters. If you would like to get started with the Agent Toolkit on your next Mastercard API integration, visit https://developer.mastercard.com/ai/.