marketing
Instagram MCP Integration for OpenAI Agents SDK
Connect Instagram to OpenAI Agents SDK through the local KosmoKrator MCP gateway with scoped tools, credentials, and write policy.
Connect Instagram to OpenAI Agents SDK
Attach KosmoKrator integration tools to OpenAI Agents SDK workflows through a local MCP gateway.
Start the KosmoKrator MCP gateway locally and point the OpenAI Agents SDK MCP tool at that process or wrapper. The gateway is local, scoped to this integration, and starts with
--write=deny so OpenAI Agents can inspect read-capable tools without receiving write access by default.
Instagram MCP Config for OpenAI Agents SDK
Use headless JSON commands for CI-style execution and MCP for agent tool discovery.
{
"mcpServers": {
"kosmokrator-instagram": {
"type": "stdio",
"command": "kosmo",
"args": [
"mcp:serve",
"--integration=instagram",
"--write=deny"
]
}
}
} Run the Gateway Manually
kosmokrator mcp:serve --integration=instagram --write=deny Why Use KosmoKrator Here
Expose only Instagram instead of a broad multi-service tool list.
Reuse credentials already configured for the KosmoKrator CLI and Lua runtime.
Start read-only, then opt into ask or allow for trusted workspaces.
Instagram Tools Visible to OpenAI Agents
OpenAI Agents sees stable MCP tool names generated from the Instagram integration catalog.
| MCP tool | Source function | Type | Description |
|---|---|---|---|
integration__instagram__instagram_list_media | instagram.instagram_list_media | Read | List media published by the authenticated Instagram user. Returns media IDs, captions, types, URLs, and timestamps. Supports cursor-based pagination. |
integration__instagram__instagram_get_media | instagram.instagram_get_media | Read | Get details of a specific Instagram media item by its ID. Returns caption, media type, URL, timestamp, like count, and comment count. |
integration__instagram__instagram_create_media | instagram.instagram_create_media | Write | Publish a new media item (photo or video) to Instagram. Provide the media URL and an optional caption. The media is published immediately unless publish is set to false. |
integration__instagram__instagram_list_comments | instagram.instagram_list_comments | Read | List comments on a specific Instagram media item. Returns comment IDs, text, timestamps, usernames, and like counts. Supports pagination. |
integration__instagram__instagram_get_comment | instagram.instagram_get_comment | Read | Get details of a specific Instagram comment by its ID. Returns the comment text, timestamp, username, and like count. |
integration__instagram__instagram_list_insights | instagram.instagram_list_insights | Read | Get account-level insights and performance metrics for the authenticated Instagram user. Supports metrics like impressions, reach, follower count, and profile views with configurable time periods. |
integration__instagram__instagram_get_current_user | instagram.instagram_get_current_user | Read | Get the currently authenticated Instagram user profile. Returns user ID, username, name, account type, media count, and follower/following counts. |