MCP Use Cases
This page provides practical examples of how to interact with WIXY using an AI agent.
Available Tools Referenceโ
Your AI agent automatically understands these tools through their JSON Schema:
listStubs: Get all active mappings.createStub(json): Add a new mapping.deleteStub(id): Remove a mapping.enableProxy(url): Turn on upstream forwarding.disableProxy: Turn off forwarding.startRecording(url): Capture traffic.stopRecording: Save captured traffic as stubs.
๐จโ๐ป For Developers: Rapid Scaffoldingโ
Scenario: You are building a checkout page and the payment service isn't ready.
- User: "Claude, I need a mock for the payment service. It's a POST to
/api/v1/pay. It should accept a JSON withamountandcurrency. If successful, return a 201 Created with a transaction ID likeTXN-XXXX." - AI Action: Generates WireMock JSON and calls
createStub. - AI Result: "I've created the payment mock for you. You can now send POST requests to port 9090."
๐งช For QA: Environment Managementโ
Scenario: You need to capture a complex state from a staging environment.
- User: "Start recording traffic from
https://staging.acme.com. I'm going to run the 'Forgot Password' flow now." - User Action: (Performs the UI steps)
- User: "Stop recording and tell me what you captured."
- AI Action: Calls
stopRecording, audits the new stubs. - AI Result: "Recording stopped. I captured 4 stubs including
/api/auth/resetand/api/mail/sent. They are now active in WIXY for offline use."
๐ก๏ธ For DevOps: Resilience Testingโ
Scenario: You want to see how the system handles a partial outage.
- User: "I want to test our 'circuit breaker' implementation. Make the inventory service at
/api/inventory/.*return a 503 error with a 2-second delay for every request." - AI Action: Creates a high-priority stub with
fixedDelayMillisecondsand a 503 status. - AI Result: "The inventory service is now simulating a slow failure state. You can verify your circuit breakers now."
๐ค Advanced: Self-Healing Testsโ
AI agents can use WIXY's tools to fix test environments autonomously:
- AI: "I see the integration test for 'User Profile' failed with a 404."
- AI: (Calls
listStubs) "The stubs are present, but the path is/v1/userswhile the code is calling/v2/users." - AI: (Calls
createStub) "I've added a mapping for/v2/usersto match the new API version. Retrying tests..."