
HikerAPI
io.github.subzeroidv1.1.2更新于 Oct 6, 2026
Instagram data via HikerAPI: profiles, posts, reels, stories, comments, hashtags, locations.
概览
让助手通过 HikerAPI 查询 Instagram 数据:个人资料、帖子、Reels、快拍、评论、话题标签和地点。
- 功能
- 启动时根据 HikerAPI 的 OpenAPI 规范生成 MCP 工具,把每个只读 GET 端点映射为一个工具,例如 get_v2_user_by_username 或 get_v2_hashtag_medias_recent。默认核心集提供约 44 个精选工具,每个任务一个,并带有说明用途、分页和计费的手写描述。设置 HIKERAPI_TOOLS=all 可暴露所有未弃用的端点(100 个以上)。响应以原始 JSON 文本返回,非 2xx 响应会作为工具错误呈现。
- 适用场景
- 适合助手需要 Instagram 个人资料、帖子、Reels、快拍、评论、话题标签或地点数据用于研究、监测或内容分析的场景。如果你已有 HikerAPI 访问权限,并希望助手直接调用这些端点而不必自己写 API 代码,就值得添加。
- 运行要求
- 通过 stdio 在本地运行,通常使用 npx hikerapi-mcp,因此需要 Node.js。需要在 HIKERAPI_KEY 环境变量中提供 HikerAPI 访问密钥,并以 x-access-key 请求头发送。需要访问 api.hikerapi.com 的网络连接,并在启动时获取 OpenAPI 规范。可选变量可控制基础 URL、工具集、标签过滤、超时和响应大小限制。
安装
在 SourceWeft 中
- 打开 控制台中的 HikerAPI,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
hikerapi-mcp
[npm version] [npm downloads] [License: MIT]
MCP server for HikerAPI — Instagram data API. Available on npm: hikerapi-mcp.
Generates MCP tools from the HikerAPI OpenAPI spec at startup. HikerAPI only exposes read (GET) endpoints — each tool maps 1:1 to one of them (GET /v2/user/by/username → get_v2_user_by_username). By default you get a core set of ~45 tools, one per task, each with a description that tells the assistant when to use it; HIKERAPI_TOOLS=all exposes every non-deprecated endpoint (100+).
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 Desktop
Add to claude_desktop_config.json:
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:
OpenAI Codex
Append to ~/.codex/config.toml:
Tools
Tools are generated at startup from the live HikerAPI OpenAPI spec.
HikerAPI has 100+ GET endpoints, and most of them are version variants of the same call (v1 / v2 / gql / g2). Handing all of them to an assistant makes it pick the wrong one, so the default core set keeps one endpoint per task:
Core tools carry hand-written descriptions (what the tool does, when to prefer a sibling, pagination, billing) and every tool is annotated read-only. The list lives in src/curated.ts.
Set HIKERAPI_TOOLS=all to expose every non-deprecated endpoint instead — same tool names as before, so existing prompts keep working. Tool names mirror their endpoint (GET /v2/user/by/username → get_v2_user_by_username); call tools/list over MCP for the current list with parameter schemas. Legacy and System groups are excluded in both modes.
Configuration
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.
Requests are sent with User-Agent: hikerapi-mcp/<version>.
Example — expose every endpoint of the most common groups:
How it works
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
Run in watch mode:
Run tests (unit + stdio smoke tests against a local mock server, no network/API key required):
License
MIT
来源:README.md,提交 0ca4b6a
工具
0版本历史
1- v1.1.2最新Oct 6, 2026

