Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 47,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here
forage logo

forage

isaac-levine/forage
11 starsv0.1.1STDIORegistry activeMITUpdated 2026-02-21Community

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

claude mcp add forage -- npx -y forage-mcp

Summary

Self-improving tool discovery for AI agents. Searches registries, installs MCP servers as subprocesses, and persists tool knowledge across sessions — no restarts needed.

Connect from your MCP client

One-click install

Add this server to your editor with a single click. Fill in any required credentials afterward.

Claude Code

Run this once and Claude Code registers the server for you:

claude mcp add forage -- npx -y forage-mcp

Claude Desktop

Add this to claude_desktop_config.json under Settings → Developer → Edit Config:

{
  "mcpServers": {
    "forage": {
      "command": "npx",
      "args": [
        "-y",
        "forage-mcp"
      ]
    }
  }
}

Cursor

Add this to .cursor/mcp.json in your project (or ~/.cursor/mcp.json for all projects):

{
  "mcpServers": {
    "forage": {
      "command": "npx",
      "args": [
        "-y",
        "forage-mcp"
      ]
    }
  }
}

Cline and other MCP clients

Most MCP clients accept the standard mcpServers JSON block:

{
  "mcpServers": {
    "forage": {
      "command": "npx",
      "args": [
        "-y",
        "forage-mcp"
      ]
    }
  }
}

Codex CLI

Register the server with OpenAI's Codex CLI — run this once, or add the equivalent block to ~/.codex/config.toml:

codex mcp add forage -- npx -y forage-mcp

# or add to ~/.codex/config.toml:
[mcp_servers.forage]
command = "npx"
args = ["-y", "forage-mcp"]

OpenClaw

OpenClaw reads MCP servers from the mcp.servers section of ~/.openclaw/openclaw.json (managed via `openclaw mcp add` or the mcporter skill):

{
  "mcp": {
    "servers": {
      "forage": {
        "command": "npx",
        "args": [
          "-y",
          "forage-mcp"
        ]
      }
    }
  }
}

README.md

<div align="center">

🌿 Forage

Self-improving tool discovery for AI agents.

Install one MCP server. Your agent finds the rest.

![npm version](https://www.npmjs.com/package/forage-mcp) ![npm downloads](https://www.npmjs.com/package/forage-mcp) ![License: MIT](LICENSE)

npm · GitHub · Contributing

</div>

---

Forage is an MCP server that lets AI agents discover, install, and learn to use new tools — automatically. When an agent hits a wall, it forages for the right tool, installs it, and teaches itself how to use it. No restarts. No manual config. The agent gets permanently smarter.

<!-- TODO: Add demo GIF here --> <!-- !Forage demo -->

Why?

AI coding agents are limited to whatever tools they're configured with at session start. Need to query a database? Deploy to Vercel? Search Slack? The agent apologizes and you manually install the right MCP server.

Forage closes that loop:

Agent encounters a task it can't do
  → forage_search("query postgres database")
  → forage_install("@modelcontextprotocol/server-postgres")
  → Tools available IMMEDIATELY (no restart)
  → forage_learn() saves instructions to CLAUDE.md
  → Next session: auto-starts, agent already knows how to use it

Quick Start

Claude Code

claude mcp add forage -- npx -y forage-mcp

Cursor

npx forage-mcp init --client cursor

That's it. Start a new session and Forage is ready.

Tools

| Tool | Description | |---|---| | forage_search | Search for MCP servers across the Official MCP Registry, Smithery, and npm | | forage_evaluate | Get details on a package — downloads, README, install command | | forage_install | Install and start an MCP server as a proxied subprocess (requires user approval) | | forage_learn | Write usage instructions to CLAUDE.md / AGENTS.md / .cursor/rules/ | | forage_status | List all installed and running tools | | forage_uninstall | Remove a tool and clean up rules |

How It Works

Forage is a gateway/proxy MCP server:

  1. You install Forage once — it's the only MCP server you configure manually
  2. Forage discovers tools — searches the Official MCP Registry, Smithery, and npm in parallel
  3. Forage installs tools — starts them as child processes, wraps their capabilities
  4. No restart needed — emits list_changed notifications so the agent picks up new tools instantly
  5. Knowledge persistsforage_learn writes to agent rule files, manifest auto-starts tools next session

<details> <summary><strong>Architecture</strong></summary>

┌─────────────────────────────────────────────┐
│  Claude Code / Cursor / Codex               │
│                                             │
│  "I need to query a Postgres database"      │
└──────────────────┬──────────────────────────┘
                   │ MCP
                   ▼
┌─────────────────────────────────────────────┐
│  Forage MCP Server                          │
│                                             │
│  forage_search ─── Official Registry        │
│  forage_install    Smithery                 │
│  forage_learn      npm                      │
│  forage_status                              │
│                                             │
│  ┌─────────────┐  ┌─────────────┐          │
│  │ Postgres MCP│  │ GitHub MCP  │  ...      │
│  │ (subprocess)│  │ (subprocess)│          │
│  └─────────────┘  └─────────────┘          │
└─────────────────────────────────────────────┘

When you install a tool through Forage:

  1. Forage runs npx -y <package> as a child process
  2. Connects to it via StdioClientTransport (MCP client)
  3. Discovers the child server's tools via listTools
  4. Re-registers each tool on the Forage server with a namespaced name (foraged__<server>__<tool>)
  5. Sends tools/list_changed notification — the agent sees new tools immediately
  6. When the agent calls a proxied tool, Forage forwards the call to the child server

</details>

<details> <summary><strong>Persistence</strong></summary>

Forage stores its state in ~/.forage/:

| File | Purpose | |---|---| | manifest.json | Installed tools, command/args, auto-start configuration | | install-log.json | Audit trail of all installs and uninstalls | | cache/ | Cached registry search results |

On startup, Forage reads the manifest and auto-starts all previously installed servers. Your agent picks up right where it left off.

</details>

CLI

Forage also includes a CLI for humans:

forage search "postgres database"    # Search registries
forage list                          # List installed tools
forage init                          # Set up for Claude Code
forage init --client cursor          # Set up for Cursor

Security

[!IMPORTANT] Forage cannot install tools without explicit user approval. Every forage_install call requires confirm: true.

  • Audit trail — every install/uninstall is logged with timestamps to ~/.forage/install-log.json
  • No remote backend — everything runs locally. Registry searches are read-only GET requests to public APIs.
  • No secrets stored — environment variables for child servers are passed at install time, not persisted.

Development

git clone https://github.com/isaac-levine/forage.git
cd forage
npm install
npm run build

Test locally with Claude Code:

claude mcp add forage-dev -- node /path/to/forage/dist/server.js

See CONTRIBUTING.md for more details.

Roadmap

Features

  • [ ] forage update — check for newer versions of installed tools
  • [ ] Support for pip/cargo/brew packages (not just npm)
  • [ ] Smarter search ranking (weight by downloads, stars, description relevance)
  • [ ] Auto-configure environment variables from .env files
  • [ ] forage doctor — diagnose common setup issues

Distribution

Community

  • [ ] Demo GIF / video in README
  • [ ] Write launch blog post
  • [ ] Post to r/ClaudeAI, r/LocalLLaMA, Hacker News (Show HN)
  • [ ] Share in MCP Discord / community channels
  • [ ] Write use-case guides (e.g. "Add Postgres to Claude Code in 30 seconds")
  • [ ] Add GitHub Discussions for Q&A and feature requests

License

MIT

See related servers & alternatives →

Related MCP servers

Browse all →

Related guides

Hand-picked reading to help you choose and use Vector & Memory servers.