PluginBench
MCP Server
Maintained
MIT

io.github.isaac-levine/forage MCP Server

io.github.isaac-levine/forage

Self-improving tool discovery for AI agents. Install one MCP server and let your agent find and install the rest automatically.

What is the io.github.isaac-levine/forage MCP server?

Forage is an MCP server that enables AI agents to discover, install, and learn to use new MCP tools automatically without restarting. It acts as a gateway/proxy that searches the Official MCP Registry, Smithery, and npm, installs tools as child processes, and persists knowledge so agents retain capabilities across sessions.

Forage solves the problem of AI agents being limited to pre-configured tools. When an agent encounters a task it can't do, Forage lets it search for the right MCP server, install it instantly, and learn how to use it—all without manual intervention or session restarts. The agent becomes permanently smarter with each discovery.

How to install io.github.isaac-levine/forage

Copy-paste configuration for popular MCP clients.

transport: stdio
Config generated by PluginBench — verify against the source before use.
~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "forage": {
      "command": "npx",
      "args": [
        "-y",
        "forage-mcp"
      ]
    }
  }
}

Tools & capabilities

Tools this server exposes to the agent.

  • forage_search — Search for MCP servers across the Official MCP Registry, Smithery, and npm in parallel
  • forage_evaluate — Get details on a package including downloads, README, and 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, or .cursor/rules/ for persistent knowledge
  • forage_status — List all installed and running tools
  • forage_uninstall — Remove a tool and clean up associated rules

Use cases

  • Automatically discover and install a Postgres MCP server when an agent needs to query a database
  • Search for a GitHub MCP server and install it mid-session without restarting Claude Code or Cursor
  • Have an agent learn how to use newly installed tools and save instructions for future sessions
  • Audit all tool installations and uninstallations with timestamps and logs
  • Extend agent capabilities on-demand by searching npm, Smithery, and the Official MCP Registry simultaneously

io.github.isaac-levine/forage MCP server FAQ

What is Forage?

Forage is an MCP server that acts as a gateway, allowing AI agents to discover, install, and learn to use new MCP tools automatically. Instead of configuring all tools upfront, you install Forage once and it handles the rest.

Is Forage free?

Yes, Forage is open-source under the MIT license and available on npm as forage-mcp.

How do I install Forage in Claude Code?

Run: claude mcp add forage -- npx -y forage-mcp

How do I install Forage in Cursor?

Run: npx forage-mcp init --client cursor

Does Forage require user approval to install tools?

Yes, every forage_install call requires explicit user confirmation (confirm: true) for security. All installs and uninstalls are logged to ~/.forage/install-log.json.

Does Forage store secrets or require a backend?

No. Forage runs entirely locally, stores no secrets, and only makes read-only requests to public registries. Environment variables are passed at install time, not persisted.

README (reference)

Source of truth, from the repository.

<div align="center">

🌿 Forage

Self-improving tool discovery for AI agents.

Install one MCP server. Your agent finds the rest.

npm version npm downloads License: MIT

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](assets/demo.gif) -->

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

ToolDescription
forage_searchSearch for MCP servers across the Official MCP Registry, Smithery, and npm
forage_evaluateGet details on a package — downloads, README, install command
forage_installInstall and start an MCP server as a proxied subprocess (requires user approval)
forage_learnWrite usage instructions to CLAUDE.md / AGENTS.md / .cursor/rules/
forage_statusList all installed and running tools
forage_uninstallRemove 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 persists — forage_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/:

FilePurpose
manifest.jsonInstalled tools, command/args, auto-start configuration
install-log.jsonAudit 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

Related MCP servers

Local US events: trivia, libraries, markets and gigs, with VenuNite links and ticket handoffs.

Israeli news in Hebrew and English: stories, sources, comparisons, coverage gaps, people and trends.

0
View repository →

Analyze your repo's stack and generate grounded, time-boxed spike decision docs.

View repository →
COCode of Paper logo

Code of Paper

Maintained

Find GitHub implementations of arXiv research papers — paper lookup, ranked code, search.

1
Python
MIT
View repository →
KOKolada MCP Server logo

Access 5,000+ Swedish municipal and regional KPIs for all 290 municipalities via AI.

12
TypeScript
MIT
View repository →
OEOECD MCP Server logo

OECD MCP Server

Maintained

OECD economic and statistical data via SDMX API. Access 5,000+ datasets across 17 categories.

7
TypeScript
MIT
View repository →