npm forage-mcpstdioMITupdated 6mo ago
Self-improving tool discovery for AI agents.
ΒΏQuΓ© puedes hacer con forage?
πΏ Forage
Self-improving tool discovery for AI agents.
Install one MCP server. Your agent finds the rest.
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
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:
- You install Forage once β it's the only MCP server you configure manually
- Forage discovers tools β searches the Official MCP Registry, Smithery, and npm in parallel
- Forage installs tools β starts them as child processes, wraps their capabilities
- No restart needed β emits
list_changednotifications so the agent picks up new tools instantly - Knowledge persists β
forage_learnwrites to agent rule files, manifest auto-starts tools next session
βββββββββββββββββββββββββββββββββββββββββββββββ
β 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:
- Forage runs
npx -y <package>as a child process - Connects to it via
StdioClientTransport(MCP client) - Discovers the child server's tools via
listTools - Re-registers each tool on the Forage server with a namespaced name (
foraged__<server>__<tool>) - Sends
tools/list_changednotification β the agent sees new tools immediately - When the agent calls a proxied tool, Forage forwards the call to the child server
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.
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_installcall requiresconfirm: 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
.envfiles -
forage doctorβ diagnose common setup issues
Distribution
- Publish to npm
- Submit to the Official MCP Registry
- Submit to Smithery
- Submit to mcp.so and glama.ai
- Landing page at forage.dev
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
InstalaciΓ³n
AΓ±ade forage a tu cliente. Elige el que uses.
claude mcp add forage-mcp -- npx -y forage-mcpcodex mcp add forage-mcp -- npx -y forage-mcpamp mcp add forage-mcp -- npx -y forage-mcp{
"mcpServers": {
"forage-mcp": {
"command": "npx",
"args": [
"-y",
"forage-mcp"
]
}
}
}Add to `claude_desktop_config.json`, then restart Claude Desktop.
{
"mcpServers": {
"forage-mcp": {
"command": "npx",
"args": [
"-y",
"forage-mcp"
]
}
}
}Add to `~/.cursor/mcp.json`, or `.cursor/mcp.json` for a single project.
code --add-mcp '{"name":"forage-mcp","command":"npx","args":["-y","forage-mcp"]}'Or add the block manually to `.vscode/mcp.json` under `servers`.
{
"mcpServers": {
"forage-mcp": {
"command": "npx",
"args": [
"-y",
"forage-mcp"
]
}
}
}Add to `~/.codeium/windsurf/mcp_config.json`.
{
"mcpServers": {
"forage-mcp": {
"command": "npx",
"args": [
"-y",
"forage-mcp"
]
}
}
}Add to `cline_mcp_settings.json` via the MCP Servers panel.
{
"mcpServers": {
"forage-mcp": {
"command": "npx",
"args": [
"-y",
"forage-mcp"
]
}
}
}Add to `~/.gemini/settings.json`.
{
"mcpServers": {
"forage-mcp": {
"type": "local",
"command": "npx",
"args": [
"-y",
"forage-mcp"
],
"tools": [
"*"
]
}
}
}Add to `~/.copilot/mcp-config.json`, or run `/mcp add` inside the CLI.
{
"context_servers": {
"forage-mcp": {
"command": {
"path": "npx",
"args": [
"-y",
"forage-mcp"
]
}
}
}
}Add to your Zed `settings.json`.
npx -y forage-mcpRun `goose configure`, choose **Add Extension β Command-line Extension**, and paste this command.
6 herramientas
forage expone 6 herramientas a un agente conectado.
- forage_search
- Search for MCP servers across the [Official MCP Registry](https://registry.modelcontextprotocol.io), [Smithery](https://smithery.ai), and [npm](https://www.npmjs.com)
- 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
PuntuaciΓ³n
65 / 100
Buena
- DocumentaciΓ³n25/25
- Mantenimiento9/25
- Confianza13/20
- Capacidad6/15
- InstalaciΓ³n12/15
- Documents what it does and how to connect
- Has a resolvable package or endpoint
- Exposes at least one tool, prompt or resource
- README has substantive content
- Includes a code example
- Documents its configuration
- Mentions credentials or security posture
- Last commit 191 days ago
- Has a release history
- Repository is not archived
- Licensed MIT
- Namespace verified in the official MCP registry
- Claimed by its owner
- Published under an organisation
- 6 tool(s) documented
- Provides prompt templates
- Provides resources
- 12 documented install method(s)
- Published to a package registry
- Offers a hosted endpoint β no local install
Historial de versiones
| Versiones | Publicada |
|---|---|
| 0.1.1Γltima | 17 feb 2026 |