content-media-center-mcp
v1.0.1
Published
MCP server for ingesting public Instagram content (posts, reels, carousels) via HikerAPI
Readme
content-media-center-mcp
Local MCP server that ingests public Instagram content (posts, reels, carousels) via HikerAPI and stores it on disk for AI-driven style analysis. Runs over stdio — one process per user, no shared backend.
What it does
- Register your own Instagram account (
is_primary) and any number of reference/competitor accounts by URL or username. - Sync recent posts/reels/carousels for a tracked account: fetches metadata from HikerAPI, downloads the media files, stores everything locally.
- No AI analysis is built in. The server only downloads files to disk and exposes their paths. Claude (or any MCP client with vision) reads the downloaded images/videos directly and analyzes them in-conversation.
- Track HikerAPI trial usage/balance without leaving the chat.
Storage
Everything lives in a data directory on the machine running the server — no cloud DB, no bucket.
- Metadata: SQLite file (
content-media.db) — accounts, posts, media asset records. - Media files:
<data-dir>/media/<username>/<ig_media_code>/<n>.<ext>
Default data dir: ~/.content-media-center-mcp/. Override with CONTENT_MEDIA_DATA_DIR.
Setup
pnpm install
pnpm buildCopy .env.example to .env and set HIKERAPI_KEY (get one at hikerapi.com).
Connect from an MCP client (Claude Desktop, Cursor, etc.)
{
"mcpServers": {
"content-media-center": {
"command": "node",
"args": ["/absolute/path/to/content-media-center-mcp/dist/index.js"],
"env": {
"HIKERAPI_KEY": "your_key_here"
}
}
}
}Cursor: .cursor/mcp.json (project-only) or ~/.cursor/mcp.json (global).
Claude Desktop: Settings → Connectors → Add custom connector.
After editing dist/, restart the connection from the client (toggle the server off/on) — clients cache the tool list per process and won't pick up a rebuild on their own.
Tools
| Tool | Does |
|---|---|
| set_primary_account | Marks an account (URL or username) as your own/primary account |
| add_tracked_account | Registers a reference account to track |
| list_tracked_accounts | Lists all registered accounts with last sync time |
| sync_account_content | Fetches recent posts/reels for an account, stores metadata, downloads media |
| list_downloaded_posts | Lists downloaded posts with local file paths — use before asking Claude to analyze images/video |
| get_hikerapi_usage | Remaining free-trial requests (out of 100), rate, and paid balance |
Data model
tracked_accounts (id, username, ig_user_id, display_name, is_primary, is_active, last_synced_at)
ig_posts (id, account_id, ig_media_code, media_type, caption, hashtags, like_count,
comment_count, view_count, posted_at, raw_metadata)
ig_media_assets (id, post_id, asset_order, asset_type, source_url, storage_url, width, height)media_type is one of image / carousel / reel. storage_url on an asset is the absolute local file path (not a remote URL).
HikerAPI response quirks (as of implementation)
Handled internally, documented here in case the upstream API changes:
/v1/user/medias/chunkreturns a 2-element array[items, next_cursor], not{ items, next_cursor }.- Carousel items list their sub-media under
resources[], notcarousel_media. pk(user id) can come back as either a JSON number or a string — normalized to string, since a bare number gets serialized as"123.0"and rejected by endpoints expectinguser_id.- Reels report
view_count: 0even when they have real plays; the actual figure is inplay_count. The sync parser falls back toplay_countwheneverview_countis falsy.
Not in scope
No route-validation gate, no prompt-driven generation engine, no auto-publishing, no remote/multi-user server. This is ingestion only.
License
ISC
