harvestapi-mcp

harvestapi-mcp

MCP server providing read-only access to LinkedIn data (profiles, companies, posts, jobs, leads, ads, groups, and account info) via the HarvestAPI, exposing 25 tools over stdio.

Category
访问服务器

README

harvestapi-mcp

CI License: MIT Node >=20 MCP

MCP server for HarvestAPI — LinkedIn profiles, companies, posts, jobs, leads, ads, groups, and platform account data over the Model Context Protocol (stdio).

All 25 tools are read-only. No message sending, no connection automation, no billing mutations.

Legal / Ethical Notice

This server is a thin wrapper over the HarvestAPI LinkedIn-data API. You are responsible for complying with LinkedIn's Terms of Service, HarvestAPI's Terms, and applicable data-protection laws (GDPR, etc.) when using LinkedIn-sourced data. Do not use harvested data to spam, harass, or violate privacy. The maintainers provide no warranty and accept no liability for how you use the tool.

HarvestAPI is a third-party scraping/enrichment service — it is not affiliated with LinkedIn.

Prerequisites

  • Node.js 20+
  • A HarvestAPI key — get one at https://harvestapi.io/admin/api-keys

Install

git clone https://github.com/Hassan220022/harvestapi-mcp
cd harvestapi-mcp
npm ci
npm run build

Or run without cloning (after npm publish or via npx from the repo):

npx --yes github:Hassan220022/harvestapi-mcp

Environment

Variable Required Default Description
HARVESTAPI_KEY yes — Your HarvestAPI API key. Sent as X-API-Key.
HARVESTAPI_BASE_URL no https://api.harvestapi.io Override base URL (rarely needed).
HARVESTAPI_TIMEOUT_MS no 30000 Request timeout in ms.
HARVESTAPI_MAX_RETRIES no 2 Max retries for transient 5xx / 429 / timeout. Never retried for 401/403/422.

Copy .env.example to .env for local dev — but do not commit .env.

cp .env.example .env
# edit .env

Configure

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "harvestapi": {
      "command": "node",
      "args": ["/absolute/path/to/harvestapi-mcp/dist/index.js"],
      "env": {
        "HARVESTAPI_KEY": "your_key_here"
      }
    }
  }
}

Generic MCP (any stdio client)

{
  "command": "node",
  "args": ["/path/to/harvestapi-mcp/dist/index.js"],
  "env": { "HARVESTAPI_KEY": "your_key_here" }
}

Using npx (no local build)

{
  "mcpServers": {
    "harvestapi": {
      "command": "npx",
      "args": ["-y", "github:Hassan220022/harvestapi-mcp"],
      "env": { "HARVESTAPI_KEY": "your_key_here" }
    }
  }
}

Tools

25 tools, all harvest_*. Every tool maps to a verified HarvestAPI endpoint — see docs/tool-mapping.md and docs/harvestapi-endpoint-inventory.json.

Tool Description Required params
harvest_get_profile Get LinkedIn profile one of url, publicIdentifier, profileId
harvest_search_profiles Search LinkedIn profiles — (all filters optional)
harvest_get_profile_posts Get posts by a profile one of profile, profileId, profilePublicIdentifier
harvest_get_profile_comments Get comments by a profile one of profile, profileId, profilePublicIdentifier
harvest_get_profile_reactions Get reactions by a profile one of profile, profileId, profilePublicIdentifier
harvest_get_company Get LinkedIn company one of url, universalName, search
harvest_search_companies Search companies —
harvest_get_company_posts Get posts by a company one of company, companyId, companyUniversalName
harvest_get_group Get LinkedIn group one of url, groupId
harvest_search_groups Search groups —
harvest_search_geo_id Resolve LinkedIn Geo ID by text search
harvest_get_post Get a LinkedIn post url
harvest_search_posts Search LinkedIn posts —
harvest_get_post_comments Get comments on a post post
harvest_get_post_reactions Get reactions on a post post
harvest_get_comment_reactions Get reactions on a comment commentId or commentUrl
harvest_get_comment_replies Get replies to a comment commentId or commentUrl
harvest_get_job Get LinkedIn job one of jobId, url
harvest_search_jobs Search LinkedIn jobs —
harvest_search_leads Search leads (Sales Navigator) —
harvest_search_services Search LinkedIn services search
harvest_get_ad Get LinkedIn ad one of adId, url
harvest_search_ads Search LinkedIn ad library —
harvest_get_my_api_user Get your HarvestAPI user/account —
harvest_get_my_private_account_pools Get your private LinkedIn account pools —

Intentionally excluded (5 endpoints): accept-connection, send-connection, send-message, received-connections, sent-connections — they automate LinkedIn user actions. See tool-mapping.

Examples

Profile lookup

{ "tool": "harvest_get_profile", "arguments": { "publicIdentifier": "williamhgates" } }

Profile with enrichment flags

{ "tool": "harvest_get_profile", "arguments": { "url": "https://www.linkedin.com/in/williamhgates", "findEmail": "true", "skipSmtp": "true" } }

Company

{ "tool": "harvest_get_company", "arguments": { "universalName": "google" } }

Search profiles

{ "tool": "harvest_search_profiles", "arguments": { "search": "staff engineer", "currentCompany": "google", "page": "1" } }

Post comments

{ "tool": "harvest_get_post_comments", "arguments": { "post": "https://www.linkedin.com/posts/.../..." } }

Error & Rate-Limit Behavior

HTTP Behavior
401/403 HarvestApiError with hint — never retried. Check HARVESTAPI_KEY.
404/422 HarvestApiError — never retried.
429 HarvestApiError with Retry-After surfaced in message and retryAfter field. Retried with backoff respecting Retry-After up to HARVESTAPI_MAX_RETRIES.
5xx Retried with exponential backoff (400 ms × 2^attempt, max 5 s) up to HARVESTAPI_MAX_RETRIES.
timeout HarvestTimeoutError — retried with backoff up to HARVESTAPI_MAX_RETRIES.

HarvestAPI has no per-minute rate limit; concurrency limits are per plan (Free 1, Starter 5, Basic 10, Pro 20, Business 40) with queue size 10 — see https://docs.harvestapi.io/guides/concurrency.md. Exceeding queue returns an error; the client surfaces 429 with Retry-After when present.

Validation errors (missing required identifier, requireAtLeastOne) are local HarvestValidationError before any request.

Raw API payloads are preserved in responses. Email fields are only marked verified if the API says so.

Development

npm ci
npm run lint        # eslint
npm run typecheck   # tsc --noEmit
npm run build       # tsc
npm test            # vitest
npm run test:coverage
npm run check       # lint + typecheck + build + test

Needs Node 20+.

Project Docs

Security

  • HARVESTAPI_KEY is only read from env (HARVESTAPI_KEY). Never logged, never included in error bodies beyond redacted hints.
  • Never commit .env. .env.example contains placeholders only. .gitignore covers .env, node_modules, dist, coverage.
  • Report security issues via GitHub Issues (do not post keys in issues).

Contributing

PRs welcome. Run npm run check before submitting. See docs/research-notes.md for how endpoints are sourced and validated.

License

MIT — see LICENSE.

推荐服务器

Baidu Map

Baidu Map

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

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

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

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

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

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

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

官方
精选
本地
TypeScript
VeyraX

VeyraX

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

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

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

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

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

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

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

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选