Mock features, not (just) APIs: an AI-native approach to prototyping

Tom Akehurst
CTO and Co-founder
May 20, 2025

The need to ship code faster and with leaner teams is an unavoidable fact for most current-day software organizations. Towards this end, teams need to remove blockers that inhibit developer productivity.

A common blocker in microservices or other integration-heavy environments is sequential development (where Team A depends on a service being developed by Team B and cannot make real progress in the meantime). Below we look at a way to use modern AI tools and API simulation to accelerate parallel development while creating minimal integration overhead.

The basic idea will be to use AI to build both a working API simulation and a full-fledged feature prototype, which will serve as the functional contract between the teams - so that both can keep building and testing uninterrupted, while reducing possibilities for drift from the agreed contract.

How Parallel Development Boosts Developer Productivity

Ever spend a week refreshing JIRA, hoping that API dependency would finally get marked "Ready for Integration"? Microservices and API-heavy architectures promise flexibility but in many cases deliver new bottlenecks. Your frontend team sits idle waiting for backend endpoints, your payment system stalls until the billing service is complete, and timelines stretch indefinitely.

The alternative to these undesirable scenarios is parallel development. Instead of waiting in sequence, different teams agree on API contracts upfront. Dependent teams can continue shipping based on that contract, even when the actual service isn’t ready. Often the API-consuming teams will also generate mocks based on this specification, with the idea being to move to the production API once it’s ready.

In theory, this allows teams to work independently, with the idea that everything will eventually work nicely together. In practice, this doesn’t always work as expected. Requirements change, new constraints appear, and ideas that seemed perfectly reasonable on a whiteboard can turn out to be less viable in working code. Often these problems are only discovered late in the process, e.g. after the dependent team has already shipped a version based on the original API specification. Rework, delays, and loss of trust in the process ensue.

As we’ve covered in our previous blog article on API prototyping, WireMock Cloud tackles many of these problems with mock-first API prototyping. In this approach, teams start by creating a simulated API that serves as living contracts — functioning as both documentation and testable implementations. This helps create clearer expectations for API behavior before either side commits to production code, and makes it easier to keep prototypes up to date with changing requirements.

However, with modern AI agents, we can take this one step further…

AI Lets You Mock Features Instead of Just APIs

Mock-based prototyping still involves some guesswork because teams are trying to predict the shape of an API for a feature or service that doesn’t exist yet.

However, in 2025 you can go one step further. Rather than building around just a mock API, you can use AI to vibe-prototype complete features and their supporting APIs at the same time. This allows you to simulate entire user-facing functionality along with the backend behavior to match, and means your prototyped API will be that much closer to reality.

What’s the advantage?

The key benefit here is that your API design confers much more validity than something you sketched on a whiteboard based and an OpenAPI doc that might have been eyeballed by some engineers (“seems about right”). Instead you have a working feature that you have to grapple with, for better or worse - and this means:

  • More realistic tests: both the team building the API for this feature (the API producer), and the team who will be consuming this API, can better understand how the services will end up working together.
  • Shorter feedback loops: Developers can find ways to to improve APIs and integration points ahead of time, since they can see how actual components interact and the impact on users - which is much harder to do with just an API endpoint.
  • Less chance of spec drift: When changes need to be validated against live prototypes, it’s less likely that teams will fall out of sync and make unplanned or unannounced changes.

Using Cursor and the WireMock’s MCP Server to Move Faster and Keep Everything in Sync

Using WireMock Cloud’s MCP integration and AI coding agents such as Cursor makes it easy to implement these types of interactive prototyping workflows:

  • Developers describe the new feature plus the new API capabilities required to support it , and the AI agent quickly spins up a prototype, including the API client code.
  • Using the MCP integration, the agent also creates a corresponding mock that’s automatically synced with WireMock Cloud and is instantly ready to use. This is then wired into the local development configuration so that the app can be tested against it.
  • Stateful mocking can help us simulate multi-step application flows, such as the impact of backend actions on frontend behavior.
  • Developers can share, review, and revise the OpenAPI spec as requirements change, or simply ask the agent to do so for them.

Watch this demo to see how it works, step by step:

As you can see, we’re using Cursor’s AI-generated code with WireMock's stateful API simulation. Combining the two lets us to create functional implementations alongside backend simulations that maintain data persistence. In our example, a to-do list widget stores items, updates statuses, and handles deletions with changes that persist even after page refreshes - giving you a working prototype of both the frontend component and its backend support.

Behind the scenes, WireMock handles the stateful behavior using its dynamic state feature and response templating, storing data between API calls. The mocked API publishes instantly to WireMock Cloud, making it available to everyone on your team with auto-generated OpenAPI specs and documentation.

The MCP integration allows us to easily keep our mocks in sync with changing requirements. If a specification changes, developers can simply describe the change in natural language, and the AI agent can update both the frontend code and the matching API stubs, with changes immediately reflected in the shared OpenAPI specification. Both teams stay on the same page, without having to stop what they were doing to update mocks or specs.

A New Dawn for Parallel Development?

We try to avoid breathless declarations about how AI is about to change everything. Nevertheless, we are genuinely excited about the ability to use workflows like the one above to remove technical dependencies that hold back many software development teams. The ability to work against realistic simulations that can still be governed, controlled, and modified in order to accommodate specific testing patterns does a lot to close the gap between API contracts and real-world implementation.

The use of AI and API simulation enables development teams to get unblocked in minutes instead of weeks, significantly decreases nasty surprises during integration, and shifts testing left in the development lifecycle. In our example, it would mean that by the time that the actual backend arrives, frontend code has been thoroughly tested against behavior that mirrors the expected production environment.

With more capable AI and even better ways to integrate into existing developer practices, there’s a lot of potential here to save teams time, money, and developer headaches.

Start Using AI in WireMock Cloud

WireMock's MCP features are available to all users, including on the free tier. Download the CLI to get started.

/

Latest posts

Have More Questions?