Using Apify Actors as MCP tools for product data in a Next.js dog‑fashion app
Description and use
Using Apify Actors as MCP tools to automatically fetch up‑to‑date e‑commerce product data in a Next.js dog‑fashion recommendation app.
Problem
The developer needed up‑to‑date e‑commerce product data for a dog‑fashion recommendation app without manually scraping or copying URLs from Amazon and eBay.
Outcome
The integration allowed the app to automatically retrieve up‑to‑date product listings from Amazon and eBay, eliminating manual scraping and reducing maintenance overhead.
Workflow
- 1. Create an Apify account and obtain an API token or OAuth credentials.
- 2. Install opencode and configure its MCP settings to point to https://mcp.apify.com with desired tools (fetch‑actor‑details, apify/e-commerce‑scraping‑tool).
- 3. Authenticate opencode with Apify via OAuth (opencode mcp auth apify).
- 4. Use opencode to test the tool by asking a natural language query (e.g., "Find me ecommerce product poodle dog harness").
- 5. Write a TypeScript client in the Next.js app that uses the @modelcontextprotocol/sdk to call the MCP server, poll for run completion, and fetch dataset items.
- 6. Handle missing API token and error states in the client code.
- 7. Deploy the app; the server-side code fetches product data on each request, returning real listings to the frontend.
Evidence
I asked opencode a plain-English question: Find me ecommerce product poodle dog harness. opencode picked the apify--e-commerce-scraping-tool tool, called it, polled the run, and read the dataset.
- Record date: 2026-09-15T07:31:12.088Z