Instagram comment-to-DM automation with Claude

Claude can't log in to Instagram, and it shouldn't. But it can set up your comment-to-DM automations. Tell it the keyword and what to send: CommentKeyword replies to the comment, sends the DM through Meta's official Instagram API and, if you want, lets an AI agent continue the chat.

Claude CodeClaude Desktop and CoworkChatGPT and CodexFree plan included

Written by CommentKeyword, the comment-to-DM tool this guide uses.

What Claude can and can't do with Instagram DMs

TaskClaude on its ownClaude + CommentKeyword
Write the DM, the public reply and the comment CTAYesYes
Create the automation that DMs everyone who comments a keywordNoYes, through the MCP server (you confirm first)
Arm it for a Reel you haven't published yetNoYes, with the next_post target
Re-target, pause or delete automationsNoYes
Send the DMsNoYes: CommentKeyword sends them through Meta's official API
Answer people who reply to the DMNoYes, with a CommentKeyword AI agent, which can run on a Claude model (paid plans)
Read your Instagram inboxNoNo: the MCP tools manage automations only
DM people who didn't comment or message youNoNo: Instagram's API doesn't allow it
Can Claude send Instagram DMs?
Not directly. It sets up the automation that sends them.
Can Claude answer Instagram DMs?
Not from the Claude app. A CommentKeyword AI agent can answer replies, and it can use a Claude model.

How it works

There are two separate jobs. Claude does the first, CommentKeyword the second.

Setup: Claude, through MCP

In Claude, Cowork, Claude Code or another MCP app, Claude calls CommentKeyword's tools to create the automation: the keyword, which posts it watches, the DM text (up to 10 variants), an optional public reply (up to 10 variants) and link tracking. It shows you a summary and waits for your OK.

Running it: CommentKeyword

When someone comments the keyword, CommentKeyword posts one of your public replies and sends one of your DM variants as a private reply. If you attached a Live AI agent, it continues the conversation when the person writes back.

Claude doesn't have to stay open. Once it's created, the automation runs in CommentKeyword like any automation you'd set up in the dashboard.

Set it up in Claude Code

You need:

  1. 1A CommentKeyword account. The Free plan works.
  2. 2An Instagram professional account (Business or Creator) connected to it.
  3. 3Nothing else to connect Claude: you sign in with CommentKeyword. Only the plugin needs an API token, from Settings → API & MCP, with keywords:read, keywords:write and agents:read.

Then run the first command, type /mcp in Claude Code, choose commentkeyword and sign in with CommentKeyword. Want the comment-to-dm-cta Agent Skill too? The plugin adds it together with a local MCP server; Claude Code asks for your API token when you enable it and keeps it in your system keychain.

MCP server: sign in, no token

claude mcp add --transport http --scope user commentkeyword https://commentkeyword.com/connect/mcp

Plugin: Skill + local server (API token)

/plugin marketplace add commentkeyword/instagram-mcp-server
/plugin install commentkeyword@commentkeyword

The Skill helps if you also edit Reels with Claude: when a script or edit has a comment CTA, it keeps the word the same in the voiceover, the on-screen overlay and the caption, writes the DM, then arms the automation after you confirm.

Set it up in Claude Desktop, Cowork, Cursor or Windsurf

In Claude Desktop and Cowork, add CommentKeyword as a custom connector in your Claude account; the steps for every app are on the Instagram MCP server page. To run the local server instead, open Settings → Developer → Edit Config, paste the entry below, replace YOUR_TOKEN with your token and restart the app. Cursor and Windsurf use the same entry.

claude_desktop_config.json

{
  "mcpServers": {
    "commentkeyword": {
      "command": "npx",
      "args": ["-y", "github:commentkeyword/instagram-mcp-server#v0.2.0"],
      "env": { "COMMENTKEYWORD_API_TOKEN": "YOUR_TOKEN" }
    }
  }
}

The local server runs on your computer through npx, so it needs Node.js 18 or later. The toolkit is on GitHub. Every app, Codex included, and the full tool reference are on the Instagram MCP server page.

Prompts that work

Arm a DM for a Reel you haven't posted yet:

Example in Claude Code

You:I'm posting a Reel tomorrow about my 5-day meal plan. Anyone who comments PLAN should get the PDF: https://example.com/plan. Add a public reply too.

list_keywords · search: PLAN → no existing automation

Claude:Here's what I'll set up:

  • Keyword: PLAN (whole word, any case)
  • Posts: your next post or Reel
  • DM: "Here's your 5-day plan, {{namefirst}} 👉 https://example.com/plan" (+2 wording variants)
  • Public reply: "Sent! Check your DMs 📩"
  • Link click tracking: on

Create it?

You:Yes

create_keyword · target: next_post

Claude:Done. PLAN is waiting for your next post. After you publish, comment PLAN from another account to test it.

More things you can ask

  • Reuse my GUIDE automation for tomorrow's Reel.

    Claude re-targets the existing keyword to your next post with update_keyword.

  • Run RECIPE on all my posts, with three different DM wordings.

    Claude uses target: all_posts and several DM variants.

  • Pause the PLAN automation.

    Claude sets isActive: false. The automation keeps its settings.

  • Did PLAN catch yesterday's Reel?

    Claude checks nextPostStatus: waiting or attached.

  • Attach my booking agent to the CALL keyword.

    Claude lists your AI agents and attaches a Live one (paid plans).

