Gemini CLI Integration
Give Gemini CLI live web access with CrawlForge MCP. One gemini mcp add command registers the server in ~/.gemini/settings.json, or add the mcpServers block yourself.
Prerequisites
npx, so nothing needs a global install—only a key.Sign in from the terminal: the CLI opens a browser page where you approve a new key, then saves it to ~/.crawlforge/config.json.
npm install -g crawlforge-mcp-server
crawlforge login # opens the browser approval pageOr copy a key from the dashboard and paste it into the config in the next step.
crawlforge login and the other ways to authenticate.AOption A: One command, user scope
Run this once and CrawlForge is available in every project:
gemini mcp add -s user -e CRAWLFORGE_API_KEY=cf_live_your_api_key_here crawlforge npx -- -y crawlforge-mcp-server@latest mcp-s user writes to ~/.gemini/settings.json; -s project writes to .gemini/settings.json in the current repo instead.
BOption B: Edit settings.json
Add an mcpServers block to ~/.gemini/settings.json (or .gemini/settings.json in a project):
{
"mcpServers": {
"crawlforge": {
"command": "npx",
"args": [
"-y",
"crawlforge-mcp-server@latest",
"mcp"
],
"env": {
"CRAWLFORGE_API_KEY": "cf_live_your_api_key_here"
}
}
}
}.gemini/settings.json can be committed so the whole team gets the server; if you do, leave the key out and let each developer add their own.cf_live_your_api_key_here with your key, or let the configurator fill it in.Limit the tool list (optional)
CrawlForge ships 31 tools. Set CRAWLFORGE_TOOL_GROUPS in the same env block to load only the groups you need, for example basic,search:
"env": {
"CRAWLFORGE_API_KEY": "cf_live_your_api_key_here",
"CRAWLFORGE_TOOL_GROUPS": "basic,search"
}Groups: basic, search, crawl, extract, batch, research, tracking, llmstxt, stealth, templates, scrape, agent.
gemini mcp list- Check the status —
gemini mcp listshows configured servers;/mcpinside a session lists them with their tools - Restart if needed — start a new
geminisession after editing settings - Test a prompt — try one of the examples below; Gemini picks the CrawlForge tool itself
Example Prompts
"Search for the latest AI news"
"Extract all links from example.com"
"Crawl the documentation site and summarize it"
"Extract product prices from this e-commerce site"
See the full API reference for all 31 tools and their parameters.
Troubleshooting
Server missing from `/mcp`?
- Check
~/.gemini/settings.jsonis valid JSON - Ensure Node.js 18+ is installed:
node --version - Run
gemini mcp listto see which scope the server was written to - Start a new Gemini CLI session
Authentication Errors?
- Check the API key starts with
cf_live_ - Run
crawlforge loginto save a fresh key - Generate a new API key from the dashboard
Tools not being called?
- Run
/mcpand confirm the crawlforge tools are listed - Ask for a concrete outcome ("scrape this page") so the model picks a tool
- Trim the tool list with
CRAWLFORGE_TOOL_GROUPSif the model has too many tools to choose from
gemini mcp list.