hikerapi-mcp

hikerapi-mcp

MCP server for HikerAPI — auto-generates 100+ Instagram tools (profiles, posts, reels, stories, comments, hashtags, locations) from the live OpenAPI spec. Local stdio via npx -y hikerapi-mcp, requires only HIKERAPI_KEY.

Category
访问服务器

README

hikerapi-mcp

npm version npm downloads License: MIT

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/usernameget_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.

Get your free 100 requests here

Quick start

  1. Get an API key at hikerapi.com/tokens.
  2. Add the server to your AI assistant.
  3. 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-mcp

Claude 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 get_v2_user_by_username, get_v2_user_by_id, get_v1_user_medias
Post Details 20 get_v2_media_info_by_code, get_v2_media_comments, get_v2_media_likers
Search 13 get_v1_search_users, get_v1_search_hashtags
Hashtags 7 get_v2_hashtag_medias_top, get_v2_hashtag_medias_recent
Stories 7 get_v2_story_by_url, get_v1_story_by_id
Location 7 get_v1_location_medias_recent, get_v1_location_search
Audio, Share, Highlights, Comments ~10 get_v2_track_by_id, get_v1_share_by_url, …

Each tool name mirrors its endpoint (GET /v2/user/by/usernameget_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
HIKERAPI_KEY Your HikerAPI access key (sent as x-access-key header) yes
HIKERAPI_URL Base URL. Default: https://api.hikerapi.com (alias https://api.instagrapi.com) no
HIKERAPI_SPEC_URL OpenAPI spec URL. Default: ${HIKERAPI_URL}/openapi.json no
HIKERAPI_TAGS Whitelist: only include operations with these tags (comma-separated) no
HIKERAPI_EXCLUDE_TAGS Blacklist: additional tags to exclude (on top of default Legacy,System) no
HIKERAPI_TIMEOUT_MS Per-request timeout for API calls. Default: 30000 no
HIKERAPI_SPEC_TIMEOUT_MS Timeout for the startup spec fetch. Default: 60000 no
HIKERAPI_MAX_RESPONSE_BYTES Max bytes read from each API response. Default: 10485760 (10 MB) no
HIKERAPI_MAX_SPEC_BYTES Max bytes read from the OpenAPI spec. Default: 8388608 (8 MB) 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 endpoint

Tool 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.js

Run in watch mode:

HIKERAPI_KEY=your-key npm run dev

Run tests (unit + stdio smoke tests against a local mock server, no network/API key required):

npm test

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
mcp-server-qdrant

mcp-server-qdrant

这个仓库展示了如何为向量搜索引擎 Qdrant 创建一个 MCP (Managed Control Plane) 服务器的示例。

官方
精选
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选