mcpField
L
lead-generation

lead-generation

github.com/exa-labsマーケティング・グロース64965 回インストール2 日前に更新
リポジトリ

lead-generation について

lead-generationは、Exa Agent APIで調査し、構造化された見込み顧客リストを作成するスキルです。マーケティングや営業向けに、非同期の複数ステップで検索、確認、情報補完、構造化出力を行い、結果をCSVに保存します。

主な機能

  1. 01ICPに沿った企業調査
  2. 02Agent実行による検索と確認
  3. 03スキーマ指定の構造化データ出力
  4. 04除外指定と追加実行
  5. 05結果の並べ替えとCSV保存

活用シーン

  1. 01キャンペーン向け対象企業リストの作成
  2. 02地域やサブ業種による見込み顧客の抽出
  3. 03資金調達や採用情報による企業データの補完
  4. 04大規模リストの段階的拡張と重複排除

MCP 対応

このスキルにはAgentツールを有効にしたExa MCPサーバーが必要で、調査には`agent_run`ツールを使います。Exa APIキーが必要です。

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/exa-labs/agent-skills --skill lead-generation

インストール後、Claude Code で/lead-generationを入力して読み込まれたか確認します。

詳細

Exa Agent を使ったリード獲得

Exa Agent API を使って、情報を充実させたリードリストを生成します。Agent の実行は、非同期の複数ステップから成るウェブ調査タスクです。希望するリストと出力スキーマを指定すると、Exa がクエリの分解、検索、検証、情報の補足、構造化出力を内部で処理します。並列検索、サブエージェント、手動での重複排除をオーケストレーションする必要はありません。

非常に大規模なリードリストや、各項目を継続的に検証して管理するリードリストには、代わりに Exa Websets をご検討ください:https://exa.ai/docs/websets/quickstart

前提条件

このスキルには、Agent ツールを有効にした Exa MCP サーバーが必要です。agent_run を有効にするには、agent_tools URL 選択エイリアスを使用してください。

Agent ツールを利用できない場合は、ユーザーに次のように伝えてください。

Agent ツールを有効にした Exa MCP サーバーをインストールし、API キーを設定する必要があります。 手順:https://exa.ai/docs/get-started/exa-mcp

その後、停止してください。

ツールの制限

agent_run に加えて、Write と Bash(CSV 出力用)を使用してください。リードリスト自体の作成に汎用ウェブ検索を使用しないでください。

ワークフロー

1. Confirm the ICP with the user (one small Agent run if research is needed)
2. Call `agent_run` with an outputSchema
3. If the result is still running, call `agent_run` again with its `runId`
4. Read `output.structured` from the `agent_run` result
5. Write the CSV
6. Optional: expand with follow-up runs (previousRunId + input.exclusion)

ステップ 1:ICP を把握する

ユーザーが「[会社名] のリードを 200 件リストアップして」のように依頼した場合は、まず Ideal Customer Profile(理想的な顧客像、ICP)を明確にします。ユーザーがすでに ICP を説明している場合は、それを確認します。説明がない場合は、まず小規模な Agent を 1 回実行して調査します。

agent_run {
  "query": "Research {company_name}: what they sell, who their existing customers are, and what their ideal customer profile is.",
  "effort": "low",
  "outputSchema": {
    "type": "object",
    "properties": {
      "company_description": { "type": "string", "description": "What the company does in 2 sentences or less" },
      "icp_description": { "type": "string", "description": "Concise ICP description that clearly defines target companies" },
      "sub_verticals": { "type": "array", "maxItems": 10, "items": { "type": "string" }, "description": "Sub-verticals breaking down the ICP" },
      "useful_enrichments": { "type": "array", "maxItems": 8, "items": { "type": "string" }, "description": "Enrichment columns useful for filtering high-signal companies" }
    },
    "required": ["company_description", "icp_description", "sub_verticals", "useful_enrichments"]
  }
}

ICP をユーザーに提示し、次の点を確認します。

  • ICP の説明は正確ですか?
  • 除外する企業(競合他社、既存顧客)はありますか?
  • リードは何件必要ですか?(デフォルトは 200 件)
  • 追加したい情報項目はありますか?

ステップ 2:リード獲得の実行を作成する

上限を設定した companies 配列を含む outputSchema を設計します。スキーマは小さく、フラットで、明示的なものにし、配列には必ず maxItems を設定してください。

必ず含めるコアフィールド:

  • company_name(文字列)
  • website(文字列)
  • product_description(文字列。「12 語以内」)
  • icp_fit_score(整数、1〜10)
  • icp_fit_reasoning(文字列、「20 語以内の説得力のある一文」)

キャンペーンに合わせた追加情報項目(資金調達段階、従業員数の範囲、本社所在地、採用動向など)を追加します。CSV 出力を整然と保つため、文字列フィールドの説明には文字数の目安を指定してください。

次の実行入力を設定します。

  • query — ICP、地域、段階、希望する企業数を含め、リストの内容を説明します
  • outputSchema — maxItems で companies 配列に上限を設定した、厳密な出力構造
  • systemPrompt — スコアリングルール、情報源の優先順位、重複排除・除外の重視点
  • input.exclusion — 避ける企業(競合他社、既存顧客、以前の実行結果)
  • effort — デフォルトは "low"。大規模または難易度の高いリストには "auto"、"high"、または "xhigh"

例:

agent_run {
  "query": "Find 100 companies matching this ICP: {icp_description}. Prioritize {sub_verticals}. For each company, score ICP fit 1-10 for {user_company}.",
  "effort": "low",
  "systemPrompt": "Prefer official company sites and recent funding announcements. Do not include duplicates or subsidiaries of the same parent company.",
  "input": {
    "exclusion": [
      { "company_name": "{competitor_1}" },
      { "company_name": "{existing_customer_1}" }
    ]
  },
  "outputSchema": {
    "type": "object",
    "properties": {
      "companies": {
        "type": "array",
        "maxItems": 100,
        "items": {
          "type": "object",
          "properties": {
            "company_name": { "type": "string" },
            "website": { "type": "string", "format": "uri" },
            "product_description": { "type": "string", "description": "in 12 words or less" },
            "icp_fit_score": { "type": "integer", "description": "1-10" },
            "icp_fit_reasoning": { "type": "string", "description": "one-liner in 20 words or less" }
          },
          "required": ["company_name", "website", "product_description", "icp_fit_score", "icp_fit_reasoning"]
        }
      }
    },
    "required": ["companies"]
  }
}

agent_run は、可能であれば完了した結果を返します。agent_run_... ID とともに status: "running" が返された場合は、その ID を保存し、runId のみを指定して agent_run を続けて実行します。

ステップ 3:完了を待ち、出力を読み取る

  1. 実行中の場合は、outputReady が true になるか、実行が終端ステータス(failed または cancelled)に達するまで、runId を指定して agent_run を呼び出します。
  2. agent_run の結果から、企業情報を output.structured、引用情報を output.grounding、実行コストを costDollars から読み取ります。

会話に生の出力をすべて貼り付けないでください。すぐに CSV に進んでください。

ステップ 4:CSV を書き出す

output.structured.companies を {target_company}_leads_{YYYY-MM-DD}.csv に書き出し、icp_fit_score の降順で並べ替えます。配列フィールドは「 | 」で結合します。Bash 経由で Python の csv.writer(引用符とエスケープを処理)を使うか、小規模なリストであれば Write に直接書き出します。

概要を出力します。

## Lead Generation Complete

- Total leads: {count}
- ICP score distribution: 8-10: {N} | 5-7: {N} | 1-4: {N}
- Run ID: {agent_run_id}
- Cost: ${costDollars}
- Output: {filename}

ステップ 5:リストを拡張する

1 回の実行で返された件数より多くの見込み客を希望する場合:

  • 完了した実行の ID を previousRunId に設定して追加の企業をリクエストし、新しいフォローアップ実行を作成します
  • 新しい実行で重複を避けられるよう、すでに収集した企業レコードを input.exclusion に入れます
  • 新しい結果を CSV に追加し、正規化した企業名(「Inc」/「Ltd」などを削除し、大文字と小文字を区別しない)で重複を再排除します

数百件を超えるリストの場合は、1 回の巨大な実行ではなく、この方法で複数回の実行を順番に行い、まずユーザーに範囲を確認します:「これには約 {N} 回の Agent 実行が必要です。進めますか?」

失敗への対処

  • 実行が failed で終了した場合は、agent_run の結果からエラーを読み取り、クエリまたはスキーマを調整して、異なる表現で 1 回だけ再試行します
  • 進行中の agent_run 呼び出しを中断しても、実行はキャンセルされません
  • 結果が一貫して要求件数を下回る場合は、広範な実行を 1 回行う代わりに、ICP を 2~3 個のサブバーティカルに絞って実行します

MCP の設定

Exa API キーが必要です。https://dashboard.exa.ai/api-keys から取得してください。

{
  "servers": {
    "exa": {
      "type": "http",
      "url": "https://mcp.exa.ai/mcp?tools=agent_tools",
      "headers": {
        "x-api-key": "YOUR_EXA_API_KEY"
      }
    }
  }
}

参考資料

コメント