About instadata
instadata is a local bridge for retrieving public Instagram profiles, recent posts, and post or reel comments as JSON. It is for clients that need read-only Instagram data and forwards requests to HasData without storing or scraping content locally.
Key features
- 01Fetch public profiles by handle
- 02List recent posts with media details
- 03Retrieve post and reel comments
- 04Paginate posts and comments
- 05Read-only forwarding to HasData
Use cases
- 01Inspect a public account’s profile and audience counts
- 02Review recent posts and engagement metrics
- 03Retrieve comments from a post or reel
MCP support
Exposes three read-only Instagram lookup tools to MCP clients. It forwards tool calls to the hosted HasData Instagram MCP server and passes successful results through.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
Tools
3Saved tool list · updated 2d ago
| Parameter | Type | Required | Description |
|---|---|---|---|
| url | string | Yes | The URL of the Instagram post or reel, for example `https://www.instagram.com/p/Ddjis3vETcP/` or `https://www.instagram.com/instagram/reel/DcymgItMFao/`. |
| includeMusic | boolean | No | Also return the reel's sound (audio ID, artist and song title) in `post.music`, for both licensed tracks and original audio. This takes an extra request to Instagram on the first page and is ignored when `nextPageToken` is set. Default is false. |
| nextPageToken | string | No | Defines the next page token. Use the `nextPageToken` value returned by the previous response. Omit it to fetch the first page. |
Details
From the project READMEinstadata
instadata is a thin local bridge to the hosted HasData Instagram MCP server, which returns public Instagram content as JSON. Point it at a handle and it can bring back that account's profile — full name, biography, external link, profile picture, follower and following counts, and the verified and private flags — or the account's latest posts, with captions, hashtags, mentions, like and comment counts, play counts on videos and Reels, media URLs, and timestamps. Give it a post or reel URL instead and it returns the comments on that post, each with its text, timestamp, like and reply counts, and its author.
The bridge stores nothing and scrapes nothing itself. It answers the tool list locally, exactly as captured from the live endpoint, and forwards each tool call upstream, handing the reply back untouched. The whole surface is three read-only lookups over public content: nothing is posted, messaged, followed, or stored, and no email or phone data appears anywhere in it.
Tools
hasdata_instagram_profile_getInstagramProfile— one public profile by handle. Required:handle(the username, without the@). Returns full name, biography, external link, profile picture URL, followers count, following count, and the verified/private flags.hasdata_instagram_posts_getInstagramPosts— the latest posts of a public account. Required:handle. Optional:limit(posts per request, defaults to 12 upstream) andnextPageTokento walk older posts. Private accounts and handles that do not exist return an error field instead of posts.hasdata_instagram_comments_getInstagramComments— the comments on a public post or reel. Required:url(a/p/,/reel/or/tv/link, with or without the username segment). Optional:nextPageTokenfor later pages andincludeMusicto also return the reel's sound (audio ID, artist and song title) on the first page. The first page also carries the post itself, including carousel items; later pages return comments only.
Configuration
HASDATA_INSTAGRAM_MCP_URL(optional) — override the upstream endpoint. Defaults tohttps://mcp.hasdata.com/mcp?apis=instagram. (The override hook is this rebuild's own labelled reconstruction.)HASDATA_API_KEY(optional) — when set, every upstream request carries anx-api-key: <value>header, for the caller's own HasData API key. When it is not set, no key header is sent. (The header name and the env name are pinned by the original's registry record; forwarding the key from this env var is a labelled reconstruction — the original surface was captured keyless.)
Forwarding mechanics
The first tool call opens a streamable HTTP session
upstream: a JSON-RPC initialize request
(protocolVersion 2025-03-26, clientInfo name
instadata), then a notifications/initialized
notification, then the tools/call request carrying
the caller's arguments unchanged. If the upstream
answers initialize with an Mcp-Session-Id
header, that value rides on every later request of
the session, which is reused for the life of the
process. Replies may arrive as plain JSON or as
server-sent events; both are read.
Successful upstream results pass through verbatim,
including any isError flag the upstream sets.
Failures — a JSON-RPC error, a non-2xx status, an
unreadable response, or a request that cannot be
completed — come back as an isError result whose
text starts with instadata error: (this rendering
is this rebuild's own labelled reconstruction).
CLI
Each tool is also a subcommand taking one JSON argument string:
npx @reneturcios/instadata hasdata_instagram_profile_getInstagramProfile '{"handle":"instagram"}'
npx @reneturcios/instadata hasdata_instagram_posts_getInstagramPosts '{"handle":"instagram","limit":5}'
npx @reneturcios/instadata hasdata_instagram_comments_getInstagramComments '{"url":"https://www.instagram.com/p/Ddjis3vETcP/"}'
npx @reneturcios/instadata --version
Exit codes: 0 on success, 1 on an isError
result, 2 on a usage error.
MCP server
npx -y @reneturcios/instadata mcp
MCP client config:
{
"mcpServers": {
"instadata": {
"command": "npx",
"args": ["-y", "@reneturcios/instadata", "mcp"]
}
}
}
Docker
docker run -i ghcr.io/cloudcorprecords/instadata
docker run --rm ghcr.io/cloudcorprecords/instadata --version
The container's default command is mcp, so the first
form is a stdio MCP server; any other arguments reach
the CLI normally.
Development
npm install
npm run build
npm test
npm run dev
The test suite runs entirely against a stubbed JSON-RPC upstream — no live network calls.
License
MIT — see LICENSE.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.