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 集成