# CommentKeyword MCP server

> Lets AI agents create and manage Instagram comment-to-DM keyword automations using Meta's official API.

- Repository: https://github.com/commentkeyword/instagram-mcp-server
- Page: https://hostedmcp.org/servers/commentkeyword/agent-toolkit
- Transport: stdio
- Stars: 1
- License: MIT
- Latest version: 0.3.1

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `COMMENTKEYWORD_API_TOKEN` | yes | yes | CommentKeyword API token. Create one at https://commentkeyword.com/settings?tab=api with keywords:read, keywords:write and agents:read. |
| `COMMENTKEYWORD_API_URL` | no | no | Optional API base URL. Defaults to https://commentkeyword.com/api. |

## Tools (11)

- `list_keywords`: List the comment-keyword automations in the workspace, newest first. Use it to check whether a keyword already exists before creating one. (read-only)
- `get_keyword`: Get one keyword automation by its publicId, including whether it is still waiting for the next post (nextPostStatus). (read-only)
- `create_keyword`: Create a comment-to-DM automation: when someone comments the keyword, CommentKeyword sends them the DM (and optionally replies publicly). Confirm the details with the user first, because it messages real people. Fails with 409 if the keyword already exists for the same posts, or with keyword_limit_exceeded when the plan has no free active-keyword slot.
- `update_keyword`: Change a keyword automation. Only the fields you pass change. Passing target re-targets it (e.g. next_post to wait for the next upload again). dmMessages and commentReplies replace all existing variants. Set isActive false to pause it.
- `delete_keyword`: Permanently delete a keyword automation. Prefer update_keyword with isActive false to pause it instead. If the keyword has an AI agent, the first call returns DELETE_CONFIRMATION_REQUIRED with an impact summary; show it to the user and call again with confirm true only if they agree.
- `list_agents`: List the AI agents already set up in the workspace (agents are created and edited in the CommentKeyword dashboard). Pass the publicId of a Live agent as aiAgentId to create_keyword or update_keyword so it keeps chatting after the first DM. (read-only)
- `get_keyword_stats`: Results of one keyword automation for a date range (UTC days, default the last 30): DMs triggered by matching comments, sent, held (waiting for quota) and failed, public replies, replies received, AI conversations started, goals reached, and tracked link clicks (when trackLinks is on). Counts only, no commenter data. (read-only)
- `get_stats_overview`: Totals for all keyword automations in the workspace for a date range (UTC days, default the last 30), with the same counts as get_keyword_stats, plus the 5 keywords that sent the most DMs. (read-only)
- `list_conversations`: List DM conversations handled by AI agents, newest first, with the data each agent collected (null for fields not collected yet), the agent, the keyword and whether the objective was completed. No transcripts: use get_conversation for the messages. stage picks which ones and which date from/to filter: any (last message), data_collected (first value collected, e.g. new leads) or completed (objective reached). (read-only)
- `get_conversation`: Get one DM conversation by id (from list_conversations, or the conversationId of a webhook event): the contact, the agent and keyword, the collected data and the transcript, oldest message first (the latest 1,000 at most). (read-only)
- `get_usage`: Get the plan, DMs used and included this month, active keywords used and allowed, the connected Instagram account, and anything that stops DMs from going out (Free quota used up, a failed payment, Instagram to reconnect). (read-only)

## FAQ

### Can I use this for free?

Yes, the MCP server is included in the Free plan, which allows for 3 active keywords and 300 automated DMs per month.

### How is this different from a ManyChat MCP?

Unlike ManyChat, this server can create keyword or comment triggers and point automations at your next post or Reel.
