@1001proxy-mcp/server 1.0.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 +149 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +457 -0
- package/dist/index.js.map +1 -0
- package/package.json +45 -0
package/README.md
ADDED
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
# 1001Proxy MCP Server
|
|
2
|
+
|
|
3
|
+
An [MCP (Model Context Protocol)](https://modelcontextprotocol.io) server that lets AI agents (Claude, GPT-4o, etc.) purchase and manage proxies from [1001Proxy](https://1001proxy.com) directly within a conversation.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Setup
|
|
8
|
+
|
|
9
|
+
### 1. Get your API key
|
|
10
|
+
|
|
11
|
+
Log in to [1001proxy.com](https://1001proxy.com), go to **Account**, and copy your API key.
|
|
12
|
+
|
|
13
|
+
### 2. Install and build
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
cd mcp-server
|
|
17
|
+
npm install
|
|
18
|
+
npm run build
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### 3. Environment variables
|
|
22
|
+
|
|
23
|
+
| Variable | Required | Default | Description |
|
|
24
|
+
|-----------------|----------|--------------------------|------------------------------------|
|
|
25
|
+
| `PROXY_API_KEY` | Yes | — | Your 1001Proxy API key |
|
|
26
|
+
| `PROXY_API_URL` | No | `https://1001proxy.com` | Override for self-hosted instances |
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Usage with Claude Desktop
|
|
31
|
+
|
|
32
|
+
Add the following to your `claude_desktop_config.json` (usually at `~/Library/Application Support/Claude/claude_desktop_config.json` on macOS or `%APPDATA%\Claude\claude_desktop_config.json` on Windows):
|
|
33
|
+
|
|
34
|
+
```json
|
|
35
|
+
{
|
|
36
|
+
"mcpServers": {
|
|
37
|
+
"1001proxy": {
|
|
38
|
+
"command": "node",
|
|
39
|
+
"args": ["/absolute/path/to/1001proxy/mcp-server/dist/index.js"],
|
|
40
|
+
"env": {
|
|
41
|
+
"PROXY_API_KEY": "your-api-key-here"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Restart Claude Desktop after saving. You should see the 1001proxy tools available in the tool picker.
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Usage with other MCP clients
|
|
53
|
+
|
|
54
|
+
The server speaks the MCP stdio transport protocol — launch it as a subprocess with `PROXY_API_KEY` in its environment:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
PROXY_API_KEY=your-key node mcp-server/dist/index.js
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Any MCP-compatible client (Cursor, Zed, custom agents) can connect using stdio transport.
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Available tools
|
|
65
|
+
|
|
66
|
+
| Tool | Description |
|
|
67
|
+
|------------------------|-----------------------------------------------------------------------------|
|
|
68
|
+
| `get_account` | Check account info and current prepaid balance in USD |
|
|
69
|
+
| `list_proxy_types` | Browse available proxy types with pricing guidance |
|
|
70
|
+
| `get_reference_data` | Fetch countries, periods, tariffs, and operator IDs for a proxy type |
|
|
71
|
+
| `calculate_order` | Get a price quote for an order without placing it |
|
|
72
|
+
| `create_order` | Place an order and debit balance; supports idempotency keys |
|
|
73
|
+
| `list_orders` | List orders with optional pagination, status, and type filters |
|
|
74
|
+
| `get_order` | Get full details for a single order by ID |
|
|
75
|
+
| `get_proxies` | Retrieve structured proxy credentials (IP, port, login, password) |
|
|
76
|
+
| `download_proxies` | Download proxy list as plain text (txt or csv) |
|
|
77
|
+
| `extend_order` | Renew an existing order for an additional period |
|
|
78
|
+
| `get_transactions` | View balance transaction history (deposits, purchases, refunds) |
|
|
79
|
+
| `get_deposit_addresses`| Get crypto deposit addresses to top up balance |
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## Example workflow
|
|
84
|
+
|
|
85
|
+
Below is a typical end-to-end session an AI agent would follow:
|
|
86
|
+
|
|
87
|
+
### 1. Check balance
|
|
88
|
+
```
|
|
89
|
+
get_account
|
|
90
|
+
→ { balance: "25.00", email: "you@example.com", ... }
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### 2. Browse proxy types
|
|
94
|
+
```
|
|
95
|
+
list_proxy_types
|
|
96
|
+
→ [ { type: "ipv4", indicativePrice: "$0.30/IP", ... }, ... ]
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### 3. Get reference data for the chosen type
|
|
100
|
+
```
|
|
101
|
+
get_reference_data { type: "ipv4" }
|
|
102
|
+
→ { countries: [...], periods: [...], tarifs: [...] }
|
|
103
|
+
// Note countryId for US, periodId for 30 days
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### 4. Calculate price before committing
|
|
107
|
+
```
|
|
108
|
+
calculate_order { type: "ipv4", countryId: 5, periodId: 3, quantity: 5, protocol: "https" }
|
|
109
|
+
→ { price: 1.50, currency: "USD", quantity: 5 }
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### 5. Place the order
|
|
113
|
+
```
|
|
114
|
+
create_order {
|
|
115
|
+
type: "ipv4",
|
|
116
|
+
countryId: 5,
|
|
117
|
+
periodId: 3,
|
|
118
|
+
quantity: 5,
|
|
119
|
+
protocol: "https",
|
|
120
|
+
idempotency_key: "550e8400-e29b-41d4-a716-446655440000"
|
|
121
|
+
}
|
|
122
|
+
→ { ok: true, orderId: "clxyz...", charged: 1.50 }
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### 6. Download proxies
|
|
126
|
+
```
|
|
127
|
+
download_proxies { order_id: "clxyz..." }
|
|
128
|
+
→ "1.2.3.4:10000\n5.6.7.8:10001\n..."
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## Proxy types quick reference
|
|
134
|
+
|
|
135
|
+
| Type | Best for | Billed by |
|
|
136
|
+
|--------------|---------------------------------------------------|------------|
|
|
137
|
+
| `residential`| Scraping, geo-bypass, ad verification | GB |
|
|
138
|
+
| `ipv4` | Automation, high-throughput tasks | IP/period |
|
|
139
|
+
| `ipv6` | Mass requests on IPv6-compatible targets | IP/period |
|
|
140
|
+
| `isp` | Social media, e-commerce, long-running sessions | IP/period |
|
|
141
|
+
| `mobile` | Platforms with aggressive anti-bot measures | IP/period |
|
|
142
|
+
|
|
143
|
+
Use `get_reference_data` with `resident` (not `residential`) when fetching reference data for residential proxies.
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## License
|
|
148
|
+
|
|
149
|
+
MIT
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,457 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
3
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
// ---------------------------------------------------------------------------
|
|
6
|
+
// Configuration
|
|
7
|
+
// ---------------------------------------------------------------------------
|
|
8
|
+
const API_BASE_URL = (process.env.PROXY_API_URL ?? "https://1001proxy.com").replace(/\/$/, "");
|
|
9
|
+
const API_KEY = process.env.PROXY_API_KEY ?? "";
|
|
10
|
+
if (!API_KEY) {
|
|
11
|
+
process.stderr.write("[1001proxy-mcp] FATAL: PROXY_API_KEY environment variable is not set.\n");
|
|
12
|
+
process.exit(1);
|
|
13
|
+
}
|
|
14
|
+
async function apiCall(opts) {
|
|
15
|
+
const { method, path, body, extraHeaders = {}, rawText = false } = opts;
|
|
16
|
+
const url = `${API_BASE_URL}${path}`;
|
|
17
|
+
const headers = {
|
|
18
|
+
Authorization: `Bearer ${API_KEY}`,
|
|
19
|
+
Accept: "application/json",
|
|
20
|
+
...extraHeaders,
|
|
21
|
+
};
|
|
22
|
+
const fetchOpts = { method, headers };
|
|
23
|
+
if (body !== undefined) {
|
|
24
|
+
headers["Content-Type"] = "application/json";
|
|
25
|
+
fetchOpts.body = JSON.stringify(body);
|
|
26
|
+
}
|
|
27
|
+
const res = await fetch(url, fetchOpts);
|
|
28
|
+
if (rawText) {
|
|
29
|
+
const text = await res.text();
|
|
30
|
+
if (!res.ok) {
|
|
31
|
+
throw new Error(`HTTP ${res.status}: ${text.slice(0, 300)}`);
|
|
32
|
+
}
|
|
33
|
+
return text;
|
|
34
|
+
}
|
|
35
|
+
const contentType = res.headers.get("content-type") ?? "";
|
|
36
|
+
let json;
|
|
37
|
+
if (contentType.includes("application/json")) {
|
|
38
|
+
json = await res.json();
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
const text = await res.text();
|
|
42
|
+
throw new Error(`HTTP ${res.status}: unexpected content-type "${contentType}". Body: ${text.slice(0, 300)}`);
|
|
43
|
+
}
|
|
44
|
+
if (!res.ok) {
|
|
45
|
+
const err = json;
|
|
46
|
+
const message = typeof err?.error === "string"
|
|
47
|
+
? err.error
|
|
48
|
+
: typeof err?.message === "string"
|
|
49
|
+
? err.message
|
|
50
|
+
: `HTTP ${res.status}`;
|
|
51
|
+
throw new Error(message);
|
|
52
|
+
}
|
|
53
|
+
// Unwrap the { data, meta } envelope that 1001Proxy uses
|
|
54
|
+
if (json && typeof json === "object" && "data" in json) {
|
|
55
|
+
return json;
|
|
56
|
+
}
|
|
57
|
+
return json;
|
|
58
|
+
}
|
|
59
|
+
// ---------------------------------------------------------------------------
|
|
60
|
+
// Shared tool response helpers
|
|
61
|
+
// ---------------------------------------------------------------------------
|
|
62
|
+
function ok(result) {
|
|
63
|
+
return {
|
|
64
|
+
content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
function err(error) {
|
|
68
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
69
|
+
return {
|
|
70
|
+
content: [{ type: "text", text: `Error: ${message}` }],
|
|
71
|
+
isError: true,
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
// ---------------------------------------------------------------------------
|
|
75
|
+
// MCP Server
|
|
76
|
+
// ---------------------------------------------------------------------------
|
|
77
|
+
const server = new McpServer({
|
|
78
|
+
name: "1001proxy",
|
|
79
|
+
version: "1.0.0",
|
|
80
|
+
});
|
|
81
|
+
// ---------------------------------------------------------------------------
|
|
82
|
+
// Tool: get_account
|
|
83
|
+
// ---------------------------------------------------------------------------
|
|
84
|
+
server.tool("get_account", "Get the current account's information including email, name, and prepaid balance in USD. " +
|
|
85
|
+
"Use this first to verify your API key is valid and to check how much balance is available before placing orders.", {}, async () => {
|
|
86
|
+
try {
|
|
87
|
+
const result = await apiCall({ method: "GET", path: "/api/v1/account" });
|
|
88
|
+
return ok(result);
|
|
89
|
+
}
|
|
90
|
+
catch (e) {
|
|
91
|
+
return err(e);
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
// ---------------------------------------------------------------------------
|
|
95
|
+
// Tool: list_proxy_types
|
|
96
|
+
// ---------------------------------------------------------------------------
|
|
97
|
+
server.tool("list_proxy_types", "Returns the catalogue of proxy types available on 1001Proxy with pricing guidance. " +
|
|
98
|
+
"Use this to decide which proxy type fits the use-case before fetching detailed reference data.", {}, async () => {
|
|
99
|
+
const types = [
|
|
100
|
+
{
|
|
101
|
+
type: "residential",
|
|
102
|
+
label: "Residential",
|
|
103
|
+
description: "10M+ real residential IPs from 150+ countries. Billed by traffic (GB). Best for scraping, ad verification, and bypassing geo-restrictions.",
|
|
104
|
+
pricingModel: "per GB",
|
|
105
|
+
indicativePrice: "$1.75/GB",
|
|
106
|
+
referenceType: "resident",
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
type: "ipv4",
|
|
110
|
+
label: "IPv4 Datacenter",
|
|
111
|
+
description: "Dedicated datacenter IPv4 proxies. Fastest option, fixed IP per purchase. Best for automation and high-throughput tasks.",
|
|
112
|
+
pricingModel: "per IP / per period",
|
|
113
|
+
indicativePrice: "$0.30/IP",
|
|
114
|
+
referenceType: "ipv4",
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
type: "ipv6",
|
|
118
|
+
label: "IPv6 Datacenter",
|
|
119
|
+
description: "Billions of IPv6 addresses. Extremely cost-effective for mass requests on IPv6-compatible targets.",
|
|
120
|
+
pricingModel: "per IP / per period",
|
|
121
|
+
indicativePrice: "$0.03/IP",
|
|
122
|
+
referenceType: "ipv6",
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
type: "isp",
|
|
126
|
+
label: "ISP (Static Residential)",
|
|
127
|
+
description: "Static IPs hosted at real ISPs — residential trust level with datacenter speed. Best for social media, e-commerce, and long-running sessions.",
|
|
128
|
+
pricingModel: "per IP / per period",
|
|
129
|
+
indicativePrice: "$1.60/IP",
|
|
130
|
+
referenceType: "isp",
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
type: "mobile",
|
|
134
|
+
label: "Mobile (4G/5G)",
|
|
135
|
+
description: "Real 4G/5G carrier IPs with high trust scores. Best for platforms with aggressive anti-bot measures.",
|
|
136
|
+
pricingModel: "per IP / per period",
|
|
137
|
+
indicativePrice: "$30/IP",
|
|
138
|
+
referenceType: "mobile",
|
|
139
|
+
},
|
|
140
|
+
];
|
|
141
|
+
return ok(types);
|
|
142
|
+
});
|
|
143
|
+
// ---------------------------------------------------------------------------
|
|
144
|
+
// Tool: get_reference_data
|
|
145
|
+
// ---------------------------------------------------------------------------
|
|
146
|
+
server.tool("get_reference_data", "Fetch countries, rental periods, operators, and pricing tariffs for a specific proxy type. " +
|
|
147
|
+
"Call this after choosing a proxy type to discover the exact IDs (countryId, periodId, tarifId, operatorId) " +
|
|
148
|
+
"needed for calculate_order and create_order.", {
|
|
149
|
+
type: z
|
|
150
|
+
.enum(["ipv4", "ipv6", "mobile", "isp", "resident", "mix", "mix_isp"])
|
|
151
|
+
.describe("Proxy type to fetch reference data for. Use 'resident' for residential proxies."),
|
|
152
|
+
}, async ({ type }) => {
|
|
153
|
+
try {
|
|
154
|
+
const result = await apiCall({ method: "GET", path: `/api/v1/reference/${type}` });
|
|
155
|
+
return ok(result);
|
|
156
|
+
}
|
|
157
|
+
catch (e) {
|
|
158
|
+
return err(e);
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
// ---------------------------------------------------------------------------
|
|
162
|
+
// Shared order param schema (reused for calc and create)
|
|
163
|
+
// ---------------------------------------------------------------------------
|
|
164
|
+
const orderParams = {
|
|
165
|
+
type: z
|
|
166
|
+
.string()
|
|
167
|
+
.describe("Proxy type: ipv4 | ipv6 | mobile | isp | resident | mix | mix_isp"),
|
|
168
|
+
countryId: z
|
|
169
|
+
.number()
|
|
170
|
+
.int()
|
|
171
|
+
.optional()
|
|
172
|
+
.describe("Country ID from get_reference_data. Required for most types."),
|
|
173
|
+
periodId: z
|
|
174
|
+
.number()
|
|
175
|
+
.int()
|
|
176
|
+
.optional()
|
|
177
|
+
.describe("Rental period ID from get_reference_data (e.g. 7 days, 30 days). Required for non-residential types."),
|
|
178
|
+
quantity: z
|
|
179
|
+
.number()
|
|
180
|
+
.int()
|
|
181
|
+
.positive()
|
|
182
|
+
.optional()
|
|
183
|
+
.describe("Number of proxies (for ipv4/ipv6/isp/mobile) or GB of traffic (for residential)."),
|
|
184
|
+
protocol: z
|
|
185
|
+
.string()
|
|
186
|
+
.optional()
|
|
187
|
+
.describe("Protocol: https or socks5. Defaults to https if omitted."),
|
|
188
|
+
tarifId: z
|
|
189
|
+
.number()
|
|
190
|
+
.int()
|
|
191
|
+
.optional()
|
|
192
|
+
.describe("Specific tariff ID from get_reference_data. Required for residential orders."),
|
|
193
|
+
mobileServiceType: z
|
|
194
|
+
.string()
|
|
195
|
+
.optional()
|
|
196
|
+
.describe("Mobile service type (e.g. '4g'). Required for mobile orders."),
|
|
197
|
+
operatorId: z
|
|
198
|
+
.number()
|
|
199
|
+
.int()
|
|
200
|
+
.optional()
|
|
201
|
+
.describe("Mobile carrier/operator ID from get_reference_data. Required for mobile orders."),
|
|
202
|
+
rotationId: z
|
|
203
|
+
.number()
|
|
204
|
+
.int()
|
|
205
|
+
.optional()
|
|
206
|
+
.describe("Rotation interval ID from get_reference_data. Applicable to mobile and residential."),
|
|
207
|
+
};
|
|
208
|
+
// ---------------------------------------------------------------------------
|
|
209
|
+
// Tool: calculate_order
|
|
210
|
+
// ---------------------------------------------------------------------------
|
|
211
|
+
server.tool("calculate_order", "Get a price quote for a proxy order without placing it. " +
|
|
212
|
+
"Always call this before create_order to confirm the cost and ensure you have enough balance. " +
|
|
213
|
+
"Returns the total price in USD after markup.", orderParams, async (params) => {
|
|
214
|
+
try {
|
|
215
|
+
const { type, ...rest } = params;
|
|
216
|
+
// Strip undefined values so the API doesn't choke on null fields
|
|
217
|
+
const body = Object.fromEntries(Object.entries({ type, ...rest }).filter(([, v]) => v !== undefined));
|
|
218
|
+
const result = await apiCall({ method: "POST", path: "/api/v1/orders/calc", body });
|
|
219
|
+
return ok(result);
|
|
220
|
+
}
|
|
221
|
+
catch (e) {
|
|
222
|
+
return err(e);
|
|
223
|
+
}
|
|
224
|
+
});
|
|
225
|
+
// ---------------------------------------------------------------------------
|
|
226
|
+
// Tool: create_order
|
|
227
|
+
// ---------------------------------------------------------------------------
|
|
228
|
+
server.tool("create_order", "Place a proxy order and debit your prepaid balance. " +
|
|
229
|
+
"Use calculate_order first to confirm pricing. " +
|
|
230
|
+
"After a successful order, call get_proxies or download_proxies to retrieve your proxy credentials. " +
|
|
231
|
+
"Supply an idempotency_key to safely retry without risk of double-billing.", {
|
|
232
|
+
...orderParams,
|
|
233
|
+
idempotency_key: z
|
|
234
|
+
.string()
|
|
235
|
+
.optional()
|
|
236
|
+
.describe("Optional unique key (UUID recommended) to make this request idempotent. " +
|
|
237
|
+
"Retrying with the same key returns the original response without re-charging."),
|
|
238
|
+
}, async (params) => {
|
|
239
|
+
try {
|
|
240
|
+
const { type, idempotency_key, ...rest } = params;
|
|
241
|
+
const body = Object.fromEntries(Object.entries({ type, ...rest }).filter(([, v]) => v !== undefined));
|
|
242
|
+
const extraHeaders = {};
|
|
243
|
+
if (idempotency_key) {
|
|
244
|
+
extraHeaders["Idempotency-Key"] = idempotency_key;
|
|
245
|
+
}
|
|
246
|
+
const result = await apiCall({
|
|
247
|
+
method: "POST",
|
|
248
|
+
path: "/api/v1/orders",
|
|
249
|
+
body,
|
|
250
|
+
extraHeaders,
|
|
251
|
+
});
|
|
252
|
+
return ok(result);
|
|
253
|
+
}
|
|
254
|
+
catch (e) {
|
|
255
|
+
return err(e);
|
|
256
|
+
}
|
|
257
|
+
});
|
|
258
|
+
// ---------------------------------------------------------------------------
|
|
259
|
+
// Tool: list_orders
|
|
260
|
+
// ---------------------------------------------------------------------------
|
|
261
|
+
server.tool("list_orders", "List proxy orders for the account with optional pagination and filtering. " +
|
|
262
|
+
"Returns order IDs, types, statuses, amounts charged, and proxy counts. " +
|
|
263
|
+
"Use the returned order ID with get_order or get_proxies for more detail.", {
|
|
264
|
+
page: z
|
|
265
|
+
.number()
|
|
266
|
+
.int()
|
|
267
|
+
.positive()
|
|
268
|
+
.optional()
|
|
269
|
+
.describe("Page number, starting at 1. Defaults to 1."),
|
|
270
|
+
per_page: z
|
|
271
|
+
.number()
|
|
272
|
+
.int()
|
|
273
|
+
.positive()
|
|
274
|
+
.max(100)
|
|
275
|
+
.optional()
|
|
276
|
+
.describe("Results per page, max 100. Defaults to 20."),
|
|
277
|
+
status: z
|
|
278
|
+
.enum(["active", "expired", "canceled"])
|
|
279
|
+
.optional()
|
|
280
|
+
.describe("Filter by order status."),
|
|
281
|
+
type: z
|
|
282
|
+
.string()
|
|
283
|
+
.optional()
|
|
284
|
+
.describe("Filter by proxy type (e.g. ipv4, residential)."),
|
|
285
|
+
}, async (params) => {
|
|
286
|
+
try {
|
|
287
|
+
const qs = new URLSearchParams();
|
|
288
|
+
if (params.page !== undefined)
|
|
289
|
+
qs.set("page", String(params.page));
|
|
290
|
+
if (params.per_page !== undefined)
|
|
291
|
+
qs.set("per_page", String(params.per_page));
|
|
292
|
+
if (params.status)
|
|
293
|
+
qs.set("status", params.status);
|
|
294
|
+
if (params.type)
|
|
295
|
+
qs.set("type", params.type);
|
|
296
|
+
const query = qs.toString() ? `?${qs.toString()}` : "";
|
|
297
|
+
const result = await apiCall({ method: "GET", path: `/api/v1/orders${query}` });
|
|
298
|
+
return ok(result);
|
|
299
|
+
}
|
|
300
|
+
catch (e) {
|
|
301
|
+
return err(e);
|
|
302
|
+
}
|
|
303
|
+
});
|
|
304
|
+
// ---------------------------------------------------------------------------
|
|
305
|
+
// Tool: get_order
|
|
306
|
+
// ---------------------------------------------------------------------------
|
|
307
|
+
server.tool("get_order", "Get full details for a single order by its ID, including status, proxy count, country, period, and expiry date.", {
|
|
308
|
+
order_id: z
|
|
309
|
+
.string()
|
|
310
|
+
.describe("The order ID returned by create_order or list_orders."),
|
|
311
|
+
}, async ({ order_id }) => {
|
|
312
|
+
try {
|
|
313
|
+
const result = await apiCall({ method: "GET", path: `/api/v1/orders/${order_id}` });
|
|
314
|
+
return ok(result);
|
|
315
|
+
}
|
|
316
|
+
catch (e) {
|
|
317
|
+
return err(e);
|
|
318
|
+
}
|
|
319
|
+
});
|
|
320
|
+
// ---------------------------------------------------------------------------
|
|
321
|
+
// Tool: get_proxies
|
|
322
|
+
// ---------------------------------------------------------------------------
|
|
323
|
+
server.tool("get_proxies", "Retrieve structured proxy credentials for an order — IP, ports, login, and password for each proxy. " +
|
|
324
|
+
"Use this when you need to programmatically configure proxies in your application. " +
|
|
325
|
+
"For a simple list of proxy strings, use download_proxies instead.", {
|
|
326
|
+
order_id: z
|
|
327
|
+
.string()
|
|
328
|
+
.describe("The order ID to retrieve proxy credentials for."),
|
|
329
|
+
}, async ({ order_id }) => {
|
|
330
|
+
try {
|
|
331
|
+
const result = await apiCall({
|
|
332
|
+
method: "GET",
|
|
333
|
+
path: `/api/v1/orders/${order_id}/proxies`,
|
|
334
|
+
});
|
|
335
|
+
return ok(result);
|
|
336
|
+
}
|
|
337
|
+
catch (e) {
|
|
338
|
+
return err(e);
|
|
339
|
+
}
|
|
340
|
+
});
|
|
341
|
+
// ---------------------------------------------------------------------------
|
|
342
|
+
// Tool: download_proxies
|
|
343
|
+
// ---------------------------------------------------------------------------
|
|
344
|
+
server.tool("download_proxies", "Download the proxy list for an order as plain text, one proxy per line. " +
|
|
345
|
+
"Supports txt and csv formats. " +
|
|
346
|
+
"The txt format returns lines like 'ip:port', ready for copy-paste into tools. " +
|
|
347
|
+
"Use get_proxies instead if you need structured data with credentials.", {
|
|
348
|
+
order_id: z
|
|
349
|
+
.string()
|
|
350
|
+
.describe("The order ID to download proxies for."),
|
|
351
|
+
format: z
|
|
352
|
+
.enum(["txt", "csv"])
|
|
353
|
+
.optional()
|
|
354
|
+
.describe("Output format: txt (default) or csv."),
|
|
355
|
+
}, async ({ order_id, format = "txt" }) => {
|
|
356
|
+
try {
|
|
357
|
+
const result = await apiCall({
|
|
358
|
+
method: "GET",
|
|
359
|
+
path: `/api/v1/orders/${order_id}/download?format=${format}`,
|
|
360
|
+
rawText: true,
|
|
361
|
+
});
|
|
362
|
+
return ok(result);
|
|
363
|
+
}
|
|
364
|
+
catch (e) {
|
|
365
|
+
return err(e);
|
|
366
|
+
}
|
|
367
|
+
});
|
|
368
|
+
// ---------------------------------------------------------------------------
|
|
369
|
+
// Tool: extend_order
|
|
370
|
+
// ---------------------------------------------------------------------------
|
|
371
|
+
server.tool("extend_order", "Extend (renew) an existing proxy order for an additional rental period. " +
|
|
372
|
+
"Debits balance for the extension cost. " +
|
|
373
|
+
"Use get_reference_data to find valid periodId values for the proxy type.", {
|
|
374
|
+
order_id: z
|
|
375
|
+
.string()
|
|
376
|
+
.describe("The order ID to extend."),
|
|
377
|
+
periodId: z
|
|
378
|
+
.number()
|
|
379
|
+
.int()
|
|
380
|
+
.describe("The period ID for the extension. Fetch valid values from get_reference_data for the order's proxy type."),
|
|
381
|
+
}, async ({ order_id, periodId }) => {
|
|
382
|
+
try {
|
|
383
|
+
const result = await apiCall({
|
|
384
|
+
method: "POST",
|
|
385
|
+
path: `/api/v1/orders/${order_id}/extend`,
|
|
386
|
+
body: { periodId },
|
|
387
|
+
});
|
|
388
|
+
return ok(result);
|
|
389
|
+
}
|
|
390
|
+
catch (e) {
|
|
391
|
+
return err(e);
|
|
392
|
+
}
|
|
393
|
+
});
|
|
394
|
+
// ---------------------------------------------------------------------------
|
|
395
|
+
// Tool: get_transactions
|
|
396
|
+
// ---------------------------------------------------------------------------
|
|
397
|
+
server.tool("get_transactions", "List balance transactions for the account — deposits, purchases, refunds, and adjustments. " +
|
|
398
|
+
"Useful for auditing spend or confirming a deposit has been credited.", {
|
|
399
|
+
page: z
|
|
400
|
+
.number()
|
|
401
|
+
.int()
|
|
402
|
+
.positive()
|
|
403
|
+
.optional()
|
|
404
|
+
.describe("Page number, starting at 1. Defaults to 1."),
|
|
405
|
+
per_page: z
|
|
406
|
+
.number()
|
|
407
|
+
.int()
|
|
408
|
+
.positive()
|
|
409
|
+
.max(100)
|
|
410
|
+
.optional()
|
|
411
|
+
.describe("Results per page, max 100. Defaults to 20."),
|
|
412
|
+
}, async (params) => {
|
|
413
|
+
try {
|
|
414
|
+
const qs = new URLSearchParams();
|
|
415
|
+
if (params.page !== undefined)
|
|
416
|
+
qs.set("page", String(params.page));
|
|
417
|
+
if (params.per_page !== undefined)
|
|
418
|
+
qs.set("per_page", String(params.per_page));
|
|
419
|
+
const query = qs.toString() ? `?${qs.toString()}` : "";
|
|
420
|
+
const result = await apiCall({
|
|
421
|
+
method: "GET",
|
|
422
|
+
path: `/api/v1/account/transactions${query}`,
|
|
423
|
+
});
|
|
424
|
+
return ok(result);
|
|
425
|
+
}
|
|
426
|
+
catch (e) {
|
|
427
|
+
return err(e);
|
|
428
|
+
}
|
|
429
|
+
});
|
|
430
|
+
// ---------------------------------------------------------------------------
|
|
431
|
+
// Tool: get_deposit_addresses
|
|
432
|
+
// ---------------------------------------------------------------------------
|
|
433
|
+
server.tool("get_deposit_addresses", "Get cryptocurrency deposit addresses for topping up account balance. " +
|
|
434
|
+
"Returns addresses for all supported networks (USDT, BTC, ETH, etc.). " +
|
|
435
|
+
"Deposits are credited automatically after on-chain confirmation. " +
|
|
436
|
+
"Use get_transactions to verify a deposit has been credited.", {}, async () => {
|
|
437
|
+
try {
|
|
438
|
+
const result = await apiCall({ method: "GET", path: "/api/v1/deposits/addresses" });
|
|
439
|
+
return ok(result);
|
|
440
|
+
}
|
|
441
|
+
catch (e) {
|
|
442
|
+
return err(e);
|
|
443
|
+
}
|
|
444
|
+
});
|
|
445
|
+
// ---------------------------------------------------------------------------
|
|
446
|
+
// Start
|
|
447
|
+
// ---------------------------------------------------------------------------
|
|
448
|
+
async function main() {
|
|
449
|
+
const transport = new StdioServerTransport();
|
|
450
|
+
await server.connect(transport);
|
|
451
|
+
process.stderr.write("[1001proxy-mcp] Server running on stdio\n");
|
|
452
|
+
}
|
|
453
|
+
main().catch((e) => {
|
|
454
|
+
process.stderr.write(`[1001proxy-mcp] Fatal error: ${e instanceof Error ? e.message : String(e)}\n`);
|
|
455
|
+
process.exit(1);
|
|
456
|
+
});
|
|
457
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,8EAA8E;AAC9E,gBAAgB;AAChB,8EAA8E;AAE9E,MAAM,YAAY,GAAG,CAAC,OAAO,CAAC,GA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AAI,EAAE;IACT,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,4BAA4B,EAAE,CAAC,CAAC;QACpF,OAAO,EAAE,CAAC,MAAM,CAAC,CAAC;IACpB,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC;IAChB,CAAC;AACH,CAAC,CACF,CAAC;AAEF,8EAA8E;AAC9E,QAAQ;AACR,8EAA8E;AAE9E,KAAK,UAAU,IAAI;IACjB,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAChC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,2CAA2C,CAAC,CAAC;AACpE,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,gCAAgC,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IACrG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@1001proxy-mcp/server",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "MCP server for 1001Proxy — let AI agents buy and manage proxies",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"bin": {
|
|
8
|
+
"1001proxy-mcp": "dist/index.js"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"dist"
|
|
12
|
+
],
|
|
13
|
+
"scripts": {
|
|
14
|
+
"build": "tsc",
|
|
15
|
+
"dev": "tsc --watch",
|
|
16
|
+
"start": "node dist/index.js",
|
|
17
|
+
"prepublishOnly": "npm run build"
|
|
18
|
+
},
|
|
19
|
+
"keywords": [
|
|
20
|
+
"mcp",
|
|
21
|
+
"model-context-protocol",
|
|
22
|
+
"proxy",
|
|
23
|
+
"ai-agent",
|
|
24
|
+
"claude",
|
|
25
|
+
"1001proxy",
|
|
26
|
+
"residential-proxy",
|
|
27
|
+
"datacenter-proxy"
|
|
28
|
+
],
|
|
29
|
+
"homepage": "https://1001proxy.com/docs/mcp",
|
|
30
|
+
"repository": {
|
|
31
|
+
"type": "git",
|
|
32
|
+
"url": "https://github.com/1001proxy/mcp-server"
|
|
33
|
+
},
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"@modelcontextprotocol/sdk": "^1.12.1"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"typescript": "^5.7.0",
|
|
39
|
+
"@types/node": "^22"
|
|
40
|
+
},
|
|
41
|
+
"engines": {
|
|
42
|
+
"node": ">=18"
|
|
43
|
+
},
|
|
44
|
+
"license": "MIT"
|
|
45
|
+
}
|