hikerapi-mcp
Provides tools to interact with Instagram data via HikerAPI, enabling retrieval of user profiles, posts, hashtags, stories, locations, comments, and more.
hikerapi-mcp
MCP server for HikerAPI — Instagram data API. Available on npm: hikerapi-mcp.
Auto-generates MCP tools from the HikerAPI OpenAPI spec at startup, so every non-deprecated GET endpoint is exposed without hand-written wrappers. HikerAPI only exposes read (GET) endpoints — the server maps each one 1:1 to an MCP tool (GET /v2/user/by/username → get_v2_user_by_username).
Get 100 Free API Requests
Sign up with this link and get 100 free HikerAPI requests — no credit card required. Enough to wire up the MCP server, try a few prompts in Claude/Cursor/Codex, and evaluate the data quality before committing.
Quick start
Get an API key at hikerapi.com/tokens.
Add the server to your AI assistant.
Ask your assistant something like:
"Get the Instagram profile for @nasa."
"Find the top 5 recent posts under the hashtag
#photography.""Show stories for the user with id 25025320."
Claude Code
claude mcp add hikerapi -e HIKERAPI_KEY=your-api-key -- npx -y hikerapi-mcpClaude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"hikerapi": {
"command": "npx",
"args": ["-y", "hikerapi-mcp"],
"env": {
"HIKERAPI_KEY": "your-api-key"
}
}
}
}Cursor / Windsurf
Same shape as Claude Desktop — put the block under mcpServers in the app's MCP config file.
Zed
Add to ~/.config/zed/settings.json:
{
"context_servers": {
"hikerapi": {
"command": "npx",
"args": ["-y", "hikerapi-mcp"],
"env": {
"HIKERAPI_KEY": "your-api-key"
}
}
}
}OpenAI Codex
Append to ~/.codex/config.toml:
[mcp_servers.hikerapi]
command = "npx"
args = ["-y", "hikerapi-mcp"]
[mcp_servers.hikerapi.env]
HIKERAPI_KEY = "your-api-key"Tools
Tools are generated at startup from the live HikerAPI OpenAPI spec, so the list always matches the current API. Roughly 100+ tools across these groups (sizes as of this writing):
Group | Tools | Examples |
User Profile | 36 |
|
Post Details | 20 |
|
Search | 13 |
|
Hashtags | 7 |
|
Stories | 7 |
|
Location | 7 |
|
Audio, Share, Highlights, Comments | ~10 |
|
Each tool name mirrors its endpoint (GET /v2/user/by/username → get_v2_user_by_username). Your assistant can call tools/list over MCP to get the full, up-to-date list with parameter schemas. Legacy and System groups are excluded by default.
Configuration
Variable | Description | Required |
| Your HikerAPI access key (sent as | yes |
| Base URL. Default: | no |
| OpenAPI spec URL. Default: | no |
| Whitelist: only include operations with these tags (comma-separated) | no |
| Blacklist: additional tags to exclude (on top of default | no |
| Per-request timeout for API calls. Default: | no |
| Timeout for the startup spec fetch. Default: | no |
| Max bytes read from each API response. Default: | no |
| Max bytes read from the OpenAPI spec. Default: | no |
Legacy and System tags are excluded by default. Deprecated operations are also skipped.
If HIKERAPI_URL points to a host other than api.hikerapi.com or api.instagrapi.com, the server prints a warning on startup — your key will be sent there, so only use it for a self-hosted or proxied HikerAPI.
Example — expose only the most common groups:
"env": {
"HIKERAPI_KEY": "...",
"HIKERAPI_TAGS": "User Profile,Post Details,Search,Hashtags,Stories"
}How it works
AI Assistant ←stdio→ hikerapi-mcp ──https──> api.hikerapi.com
│
└─ fetches /openapi.json once on startup,
builds one MCP tool per GET endpointTool arguments map to the endpoint's query and path parameters. The response body is returned as-is (JSON text). Non-2xx responses are surfaced as tool errors with the HTTP status and body.
Development
git clone https://github.com/subzeroid/hikerapi-mcp.git
cd hikerapi-mcp
npm install
npm run build
HIKERAPI_KEY=your-key node dist/index.jsRun in watch mode:
HIKERAPI_KEY=your-key npm run devRun tests (unit + stdio smoke tests against a local mock server, no network/API key required):
npm testLicense
MIT
Maintenance
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/subzeroid/hikerapi-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server