---
title: "Build a Marketing Research Agent in Cursor via MCP | Minds"
canonical_url: "https://getminds.ai/blog/build-marketing-research-agent-cursor-minds-mcp"
last_updated: "2026-06-22T02:05:18.314Z"
meta:
  description: "A worked walkthrough of building a custom marketing research agent in Cursor that pulls from PostHog, runs Minds panels, and posts to Slack."
  "og:description": "A worked walkthrough of building a custom marketing research agent in Cursor that pulls from PostHog, runs Minds panels, and posts to Slack."
  "og:title": "Build a Marketing Research Agent in Cursor via MCP | Minds"
  "twitter:description": "A worked walkthrough of building a custom marketing research agent in Cursor that pulls from PostHog, runs Minds panels, and posts to Slack."
  "twitter:title": "Build a Marketing Research Agent in Cursor via MCP | Minds"
---

Minds

May 6, 2026·How-to·Minds Team

# **Build a Marketing Research Agent in Cursor via MCP**

A worked walkthrough of building a custom marketing research agent in Cursor that pulls from PostHog, runs Minds panels, and posts to Slack.

[Get a Minds API key](https://getminds.ai/?register=true)

This guide is for someone who wants to build a custom marketing research agent rather than use one off the shelf. The end result is an agent inside Cursor that takes a research brief in plain language, pulls product analytics from PostHog, runs a synthetic panel with Minds, cross-references the two, and posts a summary to Slack. About 90 minutes of work end-to-end if you already have accounts at the three services.

The point isn't to ship a polished product. It's to make the agentic loop concrete: agent receives brief, agent calls multiple MCP servers in sequence, agent reasons about the joint result, agent reports back. Once you've built one, the pattern composes to whatever else you want to build.

## Prerequisites

Three accounts and three API keys:

- A Minds account with an API key ( `minds_…`). Sign up at getminds.ai if you don't have one.
- A PostHog account with a personal API key.
- A Slack workspace where you can post to a channel via a webhook or app token.

A Cursor install (or any editor with MCP support: VS Code with Copilot works the same way).

About 30 minutes of focused setup time, then 60 minutes of iteration on the agent's brief and prompt.

## Step 1: Connect the three MCP servers

Each of the three services exposes an MCP server. We'll connect all three to Cursor.

In Cursor, open Settings → MCP and add three servers.

_Minds._ Add the [Minds MCP server for market research](https://getminds.ai/mcp/overview) with URL `https://getminds.ai/mcp` and authorize via OAuth. The 12 Minds tools (`create_panel`, `ask_panel`, `export_panel`, etc.) appear in your tool picker. For client-specific steps, use the [Minds MCP setup guide](https://getminds.ai/mcp/setup).

_PostHog._ PostHog ships its own MCP server. The recommended setup is the remote endpoint at `https://app.posthog.com/mcp`, again with OAuth. You get 55 tools covering events, funnels, cohorts, and dashboards.

_Slack._ The Slack MCP server is available via npm. Add it as a stdio server with `npx -y @modelcontextprotocol/server-slack` and your Slack bot token in the env. Two tools are enough: `slack_post_message` and `slack_list_channels`.

Restart Cursor. All three servers should appear in the agent's tool list. Test each by asking the agent to list panels (Minds), list cohorts (PostHog), and list channels (Slack).

## Step 2: Pick a research workflow worth automating

The agent is only as useful as the workflow you give it. Pick something specific. The example we'll build:

> Take a feature name, find users who used the feature in the last 30 days in PostHog, characterize them as a synthetic persona via Minds, ask that persona why they would or wouldn't recommend the feature, and post a summary to #product-research in Slack.

This pattern (real-data grounding plus synthetic enrichment plus team distribution) is reusable across many decisions. Substitute your own.

## Step 3: Write the agent prompt

Put the agent prompt in a Cursor `.cursorrules` file or as the system message of your agent session. The structure that works:

```
You are a marketing research agent. Your job is to take a feature name as input
and return a recommendation summary, posted to Slack.

For each request, do the following in order:

1. Use PostHog tools to find users who triggered the feature event in the last
   30 days. Get a count and basic properties (plan tier, account age, region).

2. Build a Minds persona that matches the dominant cohort from step 1. Use
   \`create_mind\` with a description that captures the cohort's plan tier,
   tenure, and likely role.

3. Create a panel of three personas matching that profile, using \`create_panel\`
   then \`ask_panel\`. Ask: "Would you recommend this feature to a colleague?
   Why or why not? What would have to change for it to be a yes?"

4. Cross-reference the panel response against the PostHog data. Look for
   alignment (do the panel's stated reasons match the actual usage patterns?)
   and gaps (does the panel surface concerns the metrics don't show?).

5. Post a summary to #product-research in Slack with three sections:
   - Cohort profile (who used it)
   - Panel verdict (recommend or not, top stated reasons)
   - Recommended action (what to do next)

Keep the Slack summary under 500 words. Link back to the full panel export.
```

This prompt does three things deliberately:

- It hard-orders the steps so the agent doesn't shortcut.
- It tells the agent how to compose results across tools, not just how to call them.
- It bounds the output so the Slack message is actually readable.

## Step 4: Test against a real feature

Pick a feature your product actually shipped. Run the agent. The expected sequence:

1. Agent calls PostHog `events` query for `feature_used` filtered to the feature name and last 30 days. Returns a count and a sample.
2. Agent calls PostHog `cohorts` to characterize the users. Identifies the dominant plan tier and average account age.
3. Agent calls Minds `create_mind` with a persona description like "Mid-tier paying customer, 6 to 18 months on the platform, primary user of feature category."
4. Agent calls Minds `create_panel` with three of those personas.
5. Agent calls Minds `ask_panel` with the recommendation question.
6. Agent reads the responses. Calls Minds `export_panel` to save the full session for the Slack link.
7. Agent calls Slack `slack_post_message` with the structured summary and the export link.

End-to-end time: 60 to 120 seconds depending on the cohort size and panel response length. End-to-end cost: roughly $0.15 in MCP-call costs plus $0.05 in agent inference.

If any step fails, the agent will usually retry once or pivot. If it gets stuck, the most common cause is a brittle prompt at step 4 (the persona description doesn't fit the cohort cleanly). Re-write the persona description prompt to be more flexible and re-run.

## Step 5: Schedule it

The agent only generates value if it runs without you. Two paths:

_Manual trigger via Slack._ Add a `/research [feature-name]` slash command that triggers the Cursor agent. This is the simplest path and works for ad-hoc research.

_Cron trigger._ Use a CI workflow (GitHub Actions, Linear automation, anything that can run on a schedule) to send a list of feature names to the agent endpoint each Monday. The agent runs the workflow once per feature and posts each summary. The team gets a Monday-morning research digest with no human overhead.

The cron path is where the value compounds. A team that runs feature-level research on every shipped feature for a quarter learns more about its product than a team that runs one big study a year, and at less than 5 percent of the cost.

## Where Custom Agents Beat Off-the-Shelf

The argument for building this rather than using a packaged research tool:

_Workflow specificity._ Off-the-shelf tools optimize for the most common case. Your team's research workflow is rarely the most common case. A custom agent fits your decision rhythm exactly.

_Tool composition._ The interesting moves happen when synthetic research is grounded against real product data, then distributed in your team's channel. No off-the-shelf tool does the full chain. A custom agent stitching three MCPs does.

_Cost control._ You pay per call, per service. No seat licenses, no platform fees on top. Heavy usage works out cheaper than packaged tools at the team scale; light usage is essentially free.

_Iteration velocity._ Changing the workflow is changing the prompt. No vendor roadmap, no feature requests. The constraint is your own attention, not someone else's release cycle.

## Common Gotchas

A few sharp edges from running this in production:

- _Persona drift across calls._ If you create a new Mind for every run, the persona profile shifts subtly each time. Persist the Mind once (cache the ID) and reuse it. The Minds MCP exposes `list_minds` for exactly this.
- _PostHog query timeouts._ Large cohorts time out the agent. Cap the cohort size in the prompt or pre-filter to a representative sample.
- _Slack message size limits._ Slack truncates messages over 4000 characters. The 500-word cap in the prompt is well under that, but if the agent ignores it, post as a thread instead of a single message.
- _OAuth token rotation._ All three services rotate tokens periodically. If the agent suddenly stops working, re-authorize each connector before debugging the prompt.

## Where This Goes

The single-feature recommendation workflow is the starting point. Once it's working, the same agent generalizes to:

- Weekly campaign-effectiveness loops (run synthetic ad reactions before the campaign goes live, validate against actual click-through after)
- Monthly competitive positioning (run synthetic panels against competitor messaging, cross-reference against your own conversion data)
- Quarterly persona refresh (update synthetic personas based on observed product behaviour shifts)

Each is the same shape: real data grounding, synthetic enrichment, team distribution. Build the first one. The rest are variations.

For more on what's worth connecting alongside, see [the best MCP servers for marketing and research agents in 2026](https://getminds.ai/blog/best-mcp-servers-marketing-research-agents-2026). For the underlying category, see [agentic market research, defined](https://getminds.ai/blog/agentic-market-research-definition). For the trust question on synthetic output, see [validating agentic research output](https://getminds.ai/blog/validating-agentic-research-output-eval-frameworks).