Purpose agent-toolkit (repository name instagram-mcp-server) is an open-source Instagram MCP server whose goal is to let AI agents set up Instagram comment-to-DM automations through conversation. A typical scenario is: a user comments a specified keyword under a post or Reel, and the system sends a link or material to the commenter via DM, optionally with a public reply. The project is maintained by CommentKeyword, licensed under MIT, and its MCP registry name is com.commentkeyword/mcp.
Main capabilities
- Create comment-keyword-triggered DM automations through the official Meta Instagram API, with support for setting keywords, DM content, public reply text, and target posts.
- Support the next_post target: no post ID is needed; the automation is attached to the next post or Reel published on the account, making it easy to configure in advance before a video is published.
- Query which keywords are waiting for a post, pause last month's automations, attach a sales agent to a keyword to answer follow-up questions, and more.
- Provide a hosted MCP server (https://commentkeyword.com/connect/mcp),通过 OAuth login authorization, with no local token or Node.js required.
- Provide a local stdio MCP server that uses an API token and requires Node 18 or later; the server has no dependencies and no build step, and its core files are server/core.mjs and server/commentkeyword-mcp.mjs.
- Include an Agent Skill (skills/comment-to-dm-cta) that can plan CTAs and DMs even without connecting to the MCP server, and can call the REST API directly when network access is available.
- Provide a Claude Code plugin that, when enabled, asks for an API token and stores it in the system keychain.
- integrations/n8n provides an importable n8n workflow that creates an automation for the next post through the REST API and Header Auth, with no coding required.
How to use
- Register an account at https://commentkeyword.com . API access is included in all plans (including Free).
- Connect an Instagram professional account (Business or Creator).
- In Settings → API & MCP, create an API token and grant keywords:read, keywords:write, and agents:read; add keywords:delete if you need to delete automations, and add conversations:read if you need to read AI agent conversations.
- Connect per client:
- Claude (claude.ai, desktop, Cowork, mobile): Customize → Connectors → + → add a custom connector, paste the hosted URL, keep the detected options, and log in. For Team and Enterprise, an admin adds it in Organization settings → Connectors.
- Claude Code: claude mcp add --transport http --scope user commentkeyword https://commentkeyword.com/connect/mcp,然后 /mcp → commentkeyword → log in.
- Codex: codex mcp add commentkeyword --url https://commentkeyword.com/connect/mcp,若未打开登录则运行 codex mcp login commentkeyword.
- ChatGPT: chatgpt.com/plugins → + → Add custom MCP server, paste the URL, keep OAuth, and log in (depends on your plan and workspace settings).
- Cursor: add { "mcpServers": { "commentkeyword": { "url": "https://commentkeyword.com/connect/mcp" }}, log in as prompted.
- Local server: add the server to the client's MCP configuration; the Claude Desktop configuration file is claude_desktop_config.json (Settings → Developer → Edit Config).
- Skill only: download the skills/comment-to-dm-cta folder and package it as a zip, then upload it in Claude's Customize → Skills → Upload a skill.
Use cases Suitable for operators, content creators, and marketing teams who want to quickly set up automatic Instagram comment-keyword DMs through AI clients such as Claude, Cursor, and Codex; also suitable for users who need an open-source alternative to ManyChat comment automation and want to use Meta's official API. The next_post target is suitable for pre-configuring automation before content is published.
Limitations and notes
- Focuses only on comment-to-DM; it does not publish posts, read Instagram insights, or read the inbox (it can only read conversations processed by the CommentKeyword AI agent); it needs to be paired with scheduling or analytics connectors.
- Meta has no official Instagram MCP server for organic traffic; the official MCP covers only ads. This project is a third-party implementation, but it only calls the CommentKeyword API, which uses Meta's official Instagram login and permissions.
- DMs are subject to Instagram rules: one DM reply can be sent per comment within 7 days, and messaging can continue within 24 hours after the other party replies.
- Each token corresponds to only one workspace and can be revoked at any time in Settings → API & MCP; least privilege is recommended.
- The server does not write to disk and has no telemetry; it only calls https://commentkeyword.com/api(或 COMMENTKEYWORD_API_URL), sends the API token and the automation content confirmed by the user, and returns the keyword automation and AI agent names.
- Before creating or activating an automation, the tool asks the agent to confirm the keywords, DM content, and target with the user.
- The service itself has a Free plan that includes the API; paid plans increase the number of DMs, keywords, and AI agents; specific pricing is not yet provided.