Skip to main content
Glama

igmcp

A small, read-only MCP server for the official Instagram Graph API. It lets an MCP client (Claude Code, etc.) read your own professional account's profile, media, comments and insights. It cannot publish, delete, or send anything.

Streamable HTTP, stateless. Python 3.12+, FastMCP, httpx, pydantic v2.

Tools

All annotated readOnlyHint:

Tool

Purpose

get_instagram_profile

Account name, bio, follower/following/media counts

list_instagram_media

Recent posts and reels

get_instagram_media

One media item

get_instagram_comments

Comments on a media item

get_instagram_insights

Account or media insights (metrics required, e.g. reach, views, shares)

Related MCP server: Instagram MCP

Security design

  • GET requests only. The Graph token travels in the Authorization header, never in a URL.

  • Mandatory bearer auth on /mcp and /metrics; the server refuses to start without MCP_AUTH_TOKEN (>= 24 chars). /healthz and /readyz are open.

  • Host-header allow-list. No debug endpoints.

  • Secrets are read from *_FILE paths and redacted from logs.

  • Container: non-root user, read-only filesystem, all capabilities dropped, no published port.

  • /metrics (Prometheus): request counts and latency, tool outcomes, Meta app usage %.

Configuration

Variable

Meaning

INSTAGRAM_ACCOUNT_ID

Instagram professional account id

GRAPH_VERSION

Graph API version (default v21.0)

IG_GRAPH_TOKEN_FILE

Path to a file holding the Graph access token

MCP_AUTH_TOKEN_FILE

Path to a file holding the bearer token clients must send

Develop

python3 -m venv .venv && .venv/bin/pip install -e '.[dev]'
.venv/bin/ruff check src tests && .venv/bin/mypy src && .venv/bin/pytest

Deploy

mkdir -p secrets && chmod 700 secrets
# create secrets/ig_graph_token and secrets/mcp_auth_token (readable by uid 10001)
# create .env with INSTAGRAM_ACCOUNT_ID=... (and optionally GRAPH_VERSION=...)
docker compose up -d --build

Register it in Claude Code:

claude mcp add --transport http instagram http://<host>:8000/mcp \
  --header "Authorization: Bearer <MCP_AUTH_TOKEN>"

compose.yml attaches to an external Docker network named by AI_NETWORK (default ai-network); create it first (docker network create ai-network) or set AI_NETWORK in .env.

Limits

  • The Graph user token lasts 60 days; renewing it needs the Meta app secret, which this service does not handle.

  • Reads only the connected account, not other people's content.

  • Not affiliated with Meta.

License

MIT

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    MCP server for organic Instagram analytics via the Meta Graph API, providing read-only tools for profiles, media, insights, audience, and optional publishing.
    GPL 3.0
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables MCP clients to manage a Meta-linked Instagram professional account, including comments, replies, and messages, using Meta's official APIs with deterministic permissions and audit state.
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    Enables MCP clients to manage an Instagram Business or Creator account via the official Instagram Login Graph API, including profile/media retrieval, insights, comments, publishing, and direct messages. Write actions are optional and gated by configuration.
    26
    24 npm
    MIT