Micro cover image

Use GPT-5 with Playwright MCP to Auto-link Posts

Quick Cursor workflow using GPT-5 plus Playwright MCP to add named-entity links in blog posts.
August 10, 2025 5 min

About a month ago, Jason Liu wrote on LinkedIn:

the cursor for writing is just cursor,

my copy writer uses @cursor_ai for most of the writing now.

I strongly identified—the key here is that Markdown is an outstanding content authoring language, and Cursor, as an AI-enabled editor, is quite smart about applying AI to Markdown. I leveraged Cursor’s AI capabilities mostly for repetitive tasks like scaffolding social media directory structures, transforming my hand-written posts into smaller, social-friendly versions for LinkedIn and Mastodon, and creating tables such as those in my AI Engineer World’s Fair writeups.1

Over the past few days, I’ve been exploring what OpenAI’s GPT-5 model(s) are capable of in Cursor. I’ve also been seeking real-life, high-value MCP use cases. I stumbled into an awesome little scenario that gave me a chance to apply both GPT-5 with MCP together and shave hours off my post-preparation time. Full disclosure: I haven’t yet tried this workflow with other models like my go-to Sonnet 4, and it’s possible the same workflow may work there as well. That said, I suspect GPT-5’s way of approaching problems might have an edge in this case. See what you think—this post is an example, 90% of the links in this post were GPT-5 created and these were all correct.

My posting workflow is: write the post, then polish it—often with images and links. Links are one of those tasks that just take time: first, select which items (the ML term “named entities” is exactly right here) need links, then web searching to find the right authoritative source to link to, then inserting the Markdown link syntax. It’s not too hard, but after the hard mental effort of writing the post itself, I’m rarely in the mood for another 30 minutes of researching and link-crafting.

Before GPT-5 and tool use, I’ve had the AI auto-generate links, but hallucination was often a serious problem. The links would get generated, but half of them would be wrong. Even this broken workflow saved time, but it seemed like the AI should be able to do better.

Solution: Cursor + GPT-5 + Playwright MCP + Reusable Prompt

As I started to understand how GPT-5 approached problems, I decided to ask it to auto-generate links. It did the best job of any model I had tried so far, but there were still problems with bad links, as on its own, GPT-5 could web search, but it couldn’t examine the results to make sure they were good and appropriate. So I had a little side chat with GPT-5 via ChatGPT about these, where we quickly concluded that a tool like Playwright, made available to GPT-5 via MCP and Cursor’s very solid MCP support, would enable GPT-5 to check its work. After much MCP plumbing work (early days for to me still) and many iterations of prompts to GPT-5, I got it working! Now 80-90% of my post links are AI-generated and accurate, and my posts end up fully resource-linked, as opposed to slightly or not at all.

This was a valuable prompt, worthy of being captured and made reusable. So I had GPT-5 craft that prompt based on the conversations we’d been having, and propose a solution for saving it for reuse.

Here’s the current iteration of that prompt—note that this definitely suboptimal and needs work:

## Named Entity Linking with Playwright

ToDos:
- link to other content in the blog is fine, look for self-references such as "my AI Engineer World's Fair writeups"
- people links: if linkedin, need to make sure this is the right person

**Task**: Use Playwright to add markdown links for all important non-obvious named entities in a blog post, avoiding obvious/common terms.

**Instructions**:

1. **Identify Named Entities**: Scan the post content for specific products, companies, technologies, platforms, and services that readers might want to learn more about. Important: only link the first appearance of a term.

2. **Avoid Obvious Terms**: Do NOT link common/obvious terms like:
   - Operating systems (macOS, Windows, Linux)
   - Generic platforms (GitHub, Twitter, YouTube)
   - Common file formats or protocols
   - Basic technical terms

3. **Link Strategy**: Link to **informational pages**, not direct tool access:
   - Product announcement pages
   - Overview/feature pages
   - Company about pages
   - Documentation pages
   - Avoid login/signup pages

4. **Playwright Testing Process**:
   - Navigate to each potential link URL
   - If you detect a Cloudflare interstitial (e.g., "Just a moment...", element id `cf-please-wait`, `[data-translate="checking_browser"]`, or iframe URL containing "challenge"):
     - Wait up to 30s, checking every 1-2s
     - If still present, reload once and wait again up to 15s
     - If still present, mark as "UNRESOLVED (CF gate)" and continue
   - Verify the page loads and contains relevant content
   - Only use links that are accessible

5. **Link Format**: Use standard markdown format: `[Entity Name](URL)`

6. **Content Preservation**: 
   - ONLY modify links
   - Do NOT change any other content
   - Ignore linter errors (they aren't accurate for markdown)

**Example Entities to Link**:
- AI models (GPT-5, Claude, Sonnet 4, Opus 4.1)
- AI platforms (ChatGPT, Cursor, Claude Artifacts)
- Specific technologies (MCP, Claude Artifacts, ChatGPT Canvas)
- Specialized services (Claude Team)
- Companies that aren't extremely well known (Dagger, MotherDuck, MongoDB)
- Product names that aren't extremely well known

**Example Entities to Avoid**:
- Extremely well known companies (Apple, Google, OpenAI, Anthropic, Microsoft)
- Extremely well known product names (macOS, GitHub, Windows, Linux, iPhone)
- Basic web platforms
- Common file formats
- Generic technical terms

**Output**: Update the markdown file with appropriate links while preserving all other content exactly as-is.

  1. Check out the Maven video Jason and his copywriter Taylor Bell did on copywriting with AI—really advanced on both the tech and science-of-great-copywriting fronts. ↩︎