Blog
guide

How to Connect Instagram to Claude Code Using Sequel

Musthaq Ahamad
Musthaq Ahamad
How to Connect Instagram to Claude Code Using Sequel

Claude Code is a terminal agent, and Instagram analytics is mostly a data wrangling job: pull media, pull insights per post, compute rates, rank. Sequel's MCP server hands Claude Code read access to your Instagram Professional account so it can do that work in a loop rather than you clicking through Insights.

What You'll Accomplish

Once connected, you can ask Claude Code:

  • "Pull every post from 2026 and write me a CSV ranked by saves per reach."
  • "Chart my monthly non-follower reach share for the last year."
  • "Which reels beat the 8.5 second average watch time benchmark?"

Prerequisites

  • A Sequel account: Sign up free at sequel.sh
  • An Instagram Professional account: Business or Creator. Personal accounts are not supported by the API
  • Claude Code: any recent version with --transport http support

Step 1: Connect Instagram to Sequel

Sign in to sequel.sh and click Data Sources in the left sidebar.

Sequel Data Sources page

Click New Connection. On the "Choose a connector" page, select Instagram.

Choose a connector

Enter a Connection Name, then click Connect with Instagram. Sign in with the account you want to analyze and approve the three read-only scopes: profile and media, insights, and comments. You'll be redirected back with the connection saved under the resolved handle.

Step 2: Add Sequel to Claude Code

claude mcp add sequel \
  --transport http \
  https://api.sequel.sh/mcp

Claude Code opens a browser to authorize. Once that completes the server is saved and loads in future sessions automatically.

To make it available everywhere rather than in just this project:

claude mcp add sequel \
  --scope user \
  --transport http \
  https://api.sequel.sh/mcp

Verify it registered:

claude mcp list

What Instagram data Sequel exposes

AreaAvailableNot available
ProfileFollowers, follows, media count, bio, account typeEmail, phone, private profile fields
Posts and reelsReach, views, likes, comments, saves, shares, reel watch timePer-slide carousel breakdowns
AccountReach, accounts engaged, profile views, website clicks, follows and unfollowsAnything older than roughly two years
AudienceFollowers, reached and engaged audiences by age, gender, country, cityIndividual follower identities
CommentsText, timestamp, like count, commenter handleHidden or age-gated comments
Not coveredAds and spend, hashtag search, competitor accounts

Step 3: Query Your Instagram Data

Pull all my posts from the last 12 months, fetch insights for each, and save a CSV with reach, saves, shares, engagement per reach and format.
Compute my monthly net follower change by comparing follows against unfollows, and flag any month that was net negative.
For every reel, give me average watch time in seconds alongside reach, and sort by watch time descending.

What You Can Do Now

  • Script the reporting you keep redoing: "Write a script that outputs my monthly Instagram summary and save it so I can rerun it." Claude Code can keep the analysis as a file instead of a one-off answer.
  • Join Instagram to the rest of your stack: "Compare monthly Instagram profile visits to GA4 social sessions and tell me where the gap is." Sequel exposes your warehouse and GA4 over the same MCP connection, so cross-source questions are one prompt.
  • Build your own benchmark: "Compute my median engagement per reach by format and by quarter, so I have a baseline to judge new posts against." Published benchmarks vary by 10x depending on the denominator, so your own history is the only comparison that means anything.
  • Audit before you conclude: "Flag any post where views divided by reach is above 10, since the reach figure is probably unreliable." Older reels sometimes report implausible reach, which quietly breaks every rate you calculate from it.
  • Watch distribution, not vanity: "Track shares per thousand reached by month." Sends are the signal Instagram weights most for pushing content to people who don't follow you.

For cross-source work, the same connection covers Google Analytics in Claude Code and Search Console in Claude Code. Background reading: what MCP is, what an AI data analyst does, AI agents for marketing analytics, and why your follower count hides unfollows.

Try Sequel

Build your company brain.

Sequel connects the systems your company runs on and learns how your team defines every metric, so any AI agent can answer from it. Free for up to 3 seats, no credit card required.

Get started free

Frequently asked questions

Do I need a Sequel API key for Claude Code?

No. The --transport http flag makes Claude Code auto-discover Sequel's OAuth server. It opens a browser once to authorize, then saves the server for every future session.

What version of Claude Code do I need?

Any recent version that supports --transport http. If the flag is rejected, update Claude Code and try again.

Does my Instagram account need to be a Business or Creator account?

Yes. The Instagram API only serves Professional accounts, which means Business or Creator. Personal accounts cannot be connected. The switch is free and reversible in the Instagram app under Settings -> Account type and tools.

Can I make it available in every project?

Yes. Add --scope user to the claude mcp add command and Sequel will be available in every Claude Code session on your machine instead of just the current project.

Why does pulling insights for every post take a while?

Instagram exposes post insights one media id at a time, so auditing 50 posts is 50 separate API calls. Expect roughly a second per post. Ask for a date-bounded window rather than your entire history.

What are the rate limits?

Instagram allows 4800 calls per 24 hours multiplied by your impression count, so a healthy account has plenty of headroom. A brand new account with almost no impressions has a much smaller budget.

Is this read-only?

Yes. The connection requests basic profile and media, insights, and comments, all read-only. The connector has no publishing or moderation capability.

Written by

Musthaq Ahamad
Musthaq Ahamad

Co-founder and CEO of Sequel. Previously built developer tools and data infrastructure. Passionate about making data accessible for everyone.