@finedata/mcp-server 0.1.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 +98 -0
- package/index.js +89 -0
- package/package.json +44 -0
package/README.md
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# @finedata/mcp-server
|
|
2
|
+
|
|
3
|
+
MCP Server for [FineData](https://finedata.ai) web scraping API.
|
|
4
|
+
|
|
5
|
+
This is a Node.js wrapper that launches the Python MCP server.
|
|
6
|
+
|
|
7
|
+
## Quick Start
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
# Set your API key and run
|
|
11
|
+
FINEDATA_API_KEY=fd_xxx npx @finedata/mcp-server
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Configuration
|
|
15
|
+
|
|
16
|
+
### Claude Desktop
|
|
17
|
+
|
|
18
|
+
Add to `claude_desktop_config.json`:
|
|
19
|
+
|
|
20
|
+
```json
|
|
21
|
+
{
|
|
22
|
+
"mcpServers": {
|
|
23
|
+
"finedata": {
|
|
24
|
+
"command": "npx",
|
|
25
|
+
"args": ["-y", "@finedata/mcp-server"],
|
|
26
|
+
"env": {
|
|
27
|
+
"FINEDATA_API_KEY": "fd_your_api_key"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Cursor IDE
|
|
35
|
+
|
|
36
|
+
Add to MCP settings:
|
|
37
|
+
|
|
38
|
+
```json
|
|
39
|
+
{
|
|
40
|
+
"mcpServers": {
|
|
41
|
+
"finedata": {
|
|
42
|
+
"command": "npx",
|
|
43
|
+
"args": ["-y", "@finedata/mcp-server"],
|
|
44
|
+
"env": {
|
|
45
|
+
"FINEDATA_API_KEY": "fd_your_api_key"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Requirements
|
|
53
|
+
|
|
54
|
+
- Node.js 18+
|
|
55
|
+
- Python 3.10+ OR [uv](https://github.com/astral-sh/uv) (recommended)
|
|
56
|
+
|
|
57
|
+
## Recommended: Using uvx
|
|
58
|
+
|
|
59
|
+
For better performance, install [uv](https://github.com/astral-sh/uv) and use uvx directly:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Then configure:
|
|
66
|
+
|
|
67
|
+
```json
|
|
68
|
+
{
|
|
69
|
+
"mcpServers": {
|
|
70
|
+
"finedata": {
|
|
71
|
+
"command": "uvx",
|
|
72
|
+
"args": ["finedata-mcp"],
|
|
73
|
+
"env": {
|
|
74
|
+
"FINEDATA_API_KEY": "fd_your_api_key"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Features
|
|
82
|
+
|
|
83
|
+
- **Antibot Bypass** - Cloudflare, DataDome, PerimeterX
|
|
84
|
+
- **JavaScript Rendering** - Playwright for SPAs
|
|
85
|
+
- **Captcha Solving** - reCAPTCHA, hCaptcha, Turnstile
|
|
86
|
+
- **Proxy Rotation** - 87K+ datacenter + residential
|
|
87
|
+
|
|
88
|
+
## Get Your API Key
|
|
89
|
+
|
|
90
|
+
Sign up at [finedata.ai](https://finedata.ai) to get your API key and free trial tokens.
|
|
91
|
+
|
|
92
|
+
## Documentation
|
|
93
|
+
|
|
94
|
+
See the full documentation at https://docs.finedata.ai
|
|
95
|
+
|
|
96
|
+
## Issues
|
|
97
|
+
|
|
98
|
+
https://github.com/quality-network/finedata-mcp/issues
|
package/index.js
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* FineData MCP Server Launcher
|
|
5
|
+
*
|
|
6
|
+
* This script launches the Python MCP server using uvx (uv tool).
|
|
7
|
+
* uvx automatically handles Python environment and dependencies.
|
|
8
|
+
*
|
|
9
|
+
* Usage:
|
|
10
|
+
* npx @finedata/mcp-server
|
|
11
|
+
*
|
|
12
|
+
* Environment variables:
|
|
13
|
+
* FINEDATA_API_KEY - Your FineData API key (required)
|
|
14
|
+
* FINEDATA_API_URL - API URL (default: https://api.finedata.ai)
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
const { spawn } = require('child_process');
|
|
18
|
+
const path = require('path');
|
|
19
|
+
|
|
20
|
+
// Check if API key is set
|
|
21
|
+
if (!process.env.FINEDATA_API_KEY) {
|
|
22
|
+
console.error('Error: FINEDATA_API_KEY environment variable is required.');
|
|
23
|
+
console.error('Get your API key at https://finedata.ai');
|
|
24
|
+
process.exit(1);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// Try uvx first (recommended), fallback to python -m
|
|
28
|
+
function tryUvx() {
|
|
29
|
+
const uvx = spawn('uvx', ['finedata-mcp'], {
|
|
30
|
+
stdio: 'inherit',
|
|
31
|
+
env: process.env,
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
uvx.on('error', (err) => {
|
|
35
|
+
if (err.code === 'ENOENT') {
|
|
36
|
+
// uvx not found, try python
|
|
37
|
+
tryPython();
|
|
38
|
+
} else {
|
|
39
|
+
console.error('Error starting server:', err.message);
|
|
40
|
+
process.exit(1);
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
uvx.on('exit', (code) => {
|
|
45
|
+
process.exit(code || 0);
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function tryPython() {
|
|
50
|
+
// Try python3 first, then python
|
|
51
|
+
const pythonCommands = ['python3', 'python'];
|
|
52
|
+
|
|
53
|
+
function tryNextPython(index) {
|
|
54
|
+
if (index >= pythonCommands.length) {
|
|
55
|
+
console.error('Error: Python not found. Please install Python 3.10+ or uv.');
|
|
56
|
+
console.error('Install uv: curl -LsSf https://astral.sh/uv/install.sh | sh');
|
|
57
|
+
process.exit(1);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const cmd = pythonCommands[index];
|
|
61
|
+
const python = spawn(cmd, ['-m', 'finedata_mcp'], {
|
|
62
|
+
stdio: 'inherit',
|
|
63
|
+
env: process.env,
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
python.on('error', (err) => {
|
|
67
|
+
if (err.code === 'ENOENT') {
|
|
68
|
+
tryNextPython(index + 1);
|
|
69
|
+
} else {
|
|
70
|
+
console.error('Error starting server:', err.message);
|
|
71
|
+
process.exit(1);
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
python.on('exit', (code) => {
|
|
76
|
+
if (code === null) {
|
|
77
|
+
// Process was killed, try next
|
|
78
|
+
tryNextPython(index + 1);
|
|
79
|
+
} else {
|
|
80
|
+
process.exit(code);
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
tryNextPython(0);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// Start with uvx
|
|
89
|
+
tryUvx();
|
package/package.json
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@finedata/mcp-server",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "MCP Server for FineData web scraping API - enables AI agents to scrape any website with antibot bypass",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"mcp",
|
|
7
|
+
"model-context-protocol",
|
|
8
|
+
"finedata",
|
|
9
|
+
"web-scraping",
|
|
10
|
+
"ai-agents",
|
|
11
|
+
"claude",
|
|
12
|
+
"cursor",
|
|
13
|
+
"antibot",
|
|
14
|
+
"captcha-solving"
|
|
15
|
+
],
|
|
16
|
+
"author": "FineData <support@finedata.ai>",
|
|
17
|
+
"license": "MIT",
|
|
18
|
+
"homepage": "https://finedata.ai",
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "git+https://github.com/quality-network/finedata-mcp.git"
|
|
22
|
+
},
|
|
23
|
+
"bugs": {
|
|
24
|
+
"url": "https://github.com/quality-network/finedata-mcp/issues"
|
|
25
|
+
},
|
|
26
|
+
"bin": {
|
|
27
|
+
"finedata-mcp": "./index.js"
|
|
28
|
+
},
|
|
29
|
+
"main": "index.js",
|
|
30
|
+
"files": [
|
|
31
|
+
"index.js",
|
|
32
|
+
"README.md"
|
|
33
|
+
],
|
|
34
|
+
"engines": {
|
|
35
|
+
"node": ">=18.0.0"
|
|
36
|
+
},
|
|
37
|
+
"scripts": {
|
|
38
|
+
"start": "node index.js"
|
|
39
|
+
},
|
|
40
|
+
"dependencies": {},
|
|
41
|
+
"publishConfig": {
|
|
42
|
+
"access": "public"
|
|
43
|
+
}
|
|
44
|
+
}
|