@agentkey/mcp 0.0.2
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/dist/index.d.ts +2 -0
- package/dist/index.js +614 -0
- package/dist/index.js.map +1 -0
- package/package.json +47 -0
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,614 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
const mcp_js_1 = require("@modelcontextprotocol/sdk/server/mcp.js");
|
|
38
|
+
const stdio_js_1 = require("@modelcontextprotocol/sdk/server/stdio.js");
|
|
39
|
+
const zod_1 = require("zod");
|
|
40
|
+
const fs = __importStar(require("fs"));
|
|
41
|
+
const path = __importStar(require("path"));
|
|
42
|
+
const os = __importStar(require("os"));
|
|
43
|
+
const readline = __importStar(require("readline"));
|
|
44
|
+
// --- Configuration ---
|
|
45
|
+
const AGENTKEY_BASE_URL = process.env.AGENTKEY_BASE_URL || "https://api.agentkey.app";
|
|
46
|
+
const AGENTKEY_API_KEY = process.env.AGENTKEY_API_KEY || "";
|
|
47
|
+
console.error(`[DEBUG] AGENTKEY_BASE_URL=${AGENTKEY_BASE_URL}`);
|
|
48
|
+
console.error(`[DEBUG] AGENTKEY_API_KEY=${AGENTKEY_API_KEY ? "****" + AGENTKEY_API_KEY.slice(-4) : "(not set)"}`);
|
|
49
|
+
console.error(`[DEBUG] All env keys: ${Object.keys(process.env).filter(k => k.includes("AGENT")).join(", ")}`);
|
|
50
|
+
// --- CLI: --list-tools ---
|
|
51
|
+
if (process.argv.includes("--list-tools")) {
|
|
52
|
+
console.log(`AgentKey MCP Server v0.1.0
|
|
53
|
+
|
|
54
|
+
Tools:
|
|
55
|
+
agentkey_search Search the web, news, images, videos, or places
|
|
56
|
+
Providers: Serper, Tavily, Brave, Perplexity
|
|
57
|
+
agentkey_scrape Scrape a webpage and extract content as markdown/html/text
|
|
58
|
+
Providers: Firecrawl, Jina Reader, ScrapeNinja
|
|
59
|
+
agentkey_social Query social media (search, posts, comments, user profiles)
|
|
60
|
+
Platforms: Twitter/X, Reddit
|
|
61
|
+
|
|
62
|
+
Environment:
|
|
63
|
+
AGENTKEY_BASE_URL API base URL (default: http://localhost:8081)
|
|
64
|
+
AGENTKEY_API_KEY Your AgentKey API key (required)
|
|
65
|
+
|
|
66
|
+
Commands:
|
|
67
|
+
--setup Interactive setup wizard to configure your API key
|
|
68
|
+
--list-tools List available tools
|
|
69
|
+
`);
|
|
70
|
+
process.exit(0);
|
|
71
|
+
}
|
|
72
|
+
function getClientConfigs() {
|
|
73
|
+
const home = os.homedir();
|
|
74
|
+
const platform = os.platform();
|
|
75
|
+
const configs = [];
|
|
76
|
+
// Claude Desktop
|
|
77
|
+
if (platform === "darwin") {
|
|
78
|
+
configs.push({
|
|
79
|
+
name: "Claude Desktop",
|
|
80
|
+
configPath: path.join(home, "Library", "Application Support", "Claude", "claude_desktop_config.json"),
|
|
81
|
+
serverKey: "mcpServers",
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
else if (platform === "win32") {
|
|
85
|
+
configs.push({
|
|
86
|
+
name: "Claude Desktop",
|
|
87
|
+
configPath: path.join(process.env.APPDATA || path.join(home, "AppData", "Roaming"), "Claude", "claude_desktop_config.json"),
|
|
88
|
+
serverKey: "mcpServers",
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
// Cursor
|
|
92
|
+
configs.push({
|
|
93
|
+
name: "Cursor",
|
|
94
|
+
configPath: path.join(home, ".cursor", "mcp.json"),
|
|
95
|
+
serverKey: "mcpServers",
|
|
96
|
+
});
|
|
97
|
+
// Claude Code
|
|
98
|
+
configs.push({
|
|
99
|
+
name: "Claude Code",
|
|
100
|
+
configPath: path.join(home, ".claude", "settings.json"),
|
|
101
|
+
serverKey: "mcpServers",
|
|
102
|
+
});
|
|
103
|
+
return configs;
|
|
104
|
+
}
|
|
105
|
+
function collectLines(stream) {
|
|
106
|
+
return new Promise((resolve) => {
|
|
107
|
+
const lines = [];
|
|
108
|
+
const rl = readline.createInterface({ input: stream });
|
|
109
|
+
rl.on("line", (line) => lines.push(line));
|
|
110
|
+
rl.on("close", () => resolve(lines));
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
function createPrompter(isTTY, lines) {
|
|
114
|
+
let lineIndex = 0;
|
|
115
|
+
const rl = isTTY
|
|
116
|
+
? readline.createInterface({ input: process.stdin, output: process.stdout })
|
|
117
|
+
: null;
|
|
118
|
+
return {
|
|
119
|
+
async ask(question) {
|
|
120
|
+
if (rl) {
|
|
121
|
+
return new Promise((resolve) => {
|
|
122
|
+
rl.question(question, (answer) => resolve(answer.trim()));
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
// Non-interactive: consume pre-collected lines
|
|
126
|
+
process.stdout.write(question);
|
|
127
|
+
const answer = lineIndex < lines.length ? lines[lineIndex++] : "";
|
|
128
|
+
console.log(answer);
|
|
129
|
+
return answer.trim();
|
|
130
|
+
},
|
|
131
|
+
close() {
|
|
132
|
+
rl?.close();
|
|
133
|
+
},
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
function writeClientConfig(client, apiKey, baseUrl) {
|
|
137
|
+
// Read existing config or create new
|
|
138
|
+
let config = {};
|
|
139
|
+
if (fs.existsSync(client.configPath)) {
|
|
140
|
+
try {
|
|
141
|
+
config = JSON.parse(fs.readFileSync(client.configPath, "utf-8"));
|
|
142
|
+
}
|
|
143
|
+
catch {
|
|
144
|
+
// Corrupted file, start fresh
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
// Ensure parent directory exists
|
|
148
|
+
const dir = path.dirname(client.configPath);
|
|
149
|
+
if (!fs.existsSync(dir)) {
|
|
150
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
151
|
+
}
|
|
152
|
+
// Build the MCP server entry
|
|
153
|
+
const serverEntry = {
|
|
154
|
+
command: "npx",
|
|
155
|
+
args: ["-y", "@agentkey/mcp"],
|
|
156
|
+
env: {
|
|
157
|
+
AGENTKEY_API_KEY: apiKey,
|
|
158
|
+
...(baseUrl !== "https://api.agentkey.app" ? { AGENTKEY_BASE_URL: baseUrl } : {}),
|
|
159
|
+
},
|
|
160
|
+
};
|
|
161
|
+
// Merge into config
|
|
162
|
+
const servers = config[client.serverKey] || {};
|
|
163
|
+
servers["agentkey.app AgentKey"] = serverEntry;
|
|
164
|
+
config[client.serverKey] = servers;
|
|
165
|
+
fs.writeFileSync(client.configPath, JSON.stringify(config, null, 2) + "\n");
|
|
166
|
+
}
|
|
167
|
+
async function setupWizard() {
|
|
168
|
+
const isTTY = Boolean(process.stdin.isTTY);
|
|
169
|
+
// For piped input, collect all lines up-front to avoid readline buffering issues
|
|
170
|
+
const lines = isTTY ? [] : await collectLines(process.stdin);
|
|
171
|
+
const prompter = createPrompter(isTTY, lines);
|
|
172
|
+
console.log();
|
|
173
|
+
console.log(" ╔══════════════════════════════════════╗");
|
|
174
|
+
console.log(" ║ AgentKey MCP Server Setup ║");
|
|
175
|
+
console.log(" ╚══════════════════════════════════════╝");
|
|
176
|
+
console.log();
|
|
177
|
+
console.log(" One key for all your agent's external APIs.");
|
|
178
|
+
console.log(" Get your key at: https://agentkey.app");
|
|
179
|
+
console.log();
|
|
180
|
+
// Step 1: API Key
|
|
181
|
+
const apiKey = await prompter.ask(" Enter your AgentKey API key: ");
|
|
182
|
+
if (!apiKey) {
|
|
183
|
+
console.log("\n ✗ API key is required. Aborting setup.\n");
|
|
184
|
+
prompter.close();
|
|
185
|
+
process.exit(1);
|
|
186
|
+
}
|
|
187
|
+
// Step 2: Base URL
|
|
188
|
+
const customUrl = await prompter.ask(" API base URL (press Enter for https://api.agentkey.app): ");
|
|
189
|
+
const baseUrl = customUrl || "https://api.agentkey.app";
|
|
190
|
+
// Step 3: Choose client
|
|
191
|
+
const clients = getClientConfigs();
|
|
192
|
+
console.log();
|
|
193
|
+
console.log(" Select MCP client to configure:");
|
|
194
|
+
console.log();
|
|
195
|
+
clients.forEach((c, i) => {
|
|
196
|
+
const exists = fs.existsSync(c.configPath);
|
|
197
|
+
const status = exists ? "(config found)" : "(will create)";
|
|
198
|
+
console.log(` ${i + 1}) ${c.name} ${status}`);
|
|
199
|
+
});
|
|
200
|
+
console.log(` ${clients.length + 1}) All of the above`);
|
|
201
|
+
console.log();
|
|
202
|
+
const choice = await prompter.ask(` Your choice [1-${clients.length + 1}]: `);
|
|
203
|
+
const choiceNum = parseInt(choice, 10);
|
|
204
|
+
if (isNaN(choiceNum) || choiceNum < 1 || choiceNum > clients.length + 1) {
|
|
205
|
+
console.log("\n ✗ Invalid choice. Aborting setup.\n");
|
|
206
|
+
prompter.close();
|
|
207
|
+
process.exit(1);
|
|
208
|
+
}
|
|
209
|
+
// Step 4: Write config
|
|
210
|
+
const selectedClients = choiceNum === clients.length + 1 ? clients : [clients[choiceNum - 1]];
|
|
211
|
+
console.log();
|
|
212
|
+
for (const client of selectedClients) {
|
|
213
|
+
try {
|
|
214
|
+
writeClientConfig(client, apiKey, baseUrl);
|
|
215
|
+
console.log(` ✓ ${client.name} configured`);
|
|
216
|
+
console.log(` → ${client.configPath}`);
|
|
217
|
+
}
|
|
218
|
+
catch (err) {
|
|
219
|
+
console.log(` ✗ Failed to configure ${client.name}: ${err}`);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
console.log();
|
|
223
|
+
console.log(" Setup complete! Restart your MCP client to apply changes.");
|
|
224
|
+
console.log();
|
|
225
|
+
prompter.close();
|
|
226
|
+
process.exit(0);
|
|
227
|
+
}
|
|
228
|
+
if (process.argv.includes("--setup")) {
|
|
229
|
+
setupWizard();
|
|
230
|
+
}
|
|
231
|
+
else {
|
|
232
|
+
// --- API Helper ---
|
|
233
|
+
async function callAPI(path, body) {
|
|
234
|
+
if (!AGENTKEY_API_KEY) {
|
|
235
|
+
return {
|
|
236
|
+
ok: false,
|
|
237
|
+
status: 401,
|
|
238
|
+
data: {
|
|
239
|
+
error: "AGENTKEY_API_KEY is not set. Get your key at https://agentkey.app and set it in your MCP config env.",
|
|
240
|
+
},
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
const url = `${AGENTKEY_BASE_URL}${path}`;
|
|
244
|
+
console.error(`[DEBUG] callAPI: ${url} key=${AGENTKEY_API_KEY ? "****" + AGENTKEY_API_KEY.slice(-4) : "(empty)"}`);
|
|
245
|
+
const res = await fetch(url, {
|
|
246
|
+
method: "POST",
|
|
247
|
+
headers: {
|
|
248
|
+
"Content-Type": "application/json",
|
|
249
|
+
Authorization: `Bearer ${AGENTKEY_API_KEY}`,
|
|
250
|
+
},
|
|
251
|
+
body: JSON.stringify(body),
|
|
252
|
+
});
|
|
253
|
+
console.error(`[DEBUG] response: status=${res.status}`);
|
|
254
|
+
const data = await res.json();
|
|
255
|
+
if (res.status === 401) {
|
|
256
|
+
return {
|
|
257
|
+
ok: false,
|
|
258
|
+
status: 401,
|
|
259
|
+
data: {
|
|
260
|
+
error: "Invalid API key. Check your AGENTKEY_API_KEY or get a new key at https://agentkey.app",
|
|
261
|
+
},
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
if (res.status === 429) {
|
|
265
|
+
return {
|
|
266
|
+
ok: false,
|
|
267
|
+
status: 429,
|
|
268
|
+
data: {
|
|
269
|
+
error: "Rate limit exceeded. Please wait a moment and try again, or upgrade your plan at https://agentkey.app",
|
|
270
|
+
},
|
|
271
|
+
};
|
|
272
|
+
}
|
|
273
|
+
return { ok: res.ok, status: res.status, data };
|
|
274
|
+
}
|
|
275
|
+
function errorResult(message) {
|
|
276
|
+
return {
|
|
277
|
+
content: [{ type: "text", text: message }],
|
|
278
|
+
isError: true,
|
|
279
|
+
};
|
|
280
|
+
}
|
|
281
|
+
function textResult(data) {
|
|
282
|
+
return {
|
|
283
|
+
content: [
|
|
284
|
+
{ type: "text", text: JSON.stringify(data, null, 2) },
|
|
285
|
+
],
|
|
286
|
+
};
|
|
287
|
+
}
|
|
288
|
+
// --- MCP Server ---
|
|
289
|
+
const server = new mcp_js_1.McpServer({
|
|
290
|
+
name: "AgentKey",
|
|
291
|
+
version: "0.1.0",
|
|
292
|
+
});
|
|
293
|
+
// Search tool
|
|
294
|
+
server.tool("agentkey_search", `Search the web, news, images, videos, or places via AgentKey unified API.
|
|
295
|
+
Aggregates results from Serper, Tavily, Brave, and Perplexity with automatic failover.
|
|
296
|
+
|
|
297
|
+
Preferences:
|
|
298
|
+
- Default provider to "auto" for best speed and reliability. Use a specific provider only when the user explicitly requests it.
|
|
299
|
+
- Set "lang" based on the language of the user's query (e.g. Chinese→"zh", English→"en", Japanese→"ja"). The user can also explicitly override.
|
|
300
|
+
- Default num to 10 unless the user specifies otherwise.
|
|
301
|
+
- Default type to "web" unless the user asks for news, images, videos, or places.
|
|
302
|
+
- Use time_range when the user asks for "recent", "latest", "this week", "today" etc.
|
|
303
|
+
- Use include_domains/exclude_domains when the user wants results from or excluding specific sites.`, {
|
|
304
|
+
query: zod_1.z.string().describe("Search query"),
|
|
305
|
+
provider: zod_1.z
|
|
306
|
+
.enum(["auto", "serper", "tavily", "brave", "perplexity"])
|
|
307
|
+
.optional()
|
|
308
|
+
.describe("Search provider. Default 'auto' (fastest & cheapest). Only specify when user explicitly asks."),
|
|
309
|
+
type: zod_1.z
|
|
310
|
+
.enum(["web", "news", "images", "videos", "places"])
|
|
311
|
+
.optional()
|
|
312
|
+
.describe("Search type. Default 'web'. Use 'news' for recent articles, 'images' for pictures, 'videos' for video content, 'places' for locations/businesses."),
|
|
313
|
+
search_depth: zod_1.z
|
|
314
|
+
.enum(["basic", "advanced"])
|
|
315
|
+
.optional()
|
|
316
|
+
.describe("Search depth. 'basic' for fast results, 'advanced' for more thorough and detailed results. Default 'basic'."),
|
|
317
|
+
num: zod_1.z
|
|
318
|
+
.number()
|
|
319
|
+
.min(1)
|
|
320
|
+
.max(50)
|
|
321
|
+
.optional()
|
|
322
|
+
.describe("Number of results, default 10"),
|
|
323
|
+
country: zod_1.z
|
|
324
|
+
.string()
|
|
325
|
+
.optional()
|
|
326
|
+
.describe("Country code (ISO 3166-1 alpha-2) to localize results, e.g. 'us', 'cn', 'jp'"),
|
|
327
|
+
lang: zod_1.z
|
|
328
|
+
.string()
|
|
329
|
+
.optional()
|
|
330
|
+
.describe("Language code for results. Auto-detect from user's query language: Chinese→'zh', English→'en', Japanese→'ja', etc. User can override."),
|
|
331
|
+
time_range: zod_1.z
|
|
332
|
+
.enum(["day", "week", "month", "year"])
|
|
333
|
+
.optional()
|
|
334
|
+
.describe("Time range filter. Use 'day' for today, 'week' for this week, 'month' for this month, 'year' for this year. Useful for news and recent content."),
|
|
335
|
+
include_domains: zod_1.z
|
|
336
|
+
.array(zod_1.z.string())
|
|
337
|
+
.optional()
|
|
338
|
+
.describe("Only include results from these domains, e.g. ['github.com', 'arxiv.org']"),
|
|
339
|
+
exclude_domains: zod_1.z
|
|
340
|
+
.array(zod_1.z.string())
|
|
341
|
+
.optional()
|
|
342
|
+
.describe("Exclude results from these domains, e.g. ['pinterest.com', 'quora.com']"),
|
|
343
|
+
page: zod_1.z
|
|
344
|
+
.number()
|
|
345
|
+
.min(1)
|
|
346
|
+
.optional()
|
|
347
|
+
.describe("Page number for pagination, starting from 1"),
|
|
348
|
+
}, async ({ query, provider, type, search_depth, num, country, lang, time_range, include_domains, exclude_domains, page, }) => {
|
|
349
|
+
const body = {
|
|
350
|
+
query,
|
|
351
|
+
provider: provider || "auto",
|
|
352
|
+
};
|
|
353
|
+
if (type)
|
|
354
|
+
body.type = type;
|
|
355
|
+
if (search_depth)
|
|
356
|
+
body.search_depth = search_depth;
|
|
357
|
+
if (num)
|
|
358
|
+
body.num = num;
|
|
359
|
+
if (country)
|
|
360
|
+
body.country = country;
|
|
361
|
+
if (lang)
|
|
362
|
+
body.lang = lang;
|
|
363
|
+
if (time_range)
|
|
364
|
+
body.time_range = time_range;
|
|
365
|
+
if (include_domains?.length)
|
|
366
|
+
body.include_domains = include_domains;
|
|
367
|
+
if (exclude_domains?.length)
|
|
368
|
+
body.exclude_domains = exclude_domains;
|
|
369
|
+
if (page)
|
|
370
|
+
body.page = page;
|
|
371
|
+
try {
|
|
372
|
+
const { ok, data } = await callAPI("/v1/search", body);
|
|
373
|
+
if (!ok) {
|
|
374
|
+
return errorResult(`Search failed: ${data.error || JSON.stringify(data)}`);
|
|
375
|
+
}
|
|
376
|
+
return textResult(data);
|
|
377
|
+
}
|
|
378
|
+
catch (err) {
|
|
379
|
+
return errorResult(`Failed to connect to AgentKey server at ${AGENTKEY_BASE_URL}: ${err}`);
|
|
380
|
+
}
|
|
381
|
+
});
|
|
382
|
+
// Scrape tool
|
|
383
|
+
server.tool("agentkey_scrape", `Scrape a webpage and extract its content as markdown, HTML, text, or screenshot via AgentKey unified API.
|
|
384
|
+
Aggregates Firecrawl, Jina Reader, and ScrapeNinja with automatic failover.
|
|
385
|
+
|
|
386
|
+
Preferences:
|
|
387
|
+
- Default provider to "auto" (uses Jina Reader — fastest and cheapest).
|
|
388
|
+
- Default format to "markdown" which is best for LLM consumption.
|
|
389
|
+
- Use "include_links": true when the user wants to know what links are on the page.
|
|
390
|
+
- Use CSS selectors (include_selectors/exclude_selectors) when the user wants specific parts of the page.
|
|
391
|
+
- Use "screenshot" format only when the user explicitly asks to see what the page looks like.`, {
|
|
392
|
+
url: zod_1.z
|
|
393
|
+
.string()
|
|
394
|
+
.describe("URL to scrape (must start with http:// or https://)"),
|
|
395
|
+
provider: zod_1.z
|
|
396
|
+
.enum(["auto", "firecrawl", "jina", "scrapeninja"])
|
|
397
|
+
.optional()
|
|
398
|
+
.describe("Scrape provider. Default 'auto' (Jina Reader). Use 'firecrawl' for JS-heavy pages or advanced extraction."),
|
|
399
|
+
format: zod_1.z
|
|
400
|
+
.enum(["markdown", "html", "text", "screenshot"])
|
|
401
|
+
.optional()
|
|
402
|
+
.describe("Output format. Default 'markdown'. Best for LLM consumption."),
|
|
403
|
+
include_selectors: zod_1.z
|
|
404
|
+
.array(zod_1.z.string())
|
|
405
|
+
.optional()
|
|
406
|
+
.describe("CSS selectors to include, e.g. ['.article', '#main-content']"),
|
|
407
|
+
exclude_selectors: zod_1.z
|
|
408
|
+
.array(zod_1.z.string())
|
|
409
|
+
.optional()
|
|
410
|
+
.describe("CSS selectors to exclude, e.g. ['.nav', '.footer', '.sidebar']"),
|
|
411
|
+
include_links: zod_1.z
|
|
412
|
+
.boolean()
|
|
413
|
+
.optional()
|
|
414
|
+
.describe("Include extracted links from the page"),
|
|
415
|
+
include_images: zod_1.z
|
|
416
|
+
.boolean()
|
|
417
|
+
.optional()
|
|
418
|
+
.describe("Include extracted image URLs from the page"),
|
|
419
|
+
timeout: zod_1.z
|
|
420
|
+
.number()
|
|
421
|
+
.min(1)
|
|
422
|
+
.max(120)
|
|
423
|
+
.optional()
|
|
424
|
+
.describe("Timeout in seconds, default 30"),
|
|
425
|
+
country: zod_1.z
|
|
426
|
+
.string()
|
|
427
|
+
.optional()
|
|
428
|
+
.describe("Proxy country code for geo-restricted content, e.g. 'us', 'cn'"),
|
|
429
|
+
wait_for: zod_1.z
|
|
430
|
+
.number()
|
|
431
|
+
.optional()
|
|
432
|
+
.describe("Wait milliseconds before extracting content. Useful for pages with delayed JS rendering."),
|
|
433
|
+
}, async ({ url, provider, format, include_selectors, exclude_selectors, include_links, include_images, timeout, country, wait_for, }) => {
|
|
434
|
+
const body = {
|
|
435
|
+
url,
|
|
436
|
+
provider: provider || "auto",
|
|
437
|
+
};
|
|
438
|
+
if (format)
|
|
439
|
+
body.format = format;
|
|
440
|
+
if (include_selectors?.length)
|
|
441
|
+
body.include_selectors = include_selectors;
|
|
442
|
+
if (exclude_selectors?.length)
|
|
443
|
+
body.exclude_selectors = exclude_selectors;
|
|
444
|
+
if (include_links)
|
|
445
|
+
body.include_links = include_links;
|
|
446
|
+
if (include_images)
|
|
447
|
+
body.include_images = include_images;
|
|
448
|
+
if (timeout)
|
|
449
|
+
body.timeout = timeout;
|
|
450
|
+
if (country)
|
|
451
|
+
body.country = country;
|
|
452
|
+
if (wait_for)
|
|
453
|
+
body.wait_for = wait_for;
|
|
454
|
+
try {
|
|
455
|
+
const { ok, data } = await callAPI("/v1/scrape", body);
|
|
456
|
+
if (!ok) {
|
|
457
|
+
return errorResult(`Scrape failed: ${data.error || JSON.stringify(data)}`);
|
|
458
|
+
}
|
|
459
|
+
return textResult(data);
|
|
460
|
+
}
|
|
461
|
+
catch (err) {
|
|
462
|
+
return errorResult(`Failed to connect to AgentKey server at ${AGENTKEY_BASE_URL}: ${err}`);
|
|
463
|
+
}
|
|
464
|
+
});
|
|
465
|
+
// Social media tool
|
|
466
|
+
server.tool("agentkey_social", `Query social media platforms (Twitter/X and Reddit) via AgentKey unified API.
|
|
467
|
+
|
|
468
|
+
Twitter supported types:
|
|
469
|
+
- "search": Search tweets. Requires "query". Use "sort": "latest" for newest results.
|
|
470
|
+
- "posts": Get a user's tweets. Requires "username".
|
|
471
|
+
- "comments": Get replies to a tweet. Requires "post_id".
|
|
472
|
+
- "latest_comments": Get latest replies to a tweet (newest first). Requires "post_id".
|
|
473
|
+
- "user": Get user profile info. Requires "username".
|
|
474
|
+
- "detail": Get a single tweet's full details. Requires "post_id".
|
|
475
|
+
- "replies": Get a user's reply tweets. Requires "username".
|
|
476
|
+
- "media": Get a user's media tweets (photos/videos). Requires "username".
|
|
477
|
+
- "highlights": Get a user's highlighted tweets. Requires "user_id" or "username".
|
|
478
|
+
- "followers": Get a user's followers list. Requires "username".
|
|
479
|
+
- "following": Get accounts a user follows. Requires "username".
|
|
480
|
+
- "retweets": Get users who retweeted a tweet. Requires "post_id".
|
|
481
|
+
- "trending": Get trending topics. Optional "country" (default "UnitedStates").
|
|
482
|
+
|
|
483
|
+
Reddit supported types:
|
|
484
|
+
- "search": Search posts. Requires "query".
|
|
485
|
+
- "posts": Get subreddit posts. Requires "subreddit".
|
|
486
|
+
- "comments": Get post comments. Requires "post_id".
|
|
487
|
+
- "user": Get user profile. Requires "username".
|
|
488
|
+
|
|
489
|
+
Preferences:
|
|
490
|
+
- Set "platform" based on context: "twitter" for tweets/X, "reddit" for Reddit.
|
|
491
|
+
- Default type to "search" unless the user asks for something specific.
|
|
492
|
+
- For Twitter usernames, strip the @ prefix (e.g. @elonmusk → username: "elonmusk").
|
|
493
|
+
- For subreddits, strip the r/ prefix (e.g. r/LocalLLaMA → subreddit: "LocalLLaMA").`, {
|
|
494
|
+
platform: zod_1.z
|
|
495
|
+
.enum(["twitter", "reddit"])
|
|
496
|
+
.describe("Social media platform"),
|
|
497
|
+
type: zod_1.z
|
|
498
|
+
.enum([
|
|
499
|
+
"search",
|
|
500
|
+
"posts",
|
|
501
|
+
"comments",
|
|
502
|
+
"user",
|
|
503
|
+
"detail",
|
|
504
|
+
"latest_comments",
|
|
505
|
+
"replies",
|
|
506
|
+
"media",
|
|
507
|
+
"highlights",
|
|
508
|
+
"followers",
|
|
509
|
+
"following",
|
|
510
|
+
"retweets",
|
|
511
|
+
"trending",
|
|
512
|
+
])
|
|
513
|
+
.optional()
|
|
514
|
+
.describe("Query type. Default 'search'. See tool description for platform-specific types and required parameters."),
|
|
515
|
+
query: zod_1.z
|
|
516
|
+
.string()
|
|
517
|
+
.optional()
|
|
518
|
+
.describe("Search query (required for type=search)"),
|
|
519
|
+
username: zod_1.z
|
|
520
|
+
.string()
|
|
521
|
+
.optional()
|
|
522
|
+
.describe("Username without @ (for type=posts/user/replies/media/highlights/followers/following)"),
|
|
523
|
+
user_id: zod_1.z
|
|
524
|
+
.string()
|
|
525
|
+
.optional()
|
|
526
|
+
.describe("Twitter user ID (for type=highlights, alternative to username)"),
|
|
527
|
+
post_id: zod_1.z
|
|
528
|
+
.string()
|
|
529
|
+
.optional()
|
|
530
|
+
.describe("Post/tweet ID (for type=detail/comments/latest_comments/retweets)"),
|
|
531
|
+
subreddit: zod_1.z
|
|
532
|
+
.string()
|
|
533
|
+
.optional()
|
|
534
|
+
.describe("Subreddit name without r/ (for Reddit type=posts)"),
|
|
535
|
+
sort: zod_1.z
|
|
536
|
+
.enum(["relevance", "hot", "top", "new", "latest", "comments"])
|
|
537
|
+
.optional()
|
|
538
|
+
.describe("Sort order. Default 'relevance' for search, 'hot' for posts."),
|
|
539
|
+
time: zod_1.z
|
|
540
|
+
.enum(["hour", "day", "week", "month", "year", "all"])
|
|
541
|
+
.optional()
|
|
542
|
+
.describe("Time filter for sort=top results"),
|
|
543
|
+
num: zod_1.z
|
|
544
|
+
.number()
|
|
545
|
+
.min(1)
|
|
546
|
+
.max(100)
|
|
547
|
+
.optional()
|
|
548
|
+
.describe("Number of results, default 10"),
|
|
549
|
+
country: zod_1.z
|
|
550
|
+
.string()
|
|
551
|
+
.optional()
|
|
552
|
+
.describe("Country for trending topics (Twitter only). Default 'UnitedStates'."),
|
|
553
|
+
cursor: zod_1.z
|
|
554
|
+
.string()
|
|
555
|
+
.optional()
|
|
556
|
+
.describe("Pagination cursor from previous response's next_cursor"),
|
|
557
|
+
}, async ({ platform, type, query, username, user_id, post_id, subreddit, sort, time, num, country, cursor, }) => {
|
|
558
|
+
const body = { platform };
|
|
559
|
+
if (type)
|
|
560
|
+
body.type = type;
|
|
561
|
+
if (query)
|
|
562
|
+
body.query = query;
|
|
563
|
+
if (username)
|
|
564
|
+
body.username = username;
|
|
565
|
+
if (user_id)
|
|
566
|
+
body.user_id = user_id;
|
|
567
|
+
if (post_id)
|
|
568
|
+
body.post_id = post_id;
|
|
569
|
+
if (subreddit)
|
|
570
|
+
body.subreddit = subreddit;
|
|
571
|
+
if (sort)
|
|
572
|
+
body.sort = sort;
|
|
573
|
+
if (time)
|
|
574
|
+
body.time = time;
|
|
575
|
+
if (num)
|
|
576
|
+
body.num = num;
|
|
577
|
+
if (country)
|
|
578
|
+
body.country = country;
|
|
579
|
+
if (cursor)
|
|
580
|
+
body.cursor = cursor;
|
|
581
|
+
try {
|
|
582
|
+
const { ok, data } = await callAPI("/v1/social", body);
|
|
583
|
+
if (!ok) {
|
|
584
|
+
return errorResult(`Social query failed: ${data.error || JSON.stringify(data)}`);
|
|
585
|
+
}
|
|
586
|
+
return textResult(data);
|
|
587
|
+
}
|
|
588
|
+
catch (err) {
|
|
589
|
+
return errorResult(`Failed to connect to AgentKey server at ${AGENTKEY_BASE_URL}: ${err}`);
|
|
590
|
+
}
|
|
591
|
+
});
|
|
592
|
+
// --- Start ---
|
|
593
|
+
async function main() {
|
|
594
|
+
const transport = new stdio_js_1.StdioServerTransport();
|
|
595
|
+
await server.connect(transport);
|
|
596
|
+
console.error("AgentKey MCP Server running on stdio");
|
|
597
|
+
console.error(` API: ${AGENTKEY_BASE_URL}`);
|
|
598
|
+
console.error(` Key: ${AGENTKEY_API_KEY ? "****" + AGENTKEY_API_KEY.slice(-4) : "(not set)"}`);
|
|
599
|
+
}
|
|
600
|
+
// Graceful shutdown
|
|
601
|
+
process.on("SIGINT", () => {
|
|
602
|
+
console.error("Shutting down...");
|
|
603
|
+
process.exit(0);
|
|
604
|
+
});
|
|
605
|
+
process.on("SIGTERM", () => {
|
|
606
|
+
console.error("Shutting down...");
|
|
607
|
+
process.exit(0);
|
|
608
|
+
});
|
|
609
|
+
main().catch((err) => {
|
|
610
|
+
console.error("Fatal:", err);
|
|
611
|
+
process.exit(1);
|
|
612
|
+
});
|
|
613
|
+
} // end of else (not --setup)
|
|
614
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,oEAAoE;AACpE,wEAAiF;AACjF,6BAAwB;AACxB,uCAAyB;AACzB,2CAA6B;AAC7B,uCAAyB;AACzB,mDAAqC;AAErC,wBAAwB;AAExB,MAAM,iBAAiB,GACrB,OAAO,CAAC,GAAG,CAAC,iBAAiB,IAAI,0BAA0B,CAAC;AAC9D,MAAM,gBAAgB,GAAG,OAAO,CAAC,GAAG,CAAC,gBAAgB,IAAI,EAAE,CAAC;AAE5D,OAAO,CAAC,KAAK,CAAC,6BAA6B,iBAAiB,EAAE,CAAC,CAAC;AAChE,OAAO,CAAC,KAAK,CAAC,4BAA4B,gBAAgB,CAAC,CAAC,CAAC,MAAM,GAAG,gBAAgB,CAAC,KAAK,C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AC,QAAQ,EAAE,GAAG,CAAC,CAAC;QAC7B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;AAEH,CAAC,CAAC,4BAA4B"}
|
package/package.json
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@agentkey/mcp",
|
|
3
|
+
"version": "0.0.2",
|
|
4
|
+
"description": "AgentKey MCP Server — one key for search, scrape, and social media (Twitter + Reddit) via unified API",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"agentkey-mcp": "dist/index.js"
|
|
8
|
+
},
|
|
9
|
+
"scripts": {
|
|
10
|
+
"build": "tsc",
|
|
11
|
+
"start": "node dist/index.js",
|
|
12
|
+
"dev": "ts-node src/index.ts"
|
|
13
|
+
},
|
|
14
|
+
"keywords": [
|
|
15
|
+
"mcp",
|
|
16
|
+
"agentkey",
|
|
17
|
+
"search",
|
|
18
|
+
"scrape",
|
|
19
|
+
"social",
|
|
20
|
+
"twitter",
|
|
21
|
+
"reddit",
|
|
22
|
+
"ai-agent",
|
|
23
|
+
"model-context-protocol"
|
|
24
|
+
],
|
|
25
|
+
"author": "Agentkey",
|
|
26
|
+
"license": "MIT",
|
|
27
|
+
"homepage": "https://agentkey.app",
|
|
28
|
+
"repository": {
|
|
29
|
+
"type": "git",
|
|
30
|
+
"url": "https://github.com/chainbase-labs/agentkey-server"
|
|
31
|
+
},
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"@modelcontextprotocol/sdk": "^1.12.1",
|
|
34
|
+
"zod": "^3.25.0"
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"@types/node": "^22.0.0",
|
|
38
|
+
"typescript": "^5.7.0",
|
|
39
|
+
"ts-node": "^10.9.0"
|
|
40
|
+
},
|
|
41
|
+
"engines": {
|
|
42
|
+
"node": ">=18"
|
|
43
|
+
},
|
|
44
|
+
"files": [
|
|
45
|
+
"dist"
|
|
46
|
+
]
|
|
47
|
+
}
|