TI

trypeggy/instagram_dm_mcp

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

188 stars 42 forks Качество 70 Тренд 17MIT

trypeggy/instagram_dm_mcp — это кандидат на MCP-сервер, импортированный из https://github.com/trypeggy/instagram_dm_mcp.

Обзор

trypeggy/instagram_dm_mcp — это кандидат на MCP-сервер, импортированный из https://github.com/trypeggy/instagram_dm_mcp.

Обзор (машинный перевод)

Это сервер Model Context Protocol (MCP) для отправки личных сообщений в Instagram.

С помощью этого вы сможете отправлять личные сообщения в Instagram со своего аккаунта (скоро появится больше возможностей).

Вот пример того, что можно сделать, когда он связан с Клодом.

https://github.com/user-attachments/assets/9c945f25-4484-4223-8d6b-5bf31243464c

Чтобы получать обновления по этому и другим проектам, над которыми мы работаем, введите свой email здесь


Установка

Требования

  • Python 3.11+
  • Антропическое приложение Claude Desktop (или Cursor)
  • Pip (менеджер пакетов Python), установка с помощью python -m pip install
  • Аккаунт в Instagram

Шаги

  1. Клонировать это хранилище

  2. Установка зависимости

  • Использование УФ (рекомендуется):

  • Использование Pip:

  1. Настройте учетные данные Instagram

У вас есть два варианта предоставления учетных данных в Instagram:

Вариант A: Переменные среды (рекомендуем)

Рекомендуется быстрая настройка:

Запустите скрипт помощника:

Это интерактивно запросит вас на ваши учетные данные и безопасно создаст файл .env.

Ручная настройка:

Создайте файл .env в корне проекта:

Затем отредактируйте .env с вашими реальными удостоверениями:

Эта страница переведена автоматически. Технические детали смотрите в оригинале.

README

Показан фрагмент оригинального README. Открыть оригинал.

Instagram DM MCP server

This is a Model Context Protocol (MCP) server for sending instagram Direct Messages.

With this you can send Instagram Direct Messages from your account (more capabilities coming soon).

Here’s an example of what you can do when it’s connected to Claude.

https://github.com/user-attachments/assets/9c945f25-4484-4223-8d6b-5bf31243464c

To get updates on this and other projects we work on enter your email here


Installation

Prerequisites

  • Python 3.11+
  • Anthropic Claude Desktop app (or Cursor)
  • Pip (Python package manager), install with python -m pip install
  • An instagram account

Steps

  1. Clone this repository

    git clone https://github.com/trypeggy/instagram_dm_mcp.git
    cd instagram_dm_mcp
    
  2. Install dependencies

  • Using uv (recommended):
    uv sync
    
  • Using Pip:
    pip install -r requirements.txt
    
  1. Configure Instagram credentials

    You have two options for providing your Instagram credentials:

    Option A: Environment Variables (Recommended)

    Quick Setup (Recommended):

    Run the helper script:

    python setup_env.py
    

    This will interactively prompt you for your credentials and create the .env file securely.

    Manual Setup:

    Create a .env file in the project root:

    cp env.example .env
    

    Then edit .env with your actual credentials:

    INSTAGRAM_USERNAME=your_instagram_username
    INSTAGRAM_PASSWORD=your_instagram_password
    

    Option B: Command Line Arguments

    You can still pass credentials as command line arguments (less secure).

  2. Connect to the MCP server

    For Claude Desktop:

    Save this as claude_desktop_config.json in your Claude Desktop configuration directory at:

    ~/Library/Application Support/Claude/claude_desktop_config.json
    

    For Cursor:

    Save this as mcp.json in your Cursor configuration directory at:

    ~/.cursor/mcp.json
    

    Configuration with Environment Variables (Recommended):

    • Using uv
    {
      "mcpServers": {
        "instagram_dms": {
            "command": "uv",
            "args": [
              "run",
              "--directory",
              "PATH/TO/instagram_dm_mcp",
              "python",
              "src/mcp_server.py"
            ]
         }
       }
     }
    
    • Using Python
    {
      "mcpServers": {
        "instagram_dms": {
          "command": "python",
          "args": [
            "{{PATH_TO_SRC}}/instagram_dm_mcp/src/ mcp_server.py"
          ]
        }
      }
    }
    

    Configuration with Command Line Arguments:

    {
      "mcpServers": {
        "instagram_dms": {
          "command": "python",
          "args": [
            "{{PATH_TO_SRC}}/instagram_dm_mcp/src/mcp_server.py",
Открыть полный README на GitHub

Установка

This server does not publish a one-line install command.

Open the repository installation guide Новичок в MCP? Начните с руководства на mcpskill.org →

Конфигурация

{ "mcpServers": { "instagram_dms": { "command": "uv", "args": [ "run", "--directory", "PATH/TO/instagram_dm_mcp", "python", "src/mcp_server.py" ] } } }