mcp-researchpowerpack 7.0.15 → 7.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/README.md +26 -14
  2. package/dist/index.js +901 -364
  3. package/dist/index.js.map +4 -4
  4. package/dist/mcp-use.json +2 -2
  5. package/dist/src/clients/jina.js +156 -17
  6. package/dist/src/clients/jina.js.map +4 -4
  7. package/dist/src/clients/kernel.js +95 -48
  8. package/dist/src/clients/kernel.js.map +4 -4
  9. package/dist/src/clients/reddit.js +71 -31
  10. package/dist/src/clients/reddit.js.map +4 -4
  11. package/dist/src/clients/scraper.js +62 -27
  12. package/dist/src/clients/scraper.js.map +4 -4
  13. package/dist/src/clients/search.js +77 -39
  14. package/dist/src/clients/search.js.map +4 -4
  15. package/dist/src/config/index.js +33 -27
  16. package/dist/src/config/index.js.map +2 -2
  17. package/dist/src/effect/errors.js +12 -1
  18. package/dist/src/effect/errors.js.map +2 -2
  19. package/dist/src/effect/runtime.js +533 -173
  20. package/dist/src/effect/runtime.js.map +4 -4
  21. package/dist/src/effect/services.js +554 -185
  22. package/dist/src/effect/services.js.map +4 -4
  23. package/dist/src/schemas/scrape-links.js +1 -2
  24. package/dist/src/schemas/scrape-links.js.map +2 -2
  25. package/dist/src/schemas/web-search.js +1 -4
  26. package/dist/src/schemas/web-search.js.map +2 -2
  27. package/dist/src/services/llm-processor.js +309 -75
  28. package/dist/src/services/llm-processor.js.map +4 -4
  29. package/dist/src/tools/mcp-helpers.js +68 -4
  30. package/dist/src/tools/mcp-helpers.js.map +3 -3
  31. package/dist/src/tools/registry.js +2175 -1679
  32. package/dist/src/tools/registry.js.map +4 -4
  33. package/dist/src/tools/scrape.js +2047 -1550
  34. package/dist/src/tools/scrape.js.map +4 -4
  35. package/dist/src/tools/search.js +1979 -1605
  36. package/dist/src/tools/search.js.map +4 -4
  37. package/dist/src/tools/start-research.js +571 -204
  38. package/dist/src/tools/start-research.js.map +4 -4
  39. package/dist/src/tools/utils.js +35 -4
  40. package/dist/src/tools/utils.js.map +3 -3
  41. package/dist/src/utils/content-extractor.js +35 -4
  42. package/dist/src/utils/content-extractor.js.map +3 -3
  43. package/dist/src/utils/errors.js +35 -4
  44. package/dist/src/utils/errors.js.map +3 -3
  45. package/dist/src/utils/logger.js +35 -4
  46. package/dist/src/utils/logger.js.map +3 -3
  47. package/dist/src/utils/sanitize.js +25 -0
  48. package/dist/src/utils/sanitize.js.map +2 -2
  49. package/dist/src/utils/url-aggregator.js +20 -16
  50. package/dist/src/utils/url-aggregator.js.map +2 -2
  51. package/package.json +1 -1
package/README.md CHANGED
@@ -5,9 +5,11 @@
5
5
  http mcp server for research. five tools, orientation-first, built for agents
6
6
  that run multi-pass research loops.
7
7
 
