apmantza-greedysearch-pi

内容来源:README.md(说明文档) · 原始地址 · 查看安装指南

原始内容

GreedySearch for Pi

GreedySearch for Pi

GreedySearch registers the greedy_search tool for Pi: headless-first, no-API-key AI/web search through a dedicated Chrome profile.

What It Does

  • Multi-engine search across Perplexity, Google AI, ChatGPT, and Gemini
  • Source-grounded engine: "all" results with fetched source content
  • Optional synthesis over engine answers and fetched sources
  • Iterative depth: "research" runs with citation audit and research bundles
  • Visible Chrome fallback for login/captcha/cookie setup when needed

Install

pi install npm:@apmantza/greedysearch-pi

Or from git:

pi install git:github.com/apmantza/GreedySearch-pi

Quick Usage

greedy_search({ query: "React 19 changes" });
greedy_search({ query: "React 19 changes", synthesize: true });
greedy_search({ query: "Prisma vs Drizzle", engine: "perplexity" });
greedy_search({
  query: "Evaluate browser automation options for AI agents",
  depth: "research",
  breadth: 3,
  iterations: 2,
  maxSources: 8,
});

Headless is the default. Use visible: true only when you need to establish a session, solve a challenge, or inspect the browser:

greedy_search({ query: "Visible setup", engine: "perplexity", visible: true });

MCP server

GreedySearch also ships a dependency-free MCP stdio server (bin/mcp.mjs) so Claude Code — or any MCP client — can call it directly, outside of Pi. It exposes two tools:

  • greedy_search — same parameters as the Pi greedy_search tool (query, engine, synthesize, synthesizer, depth, breadth, iterations, maxSources, researchOutDir, writeResearchBundle, fullAnswer, locale, visible). Spawns bin/search.mjs under the hood; searches take roughly 1-5 minutes.
  • greedy_fetch — fetch a single URL and return its extracted title/byline/content (url, maxChars).

Register with Claude Code

This repo includes a project-scope .mcp.json at the repo root, so running Claude Code from inside a checkout picks up the greedysearch server automatically (you'll be prompted to approve project-scoped servers on first use).

To register it manually (e.g. from outside the repo, or in user scope):

claude mcp add greedysearch -- node /absolute/path/to/greedysearch-pi/bin/mcp.mjs

Or run the server directly for testing:

npm run mcp

Sample tools/call

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "greedy_search",
    "arguments": { "query": "React 19 changes", "engine": "perplexity" }
  }
}

Documentation

Requirements

  • Chrome or Chromium
  • Node.js 20.11.0+

Contributing

See CONTRIBUTING.md and AGENTS.md for the extractor, recovery, and release checklists.

GreedySearch is released under the MIT License.

Contributors

Thanks goes to these wonderful people:


wastedC

💻 🤔 🚧 👀

Apostolos Mantzaris

💻 📖 🤔 🚧 👀

Dependabot

🚧

peyloride

🐛

hypnoglow

🐛

If you land a pull request or report an issue that gets fixed, we'll add you here.