@fouradata/mcp 0.3.3 → 0.4.0
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.
- package/README.md +21 -6
- package/dist/http.js +13 -1
- package/dist/http.js.map +1 -1
- package/dist/landing.d.ts +2 -0
- package/dist/landing.js +36 -0
- package/dist/landing.js.map +1 -0
- package/dist/server.js +1 -1
- package/dist/tools/auto.js +1 -1
- package/dist/tools/browser.js +1 -1
- package/dist/tools/proxy.js +1 -1
- package/dist/tools/single.js +1 -1
- package/package.json +8 -3
package/README.md
CHANGED
|
@@ -1,14 +1,27 @@
|
|
|
1
|
+
<!-- mcp-name: ai.foura/mcp -->
|
|
1
2
|
# @fouradata/mcp
|
|
2
3
|
|
|
4
|
+
[](https://www.npmjs.com/package/@fouradata/mcp)
|
|
5
|
+
[](https://www.npmjs.com/package/@fouradata/mcp)
|
|
6
|
+
[](https://www.npmjs.com/package/@fouradata/mcp)
|
|
7
|
+
[](./LICENSE)
|
|
8
|
+
|
|
3
9
|
[FourA Web Scraping API](https://foura.ai/) as four [Model Context Protocol](https://modelcontextprotocol.io) tools plus six built-in workflow prompts. Plug it into Claude Desktop, Claude Code, Cursor, Windsurf, or any other MCP client and fetch arbitrary public web pages, bypass anti-bot challenges, and render JavaScript-heavy sites - without writing a line of integration code.
|
|
4
10
|
|
|
5
|
-
Four tools, six prompts, one API key.
|
|
11
|
+
Four tools, six prompts, one API key. One smart `foura_auto` tool picks the fetch method for you (direct, proxy, or full browser); drop to the primitives when you want explicit control. Published to npm with build [provenance](https://docs.npmjs.com/generating-provenance-statements) - the tarball is cryptographically traceable to this repo and CI run.
|
|
12
|
+
|
|
13
|
+
**One-click install:**
|
|
14
|
+
|
|
15
|
+
[](cursor://anysphere.cursor-deeplink/mcp/install?name=foura&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBmb3VyYWRhdGEvbWNwIl0sImVudiI6eyJGT1VSQV9BUElfS0VZIjoiWU9VUl9GT1VSQV9BUElfS0VZIn19)
|
|
16
|
+
[](https://insiders.vscode.dev/redirect?url=vscode%3Amcp%2Finstall%3F%257B%2522name%2522%253A%2522foura%2522%252C%2522command%2522%253A%2522npx%2522%252C%2522args%2522%253A%255B%2522-y%2522%252C%2522%2540fouradata%252Fmcp%2522%255D%252C%2522env%2522%253A%257B%2522FOURA_API_KEY%2522%253A%2522YOUR_FOURA_API_KEY%2522%257D%257D)
|
|
17
|
+
|
|
18
|
+
Both buttons pre-fill the config with a `YOUR_FOURA_API_KEY` placeholder - replace it with your key. Or by hand: `claude mcp add foura -- npx -y @fouradata/mcp` (set `FOURA_API_KEY` in env first). Full per-client setup below.
|
|
6
19
|
|
|
7
|
-
[GitHub](https://github.com/fouradata/mcp) - [npm](https://www.npmjs.com/package/@fouradata/mcp) - [Docs](https://foura.ai/docs/mcp/server)
|
|
20
|
+
[FourA](https://foura.ai) - [MCP page](https://foura.ai/mcp) - [GitHub](https://github.com/fouradata/mcp) - [npm](https://www.npmjs.com/package/@fouradata/mcp) - [Docs](https://foura.ai/docs/mcp/server) - [Hosted endpoint](https://mcp.foura.ai/mcp)
|
|
8
21
|
|
|
9
22
|
## Quick Start - local stdio (recommended for Claude Desktop)
|
|
10
23
|
|
|
11
|
-
Grab a key at [foura.ai/dashboard
|
|
24
|
+
Grab a key at [foura.ai/dashboard/#api-keys](https://foura.ai/dashboard/#api-keys) (one click, shown once on creation, format `pk_live_...`). Then drop this into your MCP client's config:
|
|
12
25
|
|
|
13
26
|
```json
|
|
14
27
|
{
|
|
@@ -164,7 +177,7 @@ Full recipe text + manual fallback prompts: [foura.ai/docs/mcp/recipes](https://
|
|
|
164
177
|
|
|
165
178
|
Your `Bearer` token (or the `FOURA_API_KEY` env var in stdio mode) forwards to the FourA API as `X-API-Key`. One key, all four tools.
|
|
166
179
|
|
|
167
|
-
Keys are managed in the [dashboard](https://foura.ai/dashboard
|
|
180
|
+
Keys are managed in the [dashboard](https://foura.ai/dashboard/#api-keys) - shown once on creation, rotate or deactivate any time. See [foura.ai/docs/getting-started/authentication](https://foura.ai/docs/getting-started/authentication) for the full key-management walkthrough.
|
|
168
181
|
|
|
169
182
|
## Error envelope - typed contract for agent retries
|
|
170
183
|
|
|
@@ -263,7 +276,7 @@ Configurable environment:
|
|
|
263
276
|
| `FOURA_API_BASE` | `https://api.foura.ai/api` | Upstream FourA REST base URL |
|
|
264
277
|
| `FOURA_MCP_PAYLOADS_DIR` | `/data/payloads` | Where ≥50 KB responses are cached on disk |
|
|
265
278
|
|
|
266
|
-
|
|
279
|
+
The full source is public here under MIT - build the container from the included [`Dockerfile`](./Dockerfile) (`docker build -t foura-mcp .`), or run it straight from npm with `npx -y @fouradata/mcp`. See [DEVELOPMENT.md](./DEVELOPMENT.md) for the local build and test workflow.
|
|
267
280
|
|
|
268
281
|
## License
|
|
269
282
|
|
|
@@ -271,6 +284,8 @@ MIT. See [`LICENSE`](./LICENSE).
|
|
|
271
284
|
|
|
272
285
|
## Links
|
|
273
286
|
|
|
287
|
+
- FourA (web scraping API): <https://foura.ai>
|
|
288
|
+
- MCP server page: <https://foura.ai/mcp>
|
|
274
289
|
- Source (GitHub): <https://github.com/fouradata/mcp>
|
|
275
290
|
- npm package: <https://www.npmjs.com/package/@fouradata/mcp>
|
|
276
291
|
- API documentation: <https://foura.ai/docs>
|
|
@@ -279,4 +294,4 @@ MIT. See [`LICENSE`](./LICENSE).
|
|
|
279
294
|
- MCP recipes: <https://foura.ai/docs/mcp/recipes>
|
|
280
295
|
- REST API errors: <https://foura.ai/docs/api/errors>
|
|
281
296
|
- MCP specification: <https://modelcontextprotocol.io>
|
|
282
|
-
- Get a key: <https://foura.ai/dashboard
|
|
297
|
+
- Get a key: <https://foura.ai/dashboard/#api-keys>
|
package/dist/http.js
CHANGED
|
@@ -3,8 +3,9 @@ import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/
|
|
|
3
3
|
import { SUPPORTED_PROTOCOL_VERSIONS } from "@modelcontextprotocol/sdk/types.js";
|
|
4
4
|
import { createServer } from "./server.js";
|
|
5
5
|
import { withApiKey } from "./auth.js";
|
|
6
|
+
import { LANDING_REDIRECT, LLMS_TXT } from "./landing.js";
|
|
6
7
|
const PORT = Number(process.env.PORT ?? 3076);
|
|
7
|
-
const SERVER_VERSION = "0.
|
|
8
|
+
const SERVER_VERSION = "0.4.0";
|
|
8
9
|
// Spec MUSTs covered in this file:
|
|
9
10
|
// Origin + Host validation (CVE-2025-66414 DNS rebinding)
|
|
10
11
|
// WWW-Authenticate on 401
|
|
@@ -110,6 +111,17 @@ function validateProtocolVersion(req, res, next) {
|
|
|
110
111
|
app.get("/healthz", (_req, res) => {
|
|
111
112
|
res.json({ ok: true, name: "foura-mcp", version: SERVER_VERSION });
|
|
112
113
|
});
|
|
114
|
+
// Public discovery surfaces (no auth, no Origin/Host gate - like /healthz).
|
|
115
|
+
// The human landing lives at foura.ai/mcp, so a browser hitting the bare root
|
|
116
|
+
// is redirected there (301 = permanent, consolidates SEO onto the one page).
|
|
117
|
+
// llms.txt stays here: mcp.foura.ai is a separate host, so crawlers hitting
|
|
118
|
+
// mcp.foura.ai/llms.txt should find a map without following the redirect.
|
|
119
|
+
app.get("/", (_req, res) => {
|
|
120
|
+
res.redirect(301, LANDING_REDIRECT);
|
|
121
|
+
});
|
|
122
|
+
app.get("/llms.txt", (_req, res) => {
|
|
123
|
+
res.type("text/plain").send(LLMS_TXT);
|
|
124
|
+
});
|
|
113
125
|
function extractBearer(req) {
|
|
114
126
|
const auth = req.header("authorization");
|
|
115
127
|
if (auth?.toLowerCase().startsWith("bearer "))
|
package/dist/http.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.js","sourceRoot":"","sources":["../src/http.ts"],"names":[],"mappings":"AAAA,OAAO,OAA2D,MAAM,SAAS,CAAC;AAClF,OAAO,EAAE,6BAA6B,EAAE,MAAM,oDAAoD,CAAC;AACnG,OAAO,EAAE,2BAA2B,EAAE,MAAM,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,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;QACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;IACH,UAAU,CAAC,GAAG,EAAE;QACd,OAAO,CAAC,KAAK,CAAC,0DAA0D,CAAC,CAAC;QAC1E,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,EAAE,MAAM,CAAC,CAAC,KAAK,EAAE,CAAC;AACrB,CAAC;AACD,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC;AACjD,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const LANDING_REDIRECT = "https://foura.ai/mcp";
|
|
2
|
+
export declare const LLMS_TXT = "# FourA MCP server\n\n> The FourA web scraping API as a Model Context Protocol (MCP) server. One smart tool fetches any public web page - direct request, rotating proxy, or full browser - and gets past anti-bot challenges. Four tools, six prompts, one API key. Hosted at https://mcp.foura.ai/mcp (Streamable HTTP) and on npm as @fouradata/mcp (local stdio).\n\n## Connect\n- Hosted (Streamable HTTP): POST https://mcp.foura.ai/mcp with header \"Authorization: Bearer pk_live_...\"\n- Local (stdio): npx -y @fouradata/mcp with env FOURA_API_KEY\n- Get an API key: https://foura.ai/dashboard#api-keys\n- Landing + configurator: https://foura.ai/mcp\n\n## Tools\n- foura_auto: smart fetch, picks direct / proxy / browser for you (the default)\n- foura_single: one fast HTTP request (static pages, JSON APIs)\n- foura_proxy: rotating proxy pool with retry (bypass WAF challenges)\n- foura_browser: full browser session with JavaScript rendering\n\n## Prompts\nsmart_fetch, scrape_product_page, extract_article, monitor_pricing, check_endpoint_health, bulk_fetch_urls\n\n## Docs\n- MCP server reference: https://foura.ai/docs/mcp/server\n- Recipes: https://foura.ai/docs/mcp/recipes\n- Error codes: https://foura.ai/docs/mcp/errors\n- Source (GitHub, MIT): https://github.com/fouradata/mcp\n- npm package: https://www.npmjs.com/package/@fouradata/mcp\n";
|
package/dist/landing.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// Discovery surfaces for the hosted server (mcp.foura.ai).
|
|
2
|
+
//
|
|
3
|
+
// The human-facing landing lives on the main site at https://foura.ai/mcp
|
|
4
|
+
// (a real page with the site chrome, theme, and i18n). This host is the MCP
|
|
5
|
+
// endpoint; a browser hitting the bare root is redirected there (the reverse
|
|
6
|
+
// proxy also does this at the edge). We keep the machine-readable llms.txt here
|
|
7
|
+
// because mcp.foura.ai is a separate host and crawlers hitting
|
|
8
|
+
// mcp.foura.ai/llms.txt should find a map without following the redirect.
|
|
9
|
+
export const LANDING_REDIRECT = "https://foura.ai/mcp";
|
|
10
|
+
export const LLMS_TXT = `# FourA MCP server
|
|
11
|
+
|
|
12
|
+
> The FourA web scraping API as a Model Context Protocol (MCP) server. One smart tool fetches any public web page - direct request, rotating proxy, or full browser - and gets past anti-bot challenges. Four tools, six prompts, one API key. Hosted at https://mcp.foura.ai/mcp (Streamable HTTP) and on npm as @fouradata/mcp (local stdio).
|
|
13
|
+
|
|
14
|
+
## Connect
|
|
15
|
+
- Hosted (Streamable HTTP): POST https://mcp.foura.ai/mcp with header "Authorization: Bearer pk_live_..."
|
|
16
|
+
- Local (stdio): npx -y @fouradata/mcp with env FOURA_API_KEY
|
|
17
|
+
- Get an API key: https://foura.ai/dashboard#api-keys
|
|
18
|
+
- Landing + configurator: https://foura.ai/mcp
|
|
19
|
+
|
|
20
|
+
## Tools
|
|
21
|
+
- foura_auto: smart fetch, picks direct / proxy / browser for you (the default)
|
|
22
|
+
- foura_single: one fast HTTP request (static pages, JSON APIs)
|
|
23
|
+
- foura_proxy: rotating proxy pool with retry (bypass WAF challenges)
|
|
24
|
+
- foura_browser: full browser session with JavaScript rendering
|
|
25
|
+
|
|
26
|
+
## Prompts
|
|
27
|
+
smart_fetch, scrape_product_page, extract_article, monitor_pricing, check_endpoint_health, bulk_fetch_urls
|
|
28
|
+
|
|
29
|
+
## Docs
|
|
30
|
+
- MCP server reference: https://foura.ai/docs/mcp/server
|
|
31
|
+
- Recipes: https://foura.ai/docs/mcp/recipes
|
|
32
|
+
- Error codes: https://foura.ai/docs/mcp/errors
|
|
33
|
+
- Source (GitHub, MIT): https://github.com/fouradata/mcp
|
|
34
|
+
- npm package: https://www.npmjs.com/package/@fouradata/mcp
|
|
35
|
+
`;
|
|
36
|
+
//# sourceMappingURL=landing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"landing.js","sourceRoot":"","sources":["../src/landing.ts"],"names":[],"mappings":"AAAA,2DAA2D;AAC3D,EAAE;AACF,0EAA0E;AAC1E,4EAA4E;AAC5E,6EAA6E;AAC7E,gFAAgF;AAChF,+DAA+D;AAC/D,0EAA0E;AAE1E,MAAM,CAAC,MAAM,gBAAgB,GAAG,sBAAsB,CAAC;AAEvD,MAAM,CAAC,MAAM,QAAQ,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;CAyBvB,CAAC"}
|
package/dist/server.js
CHANGED
package/dist/tools/auto.js
CHANGED
|
@@ -296,7 +296,7 @@ export function registerAutoTool(server) {
|
|
|
296
296
|
headers: {
|
|
297
297
|
"X-API-Key": getApiKey(),
|
|
298
298
|
"Content-Type": "application/json",
|
|
299
|
-
"User-Agent": "foura-mcp/0.
|
|
299
|
+
"User-Agent": "foura-mcp/0.4.0 (auto)",
|
|
300
300
|
},
|
|
301
301
|
body: JSON.stringify(upstreamBody),
|
|
302
302
|
headersTimeout: 200_000,
|
package/dist/tools/browser.js
CHANGED
|
@@ -216,7 +216,7 @@ export function registerBrowserTool(server) {
|
|
|
216
216
|
headers: {
|
|
217
217
|
"X-API-Key": getApiKey(),
|
|
218
218
|
"Content-Type": "application/json",
|
|
219
|
-
"User-Agent": "foura-mcp/0.
|
|
219
|
+
"User-Agent": "foura-mcp/0.4.0 (browser)",
|
|
220
220
|
},
|
|
221
221
|
body: JSON.stringify(upstreamBody),
|
|
222
222
|
});
|
package/dist/tools/proxy.js
CHANGED
|
@@ -271,7 +271,7 @@ export function registerProxyTool(server) {
|
|
|
271
271
|
headers: {
|
|
272
272
|
"X-API-Key": getApiKey(),
|
|
273
273
|
"Content-Type": "application/json",
|
|
274
|
-
"User-Agent": "foura-mcp/0.
|
|
274
|
+
"User-Agent": "foura-mcp/0.4.0 (proxy)",
|
|
275
275
|
},
|
|
276
276
|
body: JSON.stringify(upstreamBody),
|
|
277
277
|
});
|
package/dist/tools/single.js
CHANGED
|
@@ -267,7 +267,7 @@ export function registerSingleTool(server) {
|
|
|
267
267
|
headers: {
|
|
268
268
|
"X-API-Key": getApiKey(),
|
|
269
269
|
"Content-Type": "application/json",
|
|
270
|
-
"User-Agent": "foura-mcp/0.
|
|
270
|
+
"User-Agent": "foura-mcp/0.4.0 (single)",
|
|
271
271
|
},
|
|
272
272
|
body: JSON.stringify(upstreamBody),
|
|
273
273
|
});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fouradata/mcp",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "MCP server for the FourA web scraping API
|
|
3
|
+
"version": "0.4.0",
|
|
4
|
+
"description": "MCP server for the FourA web scraping API - four tools (smart auto-fetch, HTTP request, rotating proxies, full browser) plus six prompts, usable from any MCP client.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/server.js",
|
|
7
7
|
"bin": {
|
|
@@ -50,7 +50,12 @@
|
|
|
50
50
|
},
|
|
51
51
|
"keywords": [
|
|
52
52
|
"mcp",
|
|
53
|
+
"mcp-server",
|
|
53
54
|
"model-context-protocol",
|
|
55
|
+
"claude",
|
|
56
|
+
"cursor",
|
|
57
|
+
"ai-agents",
|
|
58
|
+
"llm-tools",
|
|
54
59
|
"foura",
|
|
55
60
|
"web-scraping",
|
|
56
61
|
"scraping-api",
|
|
@@ -63,7 +68,7 @@
|
|
|
63
68
|
"type": "git",
|
|
64
69
|
"url": "git+https://github.com/fouradata/mcp.git"
|
|
65
70
|
},
|
|
66
|
-
"homepage": "https://foura.ai/
|
|
71
|
+
"homepage": "https://foura.ai/mcp",
|
|
67
72
|
"bugs": {
|
|
68
73
|
"url": "https://github.com/fouradata/mcp/issues"
|
|
69
74
|
}
|