Skip to main content
Glama
jdenp

Instagram DM MCP Server

by jdenp

Instagram DM MCP Server

Instagram DM을 보내고 읽기 위한 MCP(Model Context Protocol) 서버입니다.

빠른 시작

uv run mcp_server.py

서버는 stdin/stdout을 통해 JSON-RPC 2.0으로 통신합니다.

Related MCP server: Instagram MCP Server

설정

  1. config/config.json.template을 config/config.json으로 복사하고 sessionid, 선택적 username, max_messages_per_thread를 추가하세요.

  2. config/recipients.json.template을 config/recipients.json으로 복사하세요. 선택적 별칭(alias)이 있는 Instagram 사용자 이름 목록입니다.

  3. .json 파일은 gitignore 처리되며, .template 파일은 가이드로 추적됩니다.

도구

send_dm(recipient, message)

특정 수신자에게 DM을 보냅니다.

매개변수:

  • recipient (필수) - DM을 보낼 Instagram 사용자 이름

  • message (필수) - 보낼 메시지 텍스트

read_dm(recipient, max_messages=10)

특정 수신자의 스레드에서 마지막 N개의 메시지를 읽습니다.

매개변수:

  • recipient (필수) - DM을 읽을 Instagram 사용자 이름

  • max_messages (선택) - 스레드당 최대 메시지 수 (생략 시 config의 max_messages_per_thread 사용)

list_recipients()

구성된 모든 수신자와 해당 별칭을 나열합니다. 에이전트는 이 도구를 사용하여 메시지를 보낼 수 있는 대상을 확인해야 합니다.

매개변수: 없음

구성

필드

기본값

설명

sessionid

(필수)

Instagram 세션 ID

username

""

Instagram 사용자 이름 (선택)

message_text

"test"

send_dm 사용 시 보내는 메시지

max_messages_per_thread

10

스레드당 읽을 최대 메시지 수

오직 recipients.json에 있는 수신자에게만 보내세요. 스크립트를 직접 수정하지 마세요.

수신자 별칭

recipients.json에서 각 항목은 에이전트가 사용할 alias 필드를 포함할 수 있습니다:

[
    {
        "username": "john_doe",
        "alias": "John Doe"
    }
]

별칭은 선택 사항입니다. 생략하면 사용자 이름이 사용됩니다. 구성된 모든 별칭을 보려면 list_recipients 도구를 사용하세요. 일반 문자열 항목(하위 호환)도 지원됩니다:

["john_doe", "jane_smith"]

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to read, send, and manage Instagram direct messages, including viewing conversations, sending DMs to users, reacting to messages, and searching for users by username.
    10
    -
  • F
    license
    A
    quality
    C
    maintenance
    Enables agents to interact with Instagram through 49 tools for direct messages, feed, profiles, search, and persona discovery, with write actions disabled by default until explicitly enabled.
    4
    49
    -
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables reading and replying to direct messages, comments, and templates across Instagram, WhatsApp, and Messenger through official Meta Business APIs, with support for human handover and AI assistant controls.
    22 npm
    MIT