Forage

io.github.isaac-levinePublished by GitHub account isaac-levinev0.1.1Updated Oct 24, 2026

Self-improving tool discovery for AI agents. Find, install, and use new MCP servers automatically.

The publisher's own server: Forage

Overview

AI-generated overview

Lets an AI agent search for, install, and learn to use other MCP servers on demand, without restarting the session.

What you can do
Forage is a gateway MCP server that discovers other MCP servers and proxies their tools. Its tools include forage_search (searches the Official MCP Registry, Smithery, and npm), forage_evaluate (package details, downloads, README, install command), forage_install (installs and starts a server as a child process, requiring user approval), forage_learn (writes usage instructions to agent rule files), forage_status, and forage_uninstall. Installed tools are re-registered under namespaced names and announced with a tools/list_changed notification, so the agent can use them immediately. State is kept in a local directory, and previously installed servers auto-start on the next session.
When to use it
Useful when an agent repeatedly hits tasks it lacks tools for and you would rather it find and add the right MCP server itself than configure each one by hand. Best suited to desktop coding agents such as Claude Code or Cursor that can run local child processes.
Requirements
Runs locally over stdio, installed from the npm package forage-mcp (typically via npx). Requires Node.js and network access for registry and npm searches and for downloading installed packages. No accounts, API keys, or environment variables are declared.
Before you install
Installing a tool runs npx -y on a third-party package and starts it as a child process, so only approve packages you trust; every forage_install call requires confirm: true. forage_learn writes to agent rule files such as CLAUDE.md, AGENTS.md, or .cursor/rules/, and installed servers auto-start in later sessions. Environment variables for child servers are passed at install time and are not persisted, but the child server itself receives them.

Installation

In SourceWeft

  1. Open Forage in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

🌿 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


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.

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

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

Cursor

bash
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
Architecture
┌─────────────────────────────────────────────┐│  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
Persistence

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.

CLI

Forage also includes a CLI for humans:

bash
forage search "postgres database"    # Search registriesforage list                          # List installed toolsforage init                          # Set up for Claude Codeforage 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

bash
git clone https://github.com/isaac-levine/forage.gitcd foragenpm installnpm run build

Test locally with Claude Code:

bash
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

Source: README.md at commit 47caf33

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v0.1.1LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts

Other Forage integrations