Skip to main content
Glama
unofficial-instagram-mcp

unofficial-instagram-mcp

unofficial-instagram-mcp

Open-source MCP server for the Instagram API. It lets an AI assistant such as Claude publish Reels, photos and carousels, manage comments and direct messages, and read insights, across one or many Instagram professional accounts.

Not affiliated with Meta or Instagram. This is an independent community project. "Instagram" and "Meta" are trademarks of their respective owners.

Status

Early development. Only the foundation exists today:

Area

State

Multi-account model (accounts, aliases, token expiry, account resolution)

Done

MCP server over stdio with the list_accounts tool

Done

Configuration, redacting logger, CI

Done

Persistent storage (SQLite) and encrypted tokens

Next

Publishing (Reels, photos, carousels, Stories)

Planned

Comments, insights

Planned

Direct messages and webhooks

Planned

HTTP transport, S3-compatible media storage, scheduling

Planned

Related MCP server: Glim

Design goals

  • Multi-account from day one. Every tool takes an account parameter. With several accounts connected and no explicit choice, a tool refuses to guess instead of posting to the wrong profile.

  • Two ways to run. MODE=local (stdio, on your own computer) or MODE=server (HTTP, self-hosted). There is no hosted service: each user runs their own server and brings their own Meta app.

  • Choose your media path. Local files, S3-compatible storage (Cloudflare R2, Backblaze B2, MinIO, Supabase Storage) or a public URL. Uploaded media is deleted after publishing.

  • Choose your scheduler. A built-in SQLite queue or an n8n workflow.

  • Safe by default. Access tokens are encrypted at rest and never returned by any tool. Comments and DMs are untrusted input and must be treated as data, never as instructions.

Requirements

  • Node.js 22 or newer and pnpm.

  • An Instagram professional account (Business or Creator).

  • A Meta app of type Business with the Instagram product. Add each profile as an Instagram Tester while the app is in development mode. Operating accounts you do not own requires Meta's App Review.

Quick start (local mode)

pnpm install
pnpm build
cp .env.example .env   # then edit the values

Add the server to your MCP client. Example for Claude Code:

claude mcp add instagram -- node /absolute/path/to/unofficial-instagram-mcp/dist/main.js

Configuration

All configuration comes from environment variables. See .env.example.

Variable

Default

Description

MODE

local

local (stdio) or server (HTTP, not implemented yet)

LOG_LEVEL

info

fatal, error, warn, info, debug or trace

DATABASE_PATH

./data/unofficial-instagram-mcp.sqlite

SQLite file

META_APP_ID / META_APP_SECRET

none

Credentials of your Meta app

TOKEN_ENCRYPTION_KEY

none

32 bytes, base64. Generate with openssl rand -base64 32

DEFAULT_ACCOUNT

none

Alias used when a tool call omits account

Never commit real values. Use your platform's secret store in production.

Architecture

Domain-Driven Design with one bounded context per concern:

src/
  shared/        errors, clock, logger
  accounts/      domain, application, infrastructure
  publishing/    (planned)
  engagement/    (planned)
  messaging/     (planned)
  insights/      (planned)
  interfaces/
    mcp/         MCP tools

The domain layer never depends on infrastructure. The Instagram API, storage and scheduler are reached through ports implemented in each context's infrastructure folder.

Development

The project is built test-first (TDD) with Jest.

pnpm test            # run the test suite
pnpm test:watch      # watch mode
pnpm test:coverage   # coverage report
pnpm lint            # Biome lint and format check
pnpm format          # apply Biome fixes
pnpm typecheck       # TypeScript, no emit
pnpm build           # compile to dist/

See CONTRIBUTING.md before opening a pull request.

License

0BSD. Use it for any purpose, with no conditions.

Available Tools

1 tool
list_accountsList Instagram accountsA
Read-onlyIdempotent

Lists the Instagram accounts connected to this server, with granted permissions and token expiration. Never returns access tokens.

Inputs: no named parameters. Returns: accounts

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 1 tool

    Disambiguation5/5

    With only one tool there is zero possibility of misselection; the tool's purpose (listing connected accounts and their permissions) is stated unambiguously. Trivially distinct, but nothing to confuse.

    Naming Consistency5/5

    The single name follows a clean verb_noun (list_accounts) snake_case convention. Nothing inconsistent to point at, though the sample size is one.

    Tool Count1/5

    A server branded as an Instagram MCP integration exposes exactly one read-only introspection tool, which is an extreme mismatch between name and surface. It amounts to a single trivial helper rather than a usable toolset.

    Completeness1/5

    The Instagram domain implies media listing/publishing, profile lookup, comments, and insights, none of which exist. Even account management is read-only, so an agent cannot perform any actual Instagram workflow.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to manage Instagram Business accounts by automating content publishing, scheduling posts, and analyzing performance metrics. Supports posts, stories, reels, and carousels with detailed audience insights and hashtag discovery.
      1
      -
    • A
      license
      A
      quality
      C
      maintenance
      Enables AI agents such as Claude and Cursor to run an Instagram Business or Creator account through Meta's official Graph API: reading profile, post and audience insights; preparing and publishing posts, carousels, reels and stories with a confirm-before-publish step; managing comments and direct messages; and searching hashtags. It also ships with a demo mode that lets every tool work without an Instagram account or access token.
      17
      MIT
    • A
      license
      B
      quality
      B
      maintenance
      Self-hosted MCP server and CLI for publishing and scheduling Instagram Reels, photos, carousels and stories through the official Instagram Graph API. Validates and auto-fixes media with ffmpeg, keeps a persistent queue, and lets AI agents read insights and reply to comments.
      12
      2
      MIT
    • F
      license
      Not graded
      quality
      C
      maintenance
      Enables AI clients to operate Instagram Business and Creator accounts through Meta's official API with OAuth 2.1 authentication, covering publishing images, carousels, reels and stories, content scheduling, comment moderation, Direct messaging, and account and media insights across multiple connected accounts. An optional read-only private-session reader exposes Direct inbox threads, and a webhook-backed archive accumulates conversation history that Meta's API cannot return on demand.
      -