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.
Written by CommentKeyword, the comment-to-DM tool this guide uses.
What Claude can and can't do with Instagram DMs
| Task | Claude on its own | Claude + CommentKeyword |
|---|---|---|
| Write the DM, the public reply and the comment CTA | Yes | Yes |
| Create the automation that DMs everyone who comments a keyword | No | Yes, through the MCP server (you confirm first) |
| Arm it for a Reel you haven't published yet | No | Yes, with the next_post target |
| Re-target, pause or delete automations | No | Yes |
| Send the DMs | No | Yes: CommentKeyword sends them through Meta's official API |
| Answer people who reply to the DM | No | Yes, with a CommentKeyword AI agent, which can run on a Claude model (paid plans) |
| Read your Instagram inbox | No | No: the MCP tools manage automations only |
| DM people who didn't comment or message you | No | No: 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 Code, Claude Desktop, Cursor or Windsurf, 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:
- 1A CommentKeyword account. The Free plan works.
- 2An Instagram professional account (Business or Creator) connected to it.
- 3An API token from Settings → API with
keywords:read,keywords:writeandagents:read. Addkeywords:deleteonly if you want Claude to be able to delete automations.
Then install the plugin. It adds the MCP server and the comment-to-dm-cta Agent Skill. Claude Code asks for your API token when you enable the plugin and keeps it in your system keychain.
Plugin: MCP server + Skill
/plugin marketplace add commentkeyword/agent-toolkit
/plugin install commentkeyword@commentkeywordMCP server only
claude mcp add --transport stdio --env COMMENTKEYWORD_API_TOKEN=YOUR_TOKEN commentkeyword -- npx -y github:commentkeyword/agent-toolkit#v0.2.0The 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, Cursor or Windsurf
Add the server to your app's MCP config. In Claude Desktop, open Settings → Developer → Edit Config, paste the entry below, replace YOUR_TOKEN with your token and restart the app.
claude_desktop_config.json
{
"mcpServers": {
"commentkeyword": {
"command": "npx",
"args": ["-y", "github:commentkeyword/agent-toolkit#v0.2.0"],
"env": { "COMMENTKEYWORD_API_TOKEN": "YOUR_TOKEN" }
}
}
}The server runs on your computer through npx, so you need 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:
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_postsand 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:waitingorattached.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
As of October 2026, CommentKeyword's MCP server runs on your computer. It works in apps that can start a local server: Claude Code, Claude Desktop, Cursor, Windsurf and Codex. The ChatGPT app and claude.ai on the web connect only to remote servers, so they can't use it yet. A remote version is planned, with no date yet.
ChatGPT
Use Codex, OpenAI's coding agent: you sign in with your ChatGPT account, and it runs the CommentKeyword MCP server (setup on the Instagram MCP server page). In the ChatGPT app itself, ask it to write the CTA and the DM, then create the automation in the dashboard.
claude.ai
Upload the comment-to-dm-cta Skill (Customize → Skills → Upload a skill) to plan the CTA and the DM, then create the automation in the CommentKeyword dashboard.
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: Claude has no access to your Instagram inbox. With CommentKeyword, an AI agent answers people who reply to your automatic DM, and on Pro plans and above it can use a Claude model.
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, create an API token, and add the CommentKeyword MCP server to Claude Code or Claude Desktop. Claude can then create and manage comment-to-DM automations for your account.
Does Claude see my Instagram messages?
No. The MCP tools only create, read, update and delete keyword automations and list your AI agents. They don't read your inbox 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?
Not inside the ChatGPT app yet: it connects only to remote servers, and CommentKeyword's MCP server runs locally today. A remote version is planned. Codex, OpenAI's coding agent, runs it today when you sign in with your ChatGPT account, 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, make an API token and install the toolkit. Your next Reel can have its DM ready before you post.