8
- ships on [`mcp-use`](https://github.com/nicepkg/mcp-use). every external call
9
- flows through an effect ts service layer for typed concurrency, typed errors,
10
- and timeouts that actually mean something. no stdio http only.
8
+ ships on [`mcp-use`](https://github.com/nicepkg/mcp-use). tool-level provider
9
+ and llm orchestration flows through effect ts service layers for typed
10
+ concurrency, typed errors, scoped kernel cleanup, and step timeouts. provider
11
+ clients remain small promise/sdk adapters behind those layers. no stdio — http
12
+ only.
11
13
 
12
14
  ## tools
13
15
 
@@ -76,18 +78,20 @@ or skip the install entirely and hit the hosted deployment at
76
78
 
77
79
  ## config
78
80
 
79
- copy `.env.example`, set only what you need. missing keys don't crash the
80
- server they disable the affected capability with a clear error at call time.
81
+ copy `.env.example`, set only what you need. blank/whitespace keys are treated
82
+ as absent. missing keys don't crash the server they disable the affected
83
+ capability with a clear error at call time.
81
84
 
82
85
  ### server
83
86
 
84
87
  | var | default | |
85
88
  |-----|---------|---|
86
89
  | `PORT` | `3000` | http port |
87
- | `HOST` | `127.0.0.1` | bind address; cloud runtimes that set `PORT` auto-switch to `0.0.0.0` |
88
- | `ALLOWED_ORIGINS` | unset | comma-separated origins for host validation / cors |
89
- | `MCP_URL` | unset | fallback public mcp url used by the production origin-protection guard |
90
- | `NODE_ENV` | unset | set to `production` to enforce `ALLOWED_ORIGINS` or `MCP_URL` (server exits otherwise) |
90
+ | `HOST` | `127.0.0.1` | bind address; cloud runtimes that set `PORT` auto-switch to `0.0.0.0`. public binds require `ALLOWED_ORIGINS`, `MCP_URL`, or `CSP_URLS` |
91
+ | `ALLOWED_ORIGINS` | unset | comma-separated origins for host validation / cors; merged with `MCP_URL` and platform `CSP_URLS` when present |
92
+ | `MCP_URL` | unset | public mcp url; contributes its origin to host validation and well-known resource urls |
93
+ | `CSP_URLS` | unset | platform-provided comma-separated public origins; also contributes to host validation |
94
+ | `NODE_ENV` | unset | `production` also requires `ALLOWED_ORIGINS`, `MCP_URL`, or `CSP_URLS`, even on a local bind |
91
95
  | `DEBUG` | unset | `1` or `2` to bump mcp-use debug verbosity |
92
96
 
93
97
  ### providers
@@ -117,6 +121,7 @@ are required together. reasoning effort is hardcoded to `low`.
117
121
  ### concurrency
118
122
 
119
123
  all optional. provider limits are clamped 1–200; kernel is clamped 1–20.
124
+ malformed numeric values are rejected instead of partially parsed.
120
125
 
121
126
  | var | default | controls |
122
127
  |-----|---------|----------|
@@ -146,11 +151,16 @@ useful env vars:
146
151
  pnpm install
147
152
  pnpm dev # watch mode, serves :3000/mcp
148
153
  pnpm typecheck # tsc --noEmit
154
+ pnpm test:unit # deterministic unit tests
155
+ pnpm test:http # local http / mcp integration test
149
156
  pnpm test # unit + http integration tests
150
157
  pnpm build # compile to dist/
151
158
  pnpm inspect # mcp-use inspector
152
159
  ```
153
160
 
161
+ `prepublishOnly` runs `pnpm typecheck`, `pnpm test:unit`, `pnpm test:http`,
162
+ and `pnpm build`, matching the required publish gate.
163
+
154
164
  ## deploy
155
165
 
156
166
  deploy to manufact cloud via the `mcp-use` cli (github-backed):
@@ -166,6 +176,8 @@ or self-host anywhere with node 20.19+ / 22.12+:
166
176
 
167
177
  ```bash
168
178
  HOST=0.0.0.0 ALLOWED_ORIGINS=https://app.example.com pnpm start
179
+ # or derive production origin protection from the public mcp url:
180
+ NODE_ENV=production MCP_URL=https://research.example.com/mcp pnpm start
169
181
  ```
170
182
 
171
183
  ## architecture
@@ -175,8 +187,8 @@ index.ts server startup, cors, health, shutdown
175
187
  src/
176
188
  config/ env parsing, capability detection, lazy proxy config
177
189
  effect/ typed service tags + Live layers; runExternalEffect()
178
- is the single boundary tool handlers cross to talk
179
- to the outside world
190
+ only accepts fully-provided programs at the async
191
+ tool boundary
180
192
  clients/ provider api clients (serper, jina, kernel, reddit,
181
193
  scrapedo) — wrapped by Live layers in src/effect/
182
194
  tools/
@@ -204,9 +216,9 @@ key patterns: capability detection at startup, description-led tool routing
204
216
  raw/smart tool split, tiered classified output in `smart-web-search`, reddit
205
217
  api routing in scrape tools, jina reader first for non-reddit urls,
206
218
  scrape.do proxy-mode retry through `X-Proxy-Url`, optional kernel
207
- browser-render fallback, bounded concurrency via `Effect.forEach`, ctr-based
208
- url ranking, tools never throw (always return `toolFailure`), and structured
209
- errors with retry classification.
219
+ browser-render fallback with scoped session cleanup, bounded concurrency via
220
+ `Effect.forEach`, ctr-based url ranking, tools never throw (always return
221
+ `toolFailure`), and structured errors with retry classification.
210
222
 
211
223
  ## license
212
224