domain-search-mcp 1.2.5 → 1.2.6

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 (2) hide show
  1. package/README.md +447 -5
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -247,6 +247,78 @@ for (const domain of result.results) {
247
247
 
248
248
  Check up to 100 domains at once with built-in rate limiting and progress tracking.
249
249
 
250
+ ---
251
+
252
+ #### Quick Start: Initialize and Run bulk_search
253
+
254
+ ```typescript
255
+ // Initialize bulk_search for checking 50 domains
256
+ import { bulkSearch } from 'domain-search-mcp';
257
+
258
+ // Step 1: Prepare your domain list (max 100)
259
+ const domainsToCheck = [
260
+ "techflow", "datawise", "cloudpeak", "aiforge", "bytecraft",
261
+ "codestream", "devpulse", "syncwave", "logiclab", "pixelcraft"
262
+ // ... up to 100 domains
263
+ ];
264
+
265
+ // Step 2: Initialize and call bulk_search
266
+ async function initBulkSearch(domains: string[], tld: string = "com") {
267
+ console.log(`Initializing bulk_search for ${domains.length} domains...`);
268
+
269
+ const result = await bulkSearch({
270
+ domains: domains, // Array of domain names (without TLD)
271
+ tld: tld, // Single TLD to check (e.g., "com", "io")
272
+ concurrency: 10 // Optional: parallel requests (1-20)
273
+ });
274
+
275
+ // Process results
276
+ console.log(`✅ Checked ${result.summary.total} domains in ${result.summary.duration_ms}ms`);
277
+ console.log(` Available: ${result.summary.available}`);
278
+ console.log(` Taken: ${result.summary.taken}`);
279
+ console.log(` Errors: ${result.summary.errors}`);
280
+
281
+ return result;
282
+ }
283
+
284
+ // Step 3: Run the bulk search
285
+ const results = await initBulkSearch(domainsToCheck, "io");
286
+
287
+ // Access available domains
288
+ const availableDomains = results.results.filter(r => r.available);
289
+ availableDomains.forEach(d => {
290
+ console.log(`${d.domain} - $${d.price_first_year}/yr`);
291
+ });
292
+ ```
293
+
294
+ **JavaScript Quick Start:**
295
+
296
+ ```javascript
297
+ // Initialize bulk_search with fetch API
298
+ async function initBulkSearch(domains, tld = 'com') {
299
+ const response = await fetch('http://localhost:3000/bulk_search', {
300
+ method: 'POST',
301
+ headers: { 'Content-Type': 'application/json' },
302
+ body: JSON.stringify({
303
+ domains: domains,
304
+ tld: tld,
305
+ concurrency: 10
306
+ })
307
+ });
308
+
309
+ const result = await response.json();
310
+ console.log(`Checked ${result.summary.total} domains`);
311
+ console.log(`Available: ${result.summary.available}`);
312
+ return result;
313
+ }
314
+
315
+ // Usage
316
+ const domains = ['startup1', 'startup2', 'startup3'];
317
+ const result = await initBulkSearch(domains, 'io');
318
+ ```
319
+
320
+ ---
321
+
250
322
  **API Endpoint:** `POST /bulk_search`
251
323
 
252
324
  **Request Parameters:**
@@ -1327,7 +1399,152 @@ console.log(`Price range: $${tldData.price_range.min} - $${tldData.price_range.m
1327
1399
 
1328
1400
  ### check_socials
1329
1401
 
1330
- Verify username availability across 10 platforms:
1402
+ Verify username availability across 10 platforms simultaneously.
1403
+
1404
+ **API Endpoint:** `POST /check_socials`
1405
+
1406
+ **Request Parameters:**
1407
+
1408
+ | Parameter | Type | Required | Default | Description |
1409
+ |-----------|------|----------|---------|-------------|
1410
+ | `name` | string | Yes | - | Username to check |
1411
+ | `platforms` | string[] | No | ["github", "twitter", "reddit", "npm"] | Platforms to check |
1412
+
1413
+ **Supported Platforms:**
1414
+
1415
+ | Platform | ID | Confidence | Detection Method |
1416
+ |----------|-----|------------|------------------|
1417
+ | GitHub | `github` | High | Public API |
1418
+ | Twitter/X | `twitter` | High | oembed API |
1419
+ | npm | `npm` | High | Registry API |
1420
+ | PyPI | `pypi` | High | Package API |
1421
+ | Reddit | `reddit` | High | Profile check |
1422
+ | YouTube | `youtube` | Medium | Channel page |
1423
+ | ProductHunt | `producthunt` | Medium | Profile page |
1424
+ | Instagram | `instagram` | Low | Blocks automation |
1425
+ | LinkedIn | `linkedin` | Low | Blocks automation |
1426
+ | TikTok | `tiktok` | Low | Blocks automation |
1427
+
1428
+ **Response Type:**
1429
+
1430
+ ```typescript
1431
+ interface CheckSocialsResponse {
1432
+ name: string; // Username checked
1433
+ results: Array<{
1434
+ platform: string; // Platform ID (github, twitter, etc.)
1435
+ available: boolean; // Whether username is available
1436
+ confidence: "high" | "medium" | "low";
1437
+ url: string; // Direct URL to profile/claim page
1438
+ error?: string; // Error message if check failed
1439
+ errorCode?: string; // RATE_LIMIT, TIMEOUT, BLOCKED, etc.
1440
+ responseTime?: number; // Check duration in ms
1441
+ }>;
1442
+ insights: string[]; // Human-readable summary
1443
+ summary: {
1444
+ available: number; // Count of available platforms
1445
+ taken: number; // Count of taken platforms
1446
+ unknown: number; // Count of low-confidence/error platforms
1447
+ };
1448
+ }
1449
+ ```
1450
+
1451
+ ---
1452
+
1453
+ #### Quick Start: Check GitHub, Twitter, and Instagram
1454
+
1455
+ This is the most common use case - verify username on the three main platforms:
1456
+
1457
+ ```typescript
1458
+ // Quick Start: Check 'myproject' on GitHub, Twitter, and Instagram simultaneously
1459
+
1460
+ import { checkSocials } from 'domain-search-mcp';
1461
+
1462
+ async function checkUsernameOnMainPlatforms(username: string) {
1463
+ // Call check_socials with the three platforms
1464
+ const result = await checkSocials({
1465
+ name: username,
1466
+ platforms: ["github", "twitter", "instagram"]
1467
+ });
1468
+
1469
+ // Process results
1470
+ console.log(`\nChecking "${username}" on GitHub, Twitter, Instagram:\n`);
1471
+
1472
+ for (const platform of result.results) {
1473
+ const status = platform.available ? "✅ Available" : "❌ Taken";
1474
+ const confidence = platform.confidence === "low" ? " (verify manually)" : "";
1475
+ console.log(` ${platform.platform.padEnd(12)} ${status}${confidence}`);
1476
+ console.log(` └─ ${platform.url}`);
1477
+ }
1478
+
1479
+ // Summary
1480
+ const available = result.results.filter(r => r.available && r.confidence !== "low");
1481
+ const taken = result.results.filter(r => !r.available);
1482
+ const manual = result.results.filter(r => r.confidence === "low");
1483
+
1484
+ console.log(`\nSummary: ${available.length} available, ${taken.length} taken, ${manual.length} need manual check`);
1485
+
1486
+ return {
1487
+ available: available.map(r => ({ platform: r.platform, url: r.url })),
1488
+ taken: taken.map(r => r.platform),
1489
+ verifyManually: manual.map(r => ({ platform: r.platform, url: r.url }))
1490
+ };
1491
+ }
1492
+
1493
+ // Usage
1494
+ const result = await checkUsernameOnMainPlatforms("myproject");
1495
+
1496
+ // Output:
1497
+ // Checking "myproject" on GitHub, Twitter, Instagram:
1498
+ //
1499
+ // github ✅ Available
1500
+ // └─ https://github.com/myproject
1501
+ // twitter ❌ Taken
1502
+ // └─ https://twitter.com/myproject
1503
+ // instagram ✅ Available (verify manually)
1504
+ // └─ https://instagram.com/myproject
1505
+ //
1506
+ // Summary: 1 available, 1 taken, 1 need manual check
1507
+ ```
1508
+
1509
+ **JavaScript Quick Start:**
1510
+
1511
+ ```javascript
1512
+ // Check GitHub, Twitter, Instagram for a project name
1513
+ async function checkProjectSocials(projectName) {
1514
+ const response = await fetch('http://localhost:3000/check_socials', {
1515
+ method: 'POST',
1516
+ headers: { 'Content-Type': 'application/json' },
1517
+ body: JSON.stringify({
1518
+ name: projectName,
1519
+ platforms: ['github', 'twitter', 'instagram']
1520
+ })
1521
+ });
1522
+
1523
+ const data = await response.json();
1524
+
1525
+ // Display results
1526
+ console.log(`Social media check for "${projectName}":`);
1527
+ data.results.forEach(r => {
1528
+ const icon = r.available ? '✅' : '❌';
1529
+ const note = r.confidence === 'low' ? ' (verify manually)' : '';
1530
+ console.log(` ${icon} ${r.platform}: ${r.available ? 'Available' : 'Taken'}${note}`);
1531
+ });
1532
+
1533
+ return data;
1534
+ }
1535
+
1536
+ // Example
1537
+ const socials = await checkProjectSocials('myproject');
1538
+ // Output:
1539
+ // Social media check for "myproject":
1540
+ // ✅ github: Available
1541
+ // ❌ twitter: Taken
1542
+ // ✅ instagram: Available (verify manually)
1543
+ ```
1544
+
1545
+ ---
1546
+
1547
+ **Basic Example:**
1331
1548
 
1332
1549
  ```typescript
1333
1550
  // Input
@@ -1340,15 +1557,31 @@ Verify username availability across 10 platforms:
1340
1557
  {
1341
1558
  "name": "vibecoding",
1342
1559
  "results": [
1343
- { "platform": "github", "available": true, "confidence": "high" },
1344
- { "platform": "twitter", "available": false, "confidence": "high" },
1345
- { "platform": "instagram", "available": true, "confidence": "low" }
1560
+ {
1561
+ "platform": "github",
1562
+ "available": true,
1563
+ "confidence": "high",
1564
+ "url": "https://github.com/vibecoding"
1565
+ },
1566
+ {
1567
+ "platform": "twitter",
1568
+ "available": false,
1569
+ "confidence": "high",
1570
+ "url": "https://twitter.com/vibecoding"
1571
+ },
1572
+ {
1573
+ "platform": "instagram",
1574
+ "available": true,
1575
+ "confidence": "low",
1576
+ "url": "https://instagram.com/vibecoding"
1577
+ }
1346
1578
  ],
1347
1579
  "insights": [
1348
1580
  "✅ vibecoding is available on: github",
1349
1581
  "❌ vibecoding is taken on: twitter",
1350
1582
  "⚠️ Could not reliably check: instagram (check manually)"
1351
- ]
1583
+ ],
1584
+ "summary": { "available": 2, "taken": 1, "unknown": 0 }
1352
1585
  }
1353
1586
  ```
1354
1587
 
@@ -2086,6 +2319,215 @@ Add to `.cursor/mcp.json`:
2086
2319
 
2087
2320
  Add to your Cline settings to enable MCP servers.
2088
2321
 
2322
+ ### MCP Tool Invocation Patterns
2323
+
2324
+ When using Domain Search MCP through an MCP-compatible client (Claude Desktop, Cursor, etc.), tools are invoked using the standard MCP tool call pattern:
2325
+
2326
+ #### Basic MCP Tool Call Structure
2327
+
2328
+ ```typescript
2329
+ // MCP tool invocation pattern (as handled by the MCP client)
2330
+ // The client sends a tool_call request to the MCP server:
2331
+
2332
+ // Tool: search_domain
2333
+ {
2334
+ "tool": "search_domain",
2335
+ "arguments": {
2336
+ "domain_name": "vibecoding",
2337
+ "tlds": ["com", "io", "dev"]
2338
+ }
2339
+ }
2340
+
2341
+ // Tool: check_socials
2342
+ {
2343
+ "tool": "check_socials",
2344
+ "arguments": {
2345
+ "name": "myproject",
2346
+ "platforms": ["github", "twitter", "instagram"]
2347
+ }
2348
+ }
2349
+
2350
+ // Tool: suggest_domains
2351
+ {
2352
+ "tool": "suggest_domains",
2353
+ "arguments": {
2354
+ "base_name": "techapp",
2355
+ "tld": "com",
2356
+ "max_suggestions": 10,
2357
+ "variants": ["prefixes", "suffixes", "hyphen"]
2358
+ }
2359
+ }
2360
+ ```
2361
+
2362
+ #### MCP Tool Invocation via Claude Desktop
2363
+
2364
+ When using Claude Desktop, simply describe what you want in natural language:
2365
+
2366
+ ```
2367
+ User: "Check if 'myproject' is available as a domain and on GitHub"
2368
+
2369
+ Claude invokes MCP tools:
2370
+ 1. search_domain({ domain_name: "myproject", tlds: ["com", "io", "dev"] })
2371
+ 2. check_socials({ name: "myproject", platforms: ["github"] })
2372
+
2373
+ Response: Shows domain availability with pricing and GitHub username status
2374
+ ```
2375
+
2376
+ #### Quick Reference: All MCP Tool Names
2377
+
2378
+ | MCP Tool Name | Purpose | Primary Arguments |
2379
+ |---------------|---------|-------------------|
2380
+ | `search_domain` | Check availability + pricing | `domain_name`, `tlds[]` |
2381
+ | `bulk_search` | Check up to 100 domains | `domains[]`, `tld` |
2382
+ | `compare_registrars` | Compare prices | `domain`, `tld` |
2383
+ | `suggest_domains` | Get variations when taken | `base_name`, `tld`, `variants[]` |
2384
+ | `suggest_domains_smart` | AI-powered suggestions | `query`, `tld`, `style` |
2385
+ | `tld_info` | TLD details + restrictions | `tld`, `detailed` |
2386
+ | `check_socials` | Social username check | `name`, `platforms[]` |
2387
+
2388
+ #### Programmatic MCP Tool Invocation (via MCP SDK)
2389
+
2390
+ ```typescript
2391
+ import { Client } from "@modelcontextprotocol/sdk/client/index.js";
2392
+
2393
+ // Initialize MCP client
2394
+ const client = new Client({
2395
+ name: "domain-search-client",
2396
+ version: "1.0.0"
2397
+ });
2398
+
2399
+ // Connect to the domain-search-mcp server
2400
+ await client.connect(transport);
2401
+
2402
+ // Invoke MCP tools programmatically
2403
+ const domainResult = await client.callTool({
2404
+ name: "search_domain",
2405
+ arguments: {
2406
+ domain_name: "myproject",
2407
+ tlds: ["com", "io"]
2408
+ }
2409
+ });
2410
+
2411
+ const socialResult = await client.callTool({
2412
+ name: "check_socials",
2413
+ arguments: {
2414
+ name: "myproject",
2415
+ platforms: ["github", "twitter", "instagram"]
2416
+ }
2417
+ });
2418
+
2419
+ console.log("Domain results:", domainResult);
2420
+ console.log("Social results:", socialResult);
2421
+ ```
2422
+
2423
+ ### Running as Local HTTP Server
2424
+
2425
+ Domain Search MCP can also run as a standalone HTTP server for direct API access:
2426
+
2427
+ #### Quick Start: Local Server Setup
2428
+
2429
+ ```bash
2430
+ # Step 1: Clone and install
2431
+ git clone https://github.com/dorukardahan/domain-search-mcp.git
2432
+ cd domain-search-mcp
2433
+ npm install
2434
+
2435
+ # Step 2: Build the server
2436
+ npm run build
2437
+
2438
+ # Step 3: Start the HTTP server
2439
+ npm start
2440
+
2441
+ # Server runs at http://localhost:3000
2442
+ ```
2443
+
2444
+ #### Local Server Configuration
2445
+
2446
+ ```bash
2447
+ # Optional: Configure environment before starting
2448
+ cp .env.example .env
2449
+
2450
+ # Edit .env to add API keys (optional but recommended)
2451
+ # PORKBUN_API_KEY=pk1_...
2452
+ # PORKBUN_SECRET_KEY=sk1_...
2453
+
2454
+ # Set custom port (default: 3000)
2455
+ export PORT=3001
2456
+
2457
+ # Start server
2458
+ npm start
2459
+ ```
2460
+
2461
+ #### Making API Requests to Local Server
2462
+
2463
+ Once the server is running, you can make HTTP requests:
2464
+
2465
+ ```bash
2466
+ # Check domain availability
2467
+ curl -X POST http://localhost:3000/search_domain \
2468
+ -H "Content-Type: application/json" \
2469
+ -d '{"domain_name": "myproject", "tlds": ["com", "io"]}'
2470
+
2471
+ # Check social media usernames
2472
+ curl -X POST http://localhost:3000/check_socials \
2473
+ -H "Content-Type: application/json" \
2474
+ -d '{"name": "myproject", "platforms": ["github", "twitter"]}'
2475
+
2476
+ # Bulk search 50 domains
2477
+ curl -X POST http://localhost:3000/bulk_search \
2478
+ -H "Content-Type: application/json" \
2479
+ -d '{"domains": ["name1", "name2", "name3"], "tld": "com"}'
2480
+ ```
2481
+
2482
+ #### JavaScript/Node.js Local Server Integration
2483
+
2484
+ ```javascript
2485
+ // Complete local server integration example
2486
+
2487
+ const BASE_URL = 'http://localhost:3000';
2488
+
2489
+ // Initialize connection to local domain-search server
2490
+ async function initializeDomainSearch() {
2491
+ try {
2492
+ // Test server connection
2493
+ const response = await fetch(`${BASE_URL}/search_domain`, {
2494
+ method: 'POST',
2495
+ headers: { 'Content-Type': 'application/json' },
2496
+ body: JSON.stringify({
2497
+ domain_name: 'test-connection',
2498
+ tlds: ['com']
2499
+ })
2500
+ });
2501
+
2502
+ if (response.ok) {
2503
+ console.log('✅ Domain Search server connected');
2504
+ return true;
2505
+ }
2506
+ throw new Error('Server not responding');
2507
+ } catch (error) {
2508
+ console.error('❌ Failed to connect to server:', error.message);
2509
+ console.error('Make sure to run: npm start');
2510
+ return false;
2511
+ }
2512
+ }
2513
+
2514
+ // Usage
2515
+ const connected = await initializeDomainSearch();
2516
+ if (connected) {
2517
+ // Proceed with domain searches
2518
+ const result = await fetch(`${BASE_URL}/search_domain`, {
2519
+ method: 'POST',
2520
+ headers: { 'Content-Type': 'application/json' },
2521
+ body: JSON.stringify({
2522
+ domain_name: 'vibecoding',
2523
+ tlds: ['com', 'io', 'dev']
2524
+ })
2525
+ }).then(r => r.json());
2526
+
2527
+ console.log(`Found ${result.results.filter(r => r.available).length} available domains`);
2528
+ }
2529
+ ```
2530
+
2089
2531
  ## Development
2090
2532
 
2091
2533
  ### Setup
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "domain-search-mcp",
3
- "version": "1.2.5",
3
+ "version": "1.2.6",
4
4
  "description": "Fast domain availability aggregator MCP server. Check availability across Porkbun, Namecheap, RDAP, and WHOIS. Compare pricing. Get suggestions.",
5
5
  "main": "dist/server.js",
6
6
  "types": "dist/server.d.ts",