Do you want to create and manage your OptinMonster campaigns from your terminal? With the OptinMonster MCP server, Claude Code connects to your account, so you can describe what you want in plain English, and it does the work for you with only the permissions you grant. In this article, you’ll learn how to connect Claude Code to OptinMonster.
Before You Start
- You’ll need Claude Code installed.
- You’ll sign in to OptinMonster during setup to approve the connection, so have your login ready.
Connecting Claude Code to OptinMonster
Note:
The command in step 1 adds OptinMonster to the folder you run it in. If you want OptinMonster in every folder, run this version instead: claude mcp add --transport http --scope user optinmonster https://mcp.optinmonster.com/mcp.
If you’d rather sign in from the terminal, run claude mcp login optinmonster after step 1, and then follow steps 7 to 9. When you’re done, the terminal shows Authenticated with “optinmonster”. Its tools are now available in Claude Code.
To connect Claude Code to OptinMonster, follow these steps:
- In your terminal, run
claude mcp add --transport http optinmonster https://mcp.optinmonster.com/mcp. Claude Code confirms that it added the server to your local config.
- Next, start Claude Code in the same folder. If Claude Code asks whether you trust the folder, choose Yes, I trust this folder. A notice then says 1 MCP server needs authentication · run /mcp.

- Then, type
/mcpand press Enter. - Under Local MCPs, select optinmonster, which shows needs authentication, and press Enter.

- After that, select Authenticate and press Enter.

- Your browser opens on the Authorize OptinMonster MCP Server page. If it doesn’t, copy the link Claude Code shows and paste it into your browser.

- Under Authorizing for the account, check the account shown. The connection only works on that one. If you have more than 1 account, then you can select another one and click Switch.

- Further down the page, under Choose what OptinMonster MCP Server can do, pick a level for each area.

- When you’re ready, click Authorize Access. Your browser shows Authentication successful, and you can close that tab.

- Back in Claude Code, you’ll see Authentication successful. Connected to optinmonster.

- Finally, to check it, type
/mcpagain and look for connected next to optinmonster.
FAQs
Does removing OptinMonster from Claude Code end its access?
No. Running claude mcp remove optinmonster removes OptinMonster from Claude Code, but its access in OptinMonster stays active. To end it, revoke it in OptinMonster.
Troubleshooting
Why does Claude Code tell me “The OptinMonster authorization is no longer valid” when /mcp shows connected?
The /mcp list can still show optinmonster as connected after the connection has stopped working, so look for this message instead of that status. The connection stops working when:
- It’s more than 30 days old.
- Someone clicked Revoke Access on its row under API. The steps to disconnect an AI assistant show where that row is.
To fix it, open /mcp, select optinmonster, and choose Re-authenticate.