How-to guides

Dynamic Landing Pages with MCP: How to Set Up Dynamic Text Replacement

Set up dynamic landing pages with MCP. Use dynamic text replacement to match text to URL parameters. How to do it with the Leadpages MCP server.

Published

Dynamic Landing Pages with MCP: How to Set Up Dynamic Text Replacement. A staircase of dots with 5 steps, one for each step in the guide.

A dynamic landing page changes what a visitor sees based on how they arrived. The simplest way to do that is dynamic text replacement: a piece of on-page text swaps to match the link the visitor clicked. With the Leadpages MCP server, you set up and manage these replacements by talking to your AI assistant in plain language.

Dynamic landing pages with MCP: the short answer

Visitors click with a specific offer in mind. The ad said "30-minute meal plans." The social post said "plant-based nutrition coaching." If the page they land on just says "Health coaching," many will bounce because the message does not match what they chose.

Dynamic text replacement closes that gap. You pick a text element on your page (a headline, subheadline, or call to action) and tie it to a parameter in the page's address. A visitor who arrives on ?plan=30-minute-meals sees "30-minute meal plans" in that spot. Someone who lands with ?plan=plant-based sees "Plant-based coaching." The page and layout stay the same.

The Leadpages MCP server turns setup into a short chat. You connect an AI assistant (Claude.ai, ChatGPT, Claude Desktop, Cursor, or n8n) to your Leadpages account through the Model Context Protocol. Then you say, "Add dynamic text replacement to the headline on my landing page so it reads the service parameter." The assistant calls the server's tools, applies the change, and tells you what it did.

Every Leadpages page also understands three built-in parameters for the headline, subheadline, and call to action. Those work without setup. Add the parameter to the URL and the text updates. For any other text on the page, set up a custom replacement, either in the app or through the MCP server.

How to set up dynamic text replacement with MCP, step by step

The steps are the same whether you do the work yourself or ask an AI assistant to handle it. Here is the method first, then how the MCP server fits into each step.

Step 1: Choose the text that will change

Pick one element on the page. The headline is the most common choice because it is the first thing people read. A subheadline or a call-to-action button also works well. Start with one element so the page still reads as a whole.

For a concrete example, picture a dog trainer who runs ads for "puppy training," "aggression rehab," and "service dog prep." She builds one landing page with her credentials, testimonials, and a lead form. She wants the main headline to match whichever ad the visitor clicked.

Step 2: Decide on the parameter name

A URL parameter is the part after a question mark in an address. For mysite.com/training?program=puppy, the parameter is program and the value is puppy. The name tells the page where to look. Choose a short, obvious word: offer, ad, keyword, service, program. Avoid spaces and special characters.

Write down the parameter name you will use across all links that point to the page. Every ad, email, and social post should use the same parameter name with a different value.

Step 3: Attach the parameter to the text element

Tell the page: when someone arrives with program=something, put that value into the headline. In Leadpages, you do this in the app by choosing the element, choosing a parameter, and saving. With the built-in headline parameter, you skip this step: the page already listens for ?headline=.

With the Leadpages MCP server, this step is one request. Connect your assistant, sign in to your Leadpages account, and type:

"On my dog training landing page, add a dynamic text replacement that reads the program parameter and shows it in the main headline."

The assistant calls the server's tool, applies the replacement to the page draft, and replies with what changed. It can also list every replacement on the page, change the parameter name later, or remove a replacement. Changes stay in the draft until you ask the assistant to publish.

Give each traffic source a unique link. For the puppy training ad, use mysite.com/training?program=puppy-training. For the aggression rehab ad, mysite.com/training?program=aggression-rehab. Use hyphens or underscores instead of spaces so the URL is valid. The words in the value are exactly what the visitor will see, so write them the way you want them to read.

If you use Leadpages' built-in parameters for headline, subheadline, and CTA, you can build a link like mysite.com/training?headline=Puppy+Training+That+Sticks&cta=Start+Training+Today. The plus signs represent spaces. The page decodes them automatically.

Step 5: Test before you send traffic

Open a private browser window and visit the page with each URL variation. Confirm the text changes as expected. If you see the default text, check that the parameter name matches exactly and that the page was published after the change. With the MCP server, remember changes land in the draft first. Ask the assistant to publish the draft before the live page updates.

How the MCP server changes the workflow

The same five steps apply, but the work moves from a settings panel to a chat window. You connect the server once: add it to Claude, ChatGPT, Cursor, or n8n, and sign in with your Leadpages account. After that, you make adjustments with plain-language requests. The assistant can also do batch tasks across multiple pages. For example: "Add the same program dynamic text replacement to the headline on every page on my 'Dog Training' site."

The assistant only does what you ask and reports what it changed, and the live page changes only when you publish.

Common problems (and what to do about each)

The page shows the default text instead of the replacement

In most cases, the draft was not published. The MCP server applies changes to the draft to keep the live page safe. Ask the assistant to publish, or publish inside Leadpages. Then test again.

The parameter name is missing or mistyped

Dynamic text replacement looks for an exact parameter name. ?program= is different from ?Program= and from ?progrm=. Check the spelling in every link you built. In the MCP server, ask the assistant to list the current replacements so you can confirm the parameter name.

The text shows %20 or + signs instead of spaces

Browsers encode spaces in URLs. Use hyphens between words (like puppy-training). Leadpages decodes built-in parameters automatically. For custom replacements, the value appears as written. If you want spaces, test %20 or use hyphens or underscores and accept that character in the output.

You replaced the wrong element

With the MCP server, ask the assistant to list all dynamic replacements on the page. It will show the element, the parameter, and the current state. Remove the wrong one and add it to the correct element.

The built-in parameters are not working

Every Leadpages page comes with built-in parameters for headline, subheadline, and call to action. They require no setup. If they do not work, check that the page has those sections. A page without a subheadline area will not show a subheadline replacement because there is nowhere to put it. Add the section, then test again.

What to do next after you set up dynamic pages

  • Review the page as a whole. Run your page through a free landing page analyzer. It scores clarity, focus, and persuasion, and flags parts that might confuse a visitor. A personalized headline works best on a page that is already clear and direct.
  • Sharpen your default headline. Many visitors arrive without a parameter from a direct link or search. Use the headline analyzer to improve the version they see by default.
  • Check mobile. A replaced headline can break to a second line. Load the page on a phone for each variation and confirm the text fits. If a long value wraps in an ugly way, shorten the value in the link.
  • Set up an A/B test. Once the dynamic page runs alongside your old static version, test which one gets more people to act. A/B testing in Leadpages lets you split traffic evenly and check results with a statistical significance calculator so you can trust the outcome.
  • Expand to more pages. Use this approach on a webinar registration page, a checkout page, or a thank-you page. The MCP server lets you set up replacements across multiple pages in one conversation.
  • Try the MCP server if you have not yet. If you set up replacements manually, connect the Leadpages MCP server to your assistant. Read the MCP server documentation or the guide to connecting an AI client.

Build a page and add dynamic text replacement with Leadpages. Start building free.

FAQ

Questions, answered

Dynamic text replacement changes a specific piece of text on a landing page to match the link a visitor clicked. A headline can read "Puppy Training" for one visitor and "Aggression Rehab" for another, all on the same page.

Connect your AI assistant (Claude, ChatGPT, Cursor, or n8n) to your Leadpages account through the MCP server. Then say which text element to make dynamic and which URL parameter to use. The assistant applies the change to your page draft and reports back.

Yes. In Leadpages you can set up dynamic text replacement in the app. The MCP server is an alternative that lets an AI assistant do the work with a short request.

Every page understands three built-in parameters: `headline`, `subheadline` and `cta`. You do not need to set up anything. Add the parameter to the page address and the text updates.

The most common cause is that changes are still in the draft and have not been published. Publish the draft, then test the URL again. Also check that the parameter name in the link matches exactly what you set on the page.

Ready to build?

Put it to work on your own page

Build, test and improve landing pages in one place.