Forage

io.github.isaac-levine由 GitHub 帳號 isaac-levine 發布v0.1.1更新於 Oct 24, 2026

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

發布方自己的服務:Forage

概覽

AI 產生的概覽

讓 AI 助理依需求搜尋、安裝並學會使用其他 MCP 伺服器,不必重啟工作階段。

可以做什麼
Forage 是閘道型的 MCP 伺服器,用來探索其他 MCP 伺服器並代理其工具。它的工具包括 forage_search(在官方 MCP Registry、Smithery 和 npm 中搜尋)、forage_evaluate(查看套件詳情、下載量、README 與安裝指令)、forage_install(以子程序方式安裝並啟動伺服器,需要使用者核准)、forage_learn(把使用說明寫入助理規則檔)、forage_status 與 forage_uninstall。已安裝的工具會以帶命名空間的名稱重新註冊,並透過 tools/list_changed 通知立即供助理使用。狀態存放在本機目錄中,先前安裝的伺服器會在下次工作階段自動啟動。
適用情境
適合助理反覆遇到缺少工具的工作、而你希望它自行找到並加入合適的 MCP 伺服器,而不是逐一手動設定的情境。最適合能執行本機子程序的桌面編碼助理,例如 Claude Code 或 Cursor。
執行需求
透過 stdio 在本機執行,從 npm 套件 forage-mcp 安裝(通常使用 npx)。需要 Node.js,以及用於登錄檔與 npm 搜尋、下載所安裝套件的網路存取。未宣告任何帳號、API 金鑰或環境變數。
安裝前請注意
安裝工具會對第三方套件執行 npx -y 並將其啟動為子程序,因此只應核准你信任的套件;每次 forage_install 呼叫都需要 confirm: true。forage_learn 會寫入 CLAUDE.md、AGENTS.md 或 .cursor/rules/ 等助理規則檔,已安裝的伺服器會在之後的工作階段自動啟動。子伺服器的環境變數在安裝時傳入且不會被保存,但子伺服器本身會收到這些變數。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Forage,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

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

來源:README.md,提交 47caf33

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.1最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

其他 Forage 整合