deep-research-mcp
v1.0.0
Published
B2B web research agent — give it a company and a question, get a specific answer. MCP tool for Claude Code.
Readme
deep-research
Give it a company and a question. Get a specific answer.
Costs ~$0.0003–$0.0005 per run. No browser automation — plain HTTP fetch only.
Use in Claude Code (agents dialog)
One command — no cloning, no setup:
claude mcp add deep-research -e OPENROUTER_API_KEY=sk-or-... -- npx deep-research-mcpGet an OpenRouter key at openrouter.ai (free to sign up, ~$0.0003/run).
For multi-domain search, add your Serper key too:
claude mcp add deep-research -e OPENROUTER_API_KEY=sk-or-... -e SERPER_API_KEY=... -- npx deep-research-mcpThen in any Claude Code session just ask naturally:
"Research what equipment hatchstamping.com operates"
Claude calls the research tool automatically and returns the answer.
Use in Clay
- Deploy to Railway (see below) — takes 3 minutes
- In Clay, add an HTTP API enrichment column
POST https://your-app.railway.app/research- Body:
{ "query": "what does {{domain}} sell?", "mode": "single" } - Map
answerandprospectFit.scoreto columns
Deploy to Railway
- Fork this repo on GitHub
- Go to railway.app → New Project → Deploy from GitHub repo → select your fork
- Add env vars:
OPENROUTER_API_KEY(required),SERPER_API_KEY(optional) - Deploy — Railway auto-detects Node and runs
npm start, gives you a public URL
Quick start
git clone https://github.com/yourusername/deep-research
cd deep-research
npm install
cp .env.example .env
# add your OPENROUTER_API_KEY to .env
npm startcurl -X POST http://localhost:3000/research \
-H "Content-Type: application/json" \
-d '{"query": "what equipment does hatchstamping.com operate at their facilities?"}'{
"answer": "Hatch Stamping operates stamping presses, robotic welding cells, progressive die tooling, 3D printing, laser scanning, and CMMs across their facilities.",
"prospectFit": {
"score": "high",
"reason": "Manufacturer that designs and maintains its own heavy equipment."
},
"sources": ["https://hatchstamping.com", "https://hatchstamping.com/capabilities"],
"costUSD": 0.000398,
"model": "google/gemini-2.0-flash-lite-001",
"mode": "single"
}Two modes
Single search (default)
Crawls the company's own website using a ReAct loop. Include a domain in your query — no startUrl needed.
{
"query": "what equipment does hatchstamping.com operate?",
"mode": "single"
}Multi search
Searches across the web via Serper.dev. Better for companies with thin websites or when you need LinkedIn/news/third-party coverage. Requires SERPER_API_KEY.
{
"query": "what equipment does Hatch Stamping operate?",
"mode": "multi"
}API
POST /research
| Field | Type | Required | Description |
|-------|------|----------|-------------|
| query | string | yes | Your research question. Include the company domain for single mode. |
| mode | string | no | single (default) or multi |
| model | string | no | OpenRouter model ID (default: google/gemini-2.0-flash-lite-001) |
| startUrl | string | no | Override the URL for single mode instead of extracting from query |
Response
| Field | Description |
|-------|-------------|
| answer | Specific answer with names, numbers, dates |
| prospectFit.score | high / medium / low / wrong_target |
| prospectFit.reason | One sentence about the company |
| prospectFit.angle | Best approach if fit is not high |
| sources | Pages visited (single) or search results fetched (multi) |
| steps | Each navigation step with findings and specificity rating (single only) |
| costUSD | LLM cost only. Add $0.001 per run for Serper if using multi. |
| mode | single or multi |
Environment variables
| Variable | Required | Description |
|----------|----------|-------------|
| OPENROUTER_API_KEY | yes | Get one at openrouter.ai |
| SERPER_API_KEY | only for multi | Get one at serper.dev |
Models
Any model on OpenRouter. Recommended:
| Model | Cost/run | Notes |
|-------|----------|-------|
| google/gemini-2.0-flash-lite-001 | ~$0.0003 | Default. Best cost/quality. |
| google/gemini-2.5-flash-lite | ~$0.0004 | Slightly better reasoning |
| qwen/qwen3-4b:free | $0 | Free but rate limited |
How it works
Single mode — ReAct loop:
- Fetches homepage, extracts internal nav links
- Step 0 builds company context (industry, type, vocabulary)
- Each step: reads current page → rates specificity → picks next path or declares done
- Information density filtering removes marketing fluff before the LLM sees anything
- Two-stage synthesis: compress findings → generate final answer + fit score
Multi mode — Web search:
- Fires one Serper search with your query
- Fetches top 3 result pages
- Runs the same density filter + synthesis
See docs/cost-reduction.md for how cost dropped from $0.11 → $0.0003.
Limitations
- JS-rendered sites — SPAs that return no nav links will get weak answers in single mode. Use multi mode for these.
- Single mode is domain-scoped — only crawls the company's own website.
- Public pages only — no login support.
License
Apache 2.0
