Pricing Academy Blog

Add an MCP server to Claude Code

Connect Claude Code to your funnel pages with one claude mcp add command and the MCP (Model Context Protocol) server built into the ef CLI.

Academy tutorial6 stepsAbout 10 minutesIntermediate
What you'll build

Claude Code connected to your ElasticFunnels brand through ef mcp, the MCP server that ships with the ef CLI (command-line tool). You add it to the project with claude mcp add, approve it once, then ask Claude in plain English to list your pages and to change a headline, saved as a draft so nothing goes live until you publish it.

New to Claude Code? Read the full guide first: Claude Code for marketing shows what an agent can do with your funnels, from a brief to a split-test result. Using Claude Desktop instead? That setup is in Claude Desktop MCP.

You need Claude Code, installed and signed in, Node.js 18 or newer, and the CLI: npm i -g @elasticfunnels/cli. Then bind a folder to your brand once. ef init signs you in through the browser and stores the key in .ef/auth, readable only by you:

mkdir northwind && cd northwind
ef init

1Open the folder ef init bound

In a terminal, go to that folder. ls -a shows the .ef folder that holds the binding, and ef pages list proves it reaches your brand: it prints your pages with their ids.

In the northwind folder, ls -a shows the .ef folder, and ef pages list prints four pages with their ids, slugs and titles
The demo brand's folder. Run every command below from the same folder.

2Add the server with claude mcp add

Run claude mcp add --scope project elasticfunnels -- ef mcp. elasticfunnels is the name Claude will show; everything after -- is the command it starts. --scope project writes the entry to .mcp.json in the folder. Open that file: it names the command and holds no key.

claude mcp add --scope project elasticfunnels -- ef mcp adds the server to the project config; cat .mcp.json shows the command ef with the argument mcp and no key
Leave out --scope project to keep the server private to you in this folder (the default, local scope).

3Start Claude Code and approve the server

Run claude in the folder. Claude Code finds the new server in .mcp.json and asks before it uses it: pick Use this MCP server. Then type /mcp to see it connected, with its 8 tools.

claude starts, the New MCP server found in this project: elasticfunnels prompt is answered with Use this MCP server, and /mcp shows elasticfunnels connected with 8 tools
A project server is never used until someone on that computer approves it. Press Esc to close the /mcp panel.

4Ask Claude to list your pages

Type your first prompt: Use the elasticfunnels MCP server to list my pages. Claude calls the Ef List Pages tool and asks you first; choose Yes. It answers with a table of ids, titles, slugs and status.

The prompt asks Claude to list the pages with the elasticfunnels MCP server; Claude asks to run Ef List Pages, Yes is chosen, and a table of the four pages comes back
The wait while Claude thinks is sped up in this clip.

5Change a page and save it as a draft

Ask for a change in plain English and say draft: change the headline of the Sleep Stack presell to "Fall asleep faster, wake up clear". Save it as a draft, do not publish. Claude reads the page, then asks before it runs Ef Update Page Html, the tool that writes. Choose Yes.

Claude reads the Sleep Stack presell, asks to run Ef Update Page Html with the new headline, and after Yes confirms it was saved as a draft and the live page is unchanged
Without draft, the update tool publishes at once. Reading was already allowed in this clip; writing still asks. The wait is sped up.

6Check the connection any time

Back in the terminal, claude mcp list shows each server and whether it connects. claude mcp get elasticfunnels shows its scope, command and the exact command to remove it.

claude mcp list shows elasticfunnels connected; claude mcp get elasticfunnels shows the project scope, the ef mcp command and how to remove it
Pending approval here means nobody has approved the server yet: start claude in the folder and answer the prompt.

Common mistakes

  • Running claude mcp add outside the bound folder. ef mcp finds its key by walking up from the folder Claude Code starts it in. Run both commands where ef init ran.
  • Picking "Continue without using this MCP server". Claude remembers that choice. Run claude mcp reset-project-choices in the folder and start claude again.
  • Asking for an edit without saying draft. The update tool publishes immediately unless it is told to save a draft.
  • Pasting an API key into the config. Not needed: .mcp.json only names the command, and the key stays in .ef/auth.
  • Expecting split tests or stats through MCP. The server covers pages, components and products. For split tests and numbers, Claude Code runs the ef CLI itself (ef pages events, ef stats).

Keep going

What an agent can do with your funnels, end to end: Claude Code for marketing. The same server in the desktop app: Claude Desktop MCP. Everything agents can do in ElasticFunnels: AI marketing agents and the ef CLI. Build the page by hand instead: how to make a landing page. All tutorials: the Academy.

FAQ

Claude Code MCP FAQ

How do I add an MCP server to Claude Code?

Run claude mcp add with a name, two dashes and the command that starts the server. For ElasticFunnels that is claude mcp add --scope project elasticfunnels -- ef mcp in the folder you bound with ef init. Start claude and approve it.

Where do MCP servers go in Claude Code?

It depends on the scope. Local (the default) is private to you in one folder; project writes a .mcp.json file in the folder that you can share with your team; user makes the server available in every folder. Pick it with --scope.

What is an MCP server?

A small program that gives an AI app a set of tools over the Model Context Protocol. Claude Code starts it, asks which tools it has, and calls them when a task needs them. ef mcp is the ElasticFunnels one.

What is the difference between an API and an MCP server?

An API is for programs you write. An MCP server wraps actions in named tools with descriptions, so an AI app can find them and call them on its own. ef mcp uses the ElasticFunnels API for you, with the key from your folder.

Is it safe to connect an MCP server?

Claude Code asks before it uses a new project server and before each tool call, unless you allow a tool. The ElasticFunnels key is never in the config: it stays in the folder's .ef/auth file, which only your user can read.

Is the Claude Code MCP free?

Adding MCP servers is part of Claude Code; you only need a Claude account that can run Claude Code. The ef CLI and its MCP server are included on every ElasticFunnels plan.

What can Claude do through the ElasticFunnels MCP server?

It has 8 tools: list pages, read a page, create a page, update a page's HTML (live or as a draft), list and read components, list products, and get a preview link.

Can Claude Code edit my landing pages?

Yes. It reads the page first and then replaces its HTML with your change. Ask for a draft and the live page stays as it is until you publish.

Which pages does it list?

The pages you edit as code, the same ones ef pull syncs to your folder. Pages built in the drag and drop builder are edited in the app.

Can it set up split tests or read stats?

Not through ef mcp. Claude Code can run the ef CLI for those: ef pages events for split tests and ef stats for the numbers. Claude Code for marketing walks through a full test.

Why can't Claude connect to my MCP server?

Run claude mcp list. Pending approval means the server was never approved: start claude in the folder and approve it. Failed usually means ef is not on your PATH or the folder is not bound: run ef pages list there to check.

Can I use the same server in Claude Desktop?

Yes. Claude Desktop reads it from its own config file with the full path to ef and your folder. See Claude Desktop MCP.

How do I remove the server?

Run claude mcp remove elasticfunnels -s project in the folder (use -s local or -s user for the other scopes). Your pages and your key are not touched.

Give Claude Code your funnel pages

Every feature on every plan. Start a 14-day free trial.