# Forage — MCP Server for AI Agents (`ernesta_labs/forage`) Actor

MCP server giving AI agents real-time web search, page scraping, company intelligence, email discovery, local lead generation, and a persistent knowledge graph.

Pay only for what you use, no subscriptions.

- **URL**: https://apify.com/ernesta\_labs/forage.md
- **Developed by:** [Riccardo Minniti](https://apify.com/ernesta_labs) (community)
- **Categories:** MCP servers, Lead generation, Automation
- **Stats:** 5 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $30.00 / 1,000 web searches

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Forage MCP Server

Real-time web intelligence and lead generation for AI agents. Search, scrape, discover companies, find B2B emails, and build lead lists.

### What is Forage MCP?

Forage MCP is a Model Context Protocol server that gives AI agents capabilities they don't have built-in: verified email discovery, B2B lead generation, local business data, company intelligence, and persistent memory. Runs on Apify infrastructure.

### Capabilities

- **Real-time web search** — multi-source search returning ranked results
- **Page scraping** — extract clean content from any URL as markdown
- **Company intelligence** — website summary, contacts, social profiles
- **Verified B2B emails** — with confidence scores and LinkedIn profiles
- **Lead discovery** — companies and local businesses with phone, website, rating
- **Knowledge graph** — automatically remembers everything your agent researches
- **12 Skills** — multi-step workflows for dossiers, decision makers, outbound lists, competitive intel

### Quick Start

#### Streamable HTTP (Recommended)

```json
{
  "mcpServers": {
    "forage": {
      "command": "npx",
      "args": [
        "-y",
        "@anthropic/mcp-proxy",
        "https://ernesta-labs--forage.apify.actor/mcp/sse"
      ],
      "env": {
        "APIFY_API_TOKEN": "YOUR_APIFY_TOKEN"
      }
    }
  }
}
```

### Pricing

Pay per tool call. No subscription.

| Tool | Price |
|------|-------|
| `search_web` | $0.03 |
| `scrape_page` | $0.07 |
| `get_company_info` | $0.08 |
| `find_emails` | $0.10 |
| `find_local_leads` | $0.15 |
| `find_leads` | $0.25/100 |
| Skills | $0.45 - $3.50 |
| Knowledge graph | $0.02 - $0.05 |

### Tools Reference

#### Core Tools

- `search_web` — Real-time web search
- `scrape_page` — Extract clean content from URLs
- `get_company_info` — Company website and contacts
- `find_emails` — Verified B2B emails
- `find_local_leads` — Local business data
- `find_leads` — B2B lead lists

#### Knowledge Graph

- `query_knowledge` — Search accumulated intelligence
- `enrich_entity` — Get all data about a company
- `find_connections` — Discover entity relationships
- `get_graph_stats` — View graph statistics

#### Actor Gateway

- `list_verified_actors` — Browse available actors
- `get_actor_schema` — Get actor input schema
- `call_actor` — Run any Apify actor

#### Skills

- `skill_company_dossier` — Full company profile ($0.50)
- `skill_prospect_company` — Decision makers ($0.75)
- `skill_outbound_list` — 100 leads for CRM ($3.50)
- `skill_local_market_map` — Local businesses ($0.80)
- `skill_decision_maker_finder` — 20 contacts ($1.00)
- `skill_competitor_intel` — Pricing, features ($0.80)
- `skill_competitor_ads` — Active ads ($0.65)
- `skill_job_signals` — Hiring patterns ($0.55)
- `skill_tech_stack` — Technologies used ($0.45)
- `skill_funding_intel` — Funding history ($0.70)
- `skill_social_proof` — Reviews ($0.55)
- `skill_market_map` — Competitors in market ($1.20)

### Example Usage

#### Find company emails

```json
{ "domain": "stripe.com", "limit": 10 }
```

#### Generate outbound leads

```json
{ "job_title": "Marketing Director", "industry": "SaaS", "location": "United States" }
```

#### Company dossier

```json
{ "domain": "notion.so" }
```

### Support

- GitHub: github.com/ernestalabs/forage
- Email: support@ernesta.com

# Actor input Schema

## `searchQuery` (type: `string`):

Optional test query to verify search functionality

## Actor input object example

```json
{}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("ernesta_labs/forage").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("ernesta_labs/forage").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call ernesta_labs/forage --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,ernesta_labs/forage"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/U8MLnOIcHueTeDnLj/builds/9gFxBPjMpkiwBSJ8w/openapi.json