Tips Claude follows through the Skill

  • Pick a distinctive word (GUIDE, PLAN, RECIPE), not one people write anyway, such as YES or WOW.
  • Matching is case-insensitive and whole-word by default: plan matches "PLAN please 🙏" but not "planner".
  • For accented words such as GUÍA, turn on matching without accents so guia also triggers it.

Let a Claude model answer the replies

The first DM is the message you wrote. If you want a conversation after that, for example to answer questions, qualify a lead or collect an email, attach a CommentKeyword AI agent to the keyword.

  • Agents are created in the CommentKeyword dashboard, with instructions, an objective, the information to collect and human-handoff rules. Claude can attach an existing Live agent to a keyword, but it doesn't create agents.
  • AI agents start on the Starter plan, with the included model.
  • Premium models, including a Claude model (currently Claude Opus 5.5), are available on Pro, Growth and Scale and use prepaid usage credits.
  • The agent only answers after the person writes back, within Instagram's 24-hour messaging window.

ChatGPT and claude.ai on the web

CommentKeyword's MCP server comes in two forms. The remote server is for every app that connects by URL: claude.ai, the Claude desktop app and Cowork, Claude Code, ChatGPT, Codex and Cursor. Add https://commentkeyword.com/connect/mcp and sign in with CommentKeyword, no token needed. The local server runs on your computer with an API token.

ChatGPT

In the ChatGPT app, add CommentKeyword's remote MCP server, https://commentkeyword.com/connect/mcp, as a custom MCP server if your plan allows it, and sign in with CommentKeyword. Codex, OpenAI's coding agent, connects to the same server with one command (setup on the Instagram MCP server page).

claude.ai

Add https://commentkeyword.com/connect/mcp as a custom connector and sign in with CommentKeyword. You can also upload the comment-to-dm-cta Skill (Customize → Skills → Upload a skill) to plan the CTA and the DM.

Your own code, n8n or Make

Call the comment-to-DM API. It's included on every plan, Free too.

What about a custom GPT with Actions? Our API is described in an OpenAPI 3.1 spec with Bearer-token auth, the format GPT Actions use. But OpenAI no longer lets personal ChatGPT plans create new GPTs, and it is phasing custom GPTs out (December 11, 2026 for some Enterprise workspaces, with other plans expected to follow), so we don't recommend building one now.

What Instagram allows

These rules come from Instagram, not from Claude or CommentKeyword.

  • One message per comment: the automatic DM is a private reply to the comment, sent within 7 days of it.
  • The conversation continues only if the person writes back. After that, replies are possible within 24 hours of their latest message.
  • Your own comments don't trigger it. Test from a different account.
  • You need a professional account (Business or Creator). CommentKeyword uses Meta's official API, with no passwords and no scraping. More in Is Instagram DM automation allowed?

Plans

The API and the MCP server are included on every CommentKeyword plan, Free too. Free includes 300 automated DMs a month and 3 active keywords, with no AI agent. Paid plans add more DMs and keywords, plus AI agents.

Frequently asked questions

Can Claude answer Instagram DMs?

Not from the Claude app itself: a CommentKeyword AI agent answers people who reply to your automatic DM, and on Pro plans and above it can use a Claude model. If you allow it, Claude can read those AI agent conversations through the remote MCP server, but it doesn't send the replies.

Can Claude send Instagram DMs?

Not directly. Claude can create the automation, and CommentKeyword then sends the DM to everyone who comments the keyword, through Meta's official Instagram API.

How do I connect Claude to Instagram DMs?

Create a free CommentKeyword account, connect your Instagram professional account and add https://commentkeyword.com/connect/mcp to Claude as a custom connector (in Claude Code, with one command), then sign in with CommentKeyword. Claude can then create and manage comment-to-DM automations for your account.

Does Claude see my Instagram messages?

Only if you allow it. The local MCP server only creates, reads, updates and deletes keyword automations and lists your AI agents. The remote MCP server can also read the conversations your AI agents had and the data they collected, but only after you approve the permission to read conversations when you connect it. Neither reads conversations no AI agent handled, or your followers.

Will Claude send DMs without asking me?

The Skill and the tool descriptions tell Claude to show you the keyword, the DM and the target, and to wait for your OK before creating or activating anything. For extra safety, give the token read-only permission (keywords:read).

Does this work with ChatGPT?

Yes. In the ChatGPT app, add CommentKeyword's remote MCP server, https://commentkeyword.com/connect/mcp, as a custom MCP server if your plan allows it, and sign in with CommentKeyword. Codex, OpenAI's coding agent, connects to the same server with one command, and developers can call the REST API directly.

Is it allowed by Instagram?

Replying to a comment with a private message is a feature of Meta's official Instagram API, which is what CommentKeyword uses, within Instagram's messaging rules. A tool that asks for your Instagram password isn't using the official API.

Is it free?

CommentKeyword's Free plan includes the API and the MCP server, with 300 automated DMs a month and 3 active keywords. AI agents start on paid plans.

Can I use it with ManyChat?

Not in the same way. As of October 2026, ManyChat has no official MCP server, and its API can't create comment automations. Does ManyChat have an MCP server?

Let Claude set up your next comment-to-DM

Create a free account, connect Instagram and add CommentKeyword to Claude. Your next Reel can have its DM ready before you post.