domain-search-mcp 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.
Files changed (151) hide show
  1. package/.env.example +52 -0
  2. package/Dockerfile +15 -0
  3. package/LICENSE +21 -0
  4. package/README.md +426 -0
  5. package/SECURITY.md +252 -0
  6. package/dist/config.d.ts +25 -0
  7. package/dist/config.d.ts.map +1 -0
  8. package/dist/config.js +117 -0
  9. package/dist/config.js.map +1 -0
  10. package/dist/fallbacks/index.d.ts +6 -0
  11. package/dist/fallbacks/index.d.ts.map +1 -0
  12. package/dist/fallbacks/index.js +14 -0
  13. package/dist/fallbacks/index.js.map +1 -0
  14. package/dist/fallbacks/rdap.d.ts +18 -0
  15. package/dist/fallbacks/rdap.d.ts.map +1 -0
  16. package/dist/fallbacks/rdap.js +339 -0
  17. package/dist/fallbacks/rdap.js.map +1 -0
  18. package/dist/fallbacks/whois.d.ts +27 -0
  19. package/dist/fallbacks/whois.d.ts.map +1 -0
  20. package/dist/fallbacks/whois.js +219 -0
  21. package/dist/fallbacks/whois.js.map +1 -0
  22. package/dist/registrars/base.d.ts +89 -0
  23. package/dist/registrars/base.d.ts.map +1 -0
  24. package/dist/registrars/base.js +203 -0
  25. package/dist/registrars/base.js.map +1 -0
  26. package/dist/registrars/index.d.ts +7 -0
  27. package/dist/registrars/index.d.ts.map +1 -0
  28. package/dist/registrars/index.js +15 -0
  29. package/dist/registrars/index.js.map +1 -0
  30. package/dist/registrars/namecheap.d.ts +69 -0
  31. package/dist/registrars/namecheap.d.ts.map +1 -0
  32. package/dist/registrars/namecheap.js +307 -0
  33. package/dist/registrars/namecheap.js.map +1 -0
  34. package/dist/registrars/porkbun.d.ts +63 -0
  35. package/dist/registrars/porkbun.d.ts.map +1 -0
  36. package/dist/registrars/porkbun.js +299 -0
  37. package/dist/registrars/porkbun.js.map +1 -0
  38. package/dist/server.d.ts +19 -0
  39. package/dist/server.d.ts.map +1 -0
  40. package/dist/server.js +209 -0
  41. package/dist/server.js.map +1 -0
  42. package/dist/services/domain-search.d.ts +40 -0
  43. package/dist/services/domain-search.d.ts.map +1 -0
  44. package/dist/services/domain-search.js +438 -0
  45. package/dist/services/domain-search.js.map +1 -0
  46. package/dist/services/index.d.ts +5 -0
  47. package/dist/services/index.d.ts.map +1 -0
  48. package/dist/services/index.js +11 -0
  49. package/dist/services/index.js.map +1 -0
  50. package/dist/tools/bulk_search.d.ts +72 -0
  51. package/dist/tools/bulk_search.d.ts.map +1 -0
  52. package/dist/tools/bulk_search.js +108 -0
  53. package/dist/tools/bulk_search.js.map +1 -0
  54. package/dist/tools/check_socials.d.ts +71 -0
  55. package/dist/tools/check_socials.d.ts.map +1 -0
  56. package/dist/tools/check_socials.js +357 -0
  57. package/dist/tools/check_socials.js.map +1 -0
  58. package/dist/tools/compare_registrars.d.ts +80 -0
  59. package/dist/tools/compare_registrars.d.ts.map +1 -0
  60. package/dist/tools/compare_registrars.js +116 -0
  61. package/dist/tools/compare_registrars.js.map +1 -0
  62. package/dist/tools/index.d.ts +10 -0
  63. package/dist/tools/index.d.ts.map +1 -0
  64. package/dist/tools/index.js +31 -0
  65. package/dist/tools/index.js.map +1 -0
  66. package/dist/tools/search_domain.d.ts +61 -0
  67. package/dist/tools/search_domain.d.ts.map +1 -0
  68. package/dist/tools/search_domain.js +81 -0
  69. package/dist/tools/search_domain.js.map +1 -0
  70. package/dist/tools/suggest_domains.d.ts +82 -0
  71. package/dist/tools/suggest_domains.d.ts.map +1 -0
  72. package/dist/tools/suggest_domains.js +227 -0
  73. package/dist/tools/suggest_domains.js.map +1 -0
  74. package/dist/tools/tld_info.d.ts +56 -0
  75. package/dist/tools/tld_info.d.ts.map +1 -0
  76. package/dist/tools/tld_info.js +273 -0
  77. package/dist/tools/tld_info.js.map +1 -0
  78. package/dist/types.d.ts +193 -0
  79. package/dist/types.d.ts.map +1 -0
  80. package/dist/types.js +9 -0
  81. package/dist/types.js.map +1 -0
  82. package/dist/utils/cache.d.ts +81 -0
  83. package/dist/utils/cache.d.ts.map +1 -0
  84. package/dist/utils/cache.js +192 -0
  85. package/dist/utils/cache.js.map +1 -0
  86. package/dist/utils/errors.d.ts +87 -0
  87. package/dist/utils/errors.d.ts.map +1 -0
  88. package/dist/utils/errors.js +191 -0
  89. package/dist/utils/errors.js.map +1 -0
  90. package/dist/utils/index.d.ts +8 -0
  91. package/dist/utils/index.d.ts.map +1 -0
  92. package/dist/utils/index.js +24 -0
  93. package/dist/utils/index.js.map +1 -0
  94. package/dist/utils/logger.d.ts +27 -0
  95. package/dist/utils/logger.d.ts.map +1 -0
  96. package/dist/utils/logger.js +132 -0
  97. package/dist/utils/logger.js.map +1 -0
  98. package/dist/utils/premium-analyzer.d.ts +33 -0
  99. package/dist/utils/premium-analyzer.d.ts.map +1 -0
  100. package/dist/utils/premium-analyzer.js +273 -0
  101. package/dist/utils/premium-analyzer.js.map +1 -0
  102. package/dist/utils/validators.d.ts +53 -0
  103. package/dist/utils/validators.d.ts.map +1 -0
  104. package/dist/utils/validators.js +159 -0
  105. package/dist/utils/validators.js.map +1 -0
  106. package/docs/marketing/devto-post.md +135 -0
  107. package/docs/marketing/hackernews.md +42 -0
  108. package/docs/marketing/producthunt.md +109 -0
  109. package/docs/marketing/reddit-post.md +59 -0
  110. package/docs/marketing/twitter-thread.md +105 -0
  111. package/examples/bulk-search-50-domains.ts +131 -0
  112. package/examples/cli-interactive.ts +280 -0
  113. package/examples/compare-registrars.ts +78 -0
  114. package/examples/search-single-domain.ts +54 -0
  115. package/examples/suggest-names.ts +110 -0
  116. package/glama.json +6 -0
  117. package/jest.config.js +35 -0
  118. package/package.json +62 -0
  119. package/smithery.yaml +36 -0
  120. package/src/config.ts +121 -0
  121. package/src/fallbacks/index.ts +6 -0
  122. package/src/fallbacks/rdap.ts +407 -0
  123. package/src/fallbacks/whois.ts +250 -0
  124. package/src/registrars/base.ts +264 -0
  125. package/src/registrars/index.ts +7 -0
  126. package/src/registrars/namecheap.ts +378 -0
  127. package/src/registrars/porkbun.ts +380 -0
  128. package/src/server.ts +276 -0
  129. package/src/services/domain-search.ts +567 -0
  130. package/src/services/index.ts +9 -0
  131. package/src/tools/bulk_search.ts +142 -0
  132. package/src/tools/check_socials.ts +467 -0
  133. package/src/tools/compare_registrars.ts +162 -0
  134. package/src/tools/index.ts +45 -0
  135. package/src/tools/search_domain.ts +93 -0
  136. package/src/tools/suggest_domains.ts +284 -0
  137. package/src/tools/tld_info.ts +294 -0
  138. package/src/types.ts +289 -0
  139. package/src/utils/cache.ts +238 -0
  140. package/src/utils/errors.ts +262 -0
  141. package/src/utils/index.ts +8 -0
  142. package/src/utils/logger.ts +162 -0
  143. package/src/utils/premium-analyzer.ts +303 -0
  144. package/src/utils/validators.ts +193 -0
  145. package/tests/premium-analyzer.test.ts +310 -0
  146. package/tests/unit/cache.test.ts +123 -0
  147. package/tests/unit/errors.test.ts +190 -0
  148. package/tests/unit/tld-info.test.ts +62 -0
  149. package/tests/unit/tools.test.ts +200 -0
  150. package/tests/unit/validators.test.ts +146 -0
  151. package/tsconfig.json +25 -0
package/.env.example ADDED
@@ -0,0 +1,52 @@
1
+ # ═══════════════════════════════════════════════════════════════════════════
2
+ # Domain Search MCP - Environment Configuration
3
+ # ═══════════════════════════════════════════════════════════════════════════
4
+ # Copy this file to .env and fill in your API keys.
5
+ # All API keys are OPTIONAL - the server works without them using RDAP/WHOIS.
6
+ # ═══════════════════════════════════════════════════════════════════════════
7
+
8
+ # ─────────────────────────────────────────────────────────────────────────────
9
+ # PORKBUN API (Recommended - fast & accurate)
10
+ # Get your free API key at: https://porkbun.com/account/api
11
+ # ─────────────────────────────────────────────────────────────────────────────
12
+ PORKBUN_API_KEY=your_api_key_here
13
+ PORKBUN_API_SECRET=your_api_secret_here
14
+
15
+ # ─────────────────────────────────────────────────────────────────────────────
16
+ # NAMECHEAP API (Optional - requires IP whitelist)
17
+ # Get API access at: https://www.namecheap.com/support/api/intro/
18
+ # Note: You must whitelist your IP in Namecheap dashboard
19
+ # ─────────────────────────────────────────────────────────────────────────────
20
+ NAMECHEAP_API_KEY=your_api_key_here
21
+ NAMECHEAP_API_USER=your_username_here
22
+ # REQUIRED for Namecheap: Your whitelisted IP address
23
+ # Find your IP at: https://whatismyipaddress.com/
24
+ # SECURITY: This prevents IP disclosure to third-party services
25
+ NAMECHEAP_CLIENT_IP=your_whitelisted_ip_here
26
+
27
+ # ─────────────────────────────────────────────────────────────────────────────
28
+ # LOGGING & DEBUG
29
+ # ─────────────────────────────────────────────────────────────────────────────
30
+ LOG_LEVEL=info # debug | info | warn | error
31
+
32
+ # ─────────────────────────────────────────────────────────────────────────────
33
+ # CACHE SETTINGS (in seconds)
34
+ # ─────────────────────────────────────────────────────────────────────────────
35
+ CACHE_TTL_AVAILABILITY=300 # 5 minutes - availability can change
36
+ CACHE_TTL_PRICING=3600 # 1 hour - pricing rarely changes
37
+
38
+ # ─────────────────────────────────────────────────────────────────────────────
39
+ # RATE LIMITING
40
+ # ─────────────────────────────────────────────────────────────────────────────
41
+ RATE_LIMIT_PER_MINUTE=60 # Max requests per minute
42
+
43
+ # ─────────────────────────────────────────────────────────────────────────────
44
+ # TLD RESTRICTIONS (comma-separated, no spaces)
45
+ # ─────────────────────────────────────────────────────────────────────────────
46
+ ALLOWED_TLDS=com,io,dev,app,co,net,org,xyz,ai,sh,me,cc
47
+ DENY_TLDS=localhost,internal,test,local
48
+
49
+ # ─────────────────────────────────────────────────────────────────────────────
50
+ # DEVELOPMENT ONLY
51
+ # ─────────────────────────────────────────────────────────────────────────────
52
+ DRY_RUN=false # If true, no actual API calls made
package/Dockerfile ADDED
@@ -0,0 +1,15 @@
1
+ FROM node:20-slim
2
+
3
+ WORKDIR /app
4
+
5
+ # Copy package files
6
+ COPY package*.json ./
7
+
8
+ # Install dependencies
9
+ RUN npm ci --production
10
+
11
+ # Copy built files
12
+ COPY dist/ ./dist/
13
+
14
+ # Run the server
15
+ CMD ["node", "dist/index.js"]
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Doruk Ardahan
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,426 @@
1
+ # Domain Search MCP
2
+
3
+ <a href="https://glama.ai/mcp/servers/@dorukardahan/domain-search-mcp">
4
+ <img width="380" height="200" src="https://glama.ai/mcp/servers/@dorukardahan/domain-search-mcp/badge" alt="Domain Search MCP on Glama" />
5
+ </a>
6
+
7
+ Fast domain availability aggregator for AI assistants. Check domain availability across Porkbun, Namecheap, RDAP, and WHOIS. Compare pricing. Get suggestions.
8
+
9
+ Built with the [Model Context Protocol (MCP)](https://anthropic.com/model-context-protocol) for seamless integration with Claude Desktop, Cursor, Cline, and other AI tools.
10
+
11
+ ## Get Started in 60 Seconds
12
+
13
+ ### 1. Install
14
+
15
+ ```bash
16
+ # Clone the repository
17
+ git clone https://github.com/dorukardahan/domain-search-mcp.git
18
+ cd domain-search-mcp
19
+
20
+ # Install dependencies
21
+ npm install
22
+
23
+ # Build
24
+ npm run build
25
+ ```
26
+
27
+ ### 2. Configure Claude Desktop
28
+
29
+ Add to your Claude Desktop configuration (`~/Library/Application Support/Claude/claude_desktop_config.json` on Mac):
30
+
31
+ ```json
32
+ {
33
+ "mcpServers": {
34
+ "domain-search": {
35
+ "command": "node",
36
+ "args": ["/path/to/domain-search-mcp/dist/server.js"]
37
+ }
38
+ }
39
+ }
40
+ ```
41
+
42
+ ### 3. Start Searching
43
+
44
+ Open Claude Desktop and ask:
45
+
46
+ > "Check if vibecoding is available as a domain"
47
+
48
+ Claude will use the MCP server to search `.com`, `.io`, and `.dev` by default:
49
+
50
+ ```
51
+ vibecoding.com - Available - $8.95/year (Porkbun)
52
+ vibecoding.io - Available - $29.88/year (Porkbun)
53
+ vibecoding.dev - Available - $10.18/year (Porkbun)
54
+
55
+ ✅ 3 domains available! Best price: vibecoding.com at $8.95/year
56
+ 💡 .com is the classic, universal choice — trusted worldwide
57
+ 💡 .io is popular with tech startups and SaaS products
58
+ ```
59
+
60
+ ## Features
61
+
62
+ ### 6 Powerful Tools
63
+
64
+ | Tool | What it does |
65
+ |------|--------------|
66
+ | **search_domain** | Check availability across multiple TLDs with pricing |
67
+ | **bulk_search** | Check up to 100 domains at once |
68
+ | **compare_registrars** | Find the best price across registrars |
69
+ | **suggest_domains** | Get available variations when your name is taken |
70
+ | **tld_info** | Learn about TLDs, restrictions, and typical pricing |
71
+ | **check_socials** | Verify if usernames are available on GitHub, Twitter, Instagram |
72
+
73
+ ### Works Without API Keys
74
+
75
+ The server uses **RDAP** and **WHOIS** as fallbacks, so you can start using it immediately without any API keys. However, for pricing information and faster results, we recommend configuring at least Porkbun:
76
+
77
+ ```bash
78
+ # Copy the example environment file
79
+ cp .env.example .env
80
+
81
+ # Edit and add your keys
82
+ nano .env
83
+ ```
84
+
85
+ ### Supported Registrars
86
+
87
+ | Registrar | API Type | Pricing | Notes |
88
+ |-----------|----------|---------|-------|
89
+ | **Porkbun** | JSON | Free | Fast, includes WHOIS privacy |
90
+ | **Namecheap** | XML | Free | Requires IP whitelist |
91
+
92
+ ### Fallback Protocols
93
+
94
+ | Protocol | Speed | Pricing | Authentication |
95
+ |----------|-------|---------|----------------|
96
+ | **RDAP** | Fast | No | None required |
97
+ | **WHOIS** | Slow | No | None required |
98
+
99
+ ## Tool Examples
100
+
101
+ ### search_domain
102
+
103
+ Check if a domain is available across multiple TLDs:
104
+
105
+ ```typescript
106
+ // Input
107
+ {
108
+ "domain_name": "vibecoding",
109
+ "tlds": ["com", "io", "dev"]
110
+ }
111
+
112
+ // Output
113
+ {
114
+ "results": [
115
+ {
116
+ "domain": "vibecoding.com",
117
+ "available": true,
118
+ "price_first_year": 8.95,
119
+ "price_renewal": 8.95,
120
+ "privacy_included": true,
121
+ "registrar": "porkbun",
122
+ "source": "porkbun_api"
123
+ },
124
+ // ... more results
125
+ ],
126
+ "insights": [
127
+ "✅ 3 domains available! Best price: vibecoding.com at $8.95/year",
128
+ "💡 .com is the classic, universal choice — trusted worldwide"
129
+ ],
130
+ "next_steps": [
131
+ "Check social handle availability (GitHub, X, Instagram)",
132
+ "Register vibecoding.com at porkbun to secure it"
133
+ ]
134
+ }
135
+ ```
136
+
137
+ ### bulk_search
138
+
139
+ Check many domains at once:
140
+
141
+ ```typescript
142
+ // Input
143
+ {
144
+ "domains": ["vibecoding", "coolstartup", "myawesomeapp"],
145
+ "tld": "io"
146
+ }
147
+
148
+ // Output
149
+ {
150
+ "results": [/* array of domain results */],
151
+ "summary": {
152
+ "total": 3,
153
+ "available": 2,
154
+ "taken": 1,
155
+ "errors": 0
156
+ },
157
+ "insights": [
158
+ "✅ 2 of 3 domains available",
159
+ "💰 Best price: vibecoding.io at $29.88/year"
160
+ ]
161
+ }
162
+ ```
163
+
164
+ ### compare_registrars
165
+
166
+ Find the best deal:
167
+
168
+ ```typescript
169
+ // Input
170
+ {
171
+ "domain": "vibecoding",
172
+ "tld": "com",
173
+ "registrars": ["porkbun", "namecheap"]
174
+ }
175
+
176
+ // Output
177
+ {
178
+ "domain": "vibecoding.com",
179
+ "what_happened": "Compared pricing across 2 registrars",
180
+ "best_first_year": { "registrar": "namecheap", "price": 8.88 },
181
+ "best_renewal": { "registrar": "porkbun", "price": 8.95 },
182
+ "recommendation": "Namecheap for first year ($0.07 savings), Porkbun for renewal stability"
183
+ }
184
+ ```
185
+
186
+ ### suggest_domains
187
+
188
+ Get variations when your preferred name is taken:
189
+
190
+ ```typescript
191
+ // Input
192
+ {
193
+ "base_name": "vibecoding",
194
+ "tld": "com",
195
+ "max_suggestions": 5
196
+ }
197
+
198
+ // Output
199
+ {
200
+ "suggestions": [
201
+ { "domain": "getvibecoding.com", "price_first_year": 8.95 },
202
+ { "domain": "vibecodingapp.com", "price_first_year": 8.95 },
203
+ { "domain": "tryvibecoding.com", "price_first_year": 8.95 }
204
+ ],
205
+ "insights": [
206
+ "✅ Found 5 available variations",
207
+ "⭐ Top suggestion: getvibecoding.com ($8.95/year)"
208
+ ]
209
+ }
210
+ ```
211
+
212
+ ### tld_info
213
+
214
+ Learn about a TLD:
215
+
216
+ ```typescript
217
+ // Input
218
+ {
219
+ "tld": "dev"
220
+ }
221
+
222
+ // Output
223
+ {
224
+ "tld": "dev",
225
+ "description": "Developer - for software developers and their projects",
226
+ "typical_use": "Developer portfolios, tools, documentation sites",
227
+ "price_range": { "min": 10.18, "max": 19.99, "currency": "USD" },
228
+ "restrictions": ["Requires HTTPS (HSTS preloaded)"],
229
+ "popularity": "medium",
230
+ "recommendation": "Ideal for developers and tech portfolios (requires HTTPS)"
231
+ }
232
+ ```
233
+
234
+ ### check_socials
235
+
236
+ Verify username availability:
237
+
238
+ ```typescript
239
+ // Input
240
+ {
241
+ "name": "vibecoding",
242
+ "platforms": ["github", "twitter", "instagram"]
243
+ }
244
+
245
+ // Output
246
+ {
247
+ "name": "vibecoding",
248
+ "results": [
249
+ { "platform": "github", "available": true, "confidence": "high" },
250
+ { "platform": "twitter", "available": false, "confidence": "medium" },
251
+ { "platform": "instagram", "available": true, "confidence": "low" }
252
+ ],
253
+ "insights": [
254
+ "✅ vibecoding is available on: github",
255
+ "❌ vibecoding is taken on: twitter",
256
+ "⚠️ Could not reliably check: instagram (check manually)"
257
+ ]
258
+ }
259
+ ```
260
+
261
+ ## Configuration
262
+
263
+ ### Environment Variables
264
+
265
+ Create a `.env` file based on `.env.example`:
266
+
267
+ ```bash
268
+ # Porkbun API (optional, but recommended for pricing)
269
+ # Get your free key at: https://porkbun.com/account/api
270
+ PORKBUN_API_KEY=your_api_key_here
271
+ PORKBUN_API_SECRET=your_api_secret_here
272
+
273
+ # Namecheap API (optional, requires IP whitelist)
274
+ NAMECHEAP_API_KEY=your_api_key_here
275
+ NAMECHEAP_API_USER=your_username_here
276
+
277
+ # Logging
278
+ LOG_LEVEL=info # debug | info | warn | error
279
+
280
+ # Cache TTLs (in seconds)
281
+ CACHE_TTL_AVAILABILITY=300 # 5 minutes
282
+ CACHE_TTL_PRICING=3600 # 1 hour
283
+
284
+ # Rate limiting
285
+ RATE_LIMIT_PER_MINUTE=60
286
+
287
+ # TLD restrictions (comma-separated)
288
+ ALLOWED_TLDS=com,io,dev,app,co,net,org,xyz,ai,sh,me,cc
289
+ DENY_TLDS=localhost,internal,test,local
290
+ ```
291
+
292
+ ### IDE Integration
293
+
294
+ #### Cursor
295
+
296
+ Add to `.cursor/mcp.json`:
297
+
298
+ ```json
299
+ {
300
+ "servers": {
301
+ "domain-search": {
302
+ "command": "node",
303
+ "args": ["/path/to/domain-search-mcp/dist/server.js"]
304
+ }
305
+ }
306
+ }
307
+ ```
308
+
309
+ #### Cline
310
+
311
+ Add to your Cline settings to enable MCP servers.
312
+
313
+ ## Development
314
+
315
+ ### Setup
316
+
317
+ ```bash
318
+ # Install dependencies
319
+ npm install
320
+
321
+ # Run in development mode (hot reload)
322
+ npm run dev
323
+
324
+ # Build for production
325
+ npm run build
326
+
327
+ # Run tests
328
+ npm test
329
+
330
+ # Run tests with coverage
331
+ npm run coverage
332
+ ```
333
+
334
+ ### Project Structure
335
+
336
+ ```
337
+ domain-search-mcp/
338
+ ├── src/
339
+ │ ├── server.ts # MCP server entry point
340
+ │ ├── config.ts # Environment configuration
341
+ │ ├── types.ts # TypeScript interfaces
342
+ │ ├── tools/ # MCP tool implementations
343
+ │ │ ├── search_domain.ts
344
+ │ │ ├── bulk_search.ts
345
+ │ │ ├── compare_registrars.ts
346
+ │ │ ├── suggest_domains.ts
347
+ │ │ ├── tld_info.ts
348
+ │ │ └── check_socials.ts
349
+ │ ├── registrars/ # Registrar adapters
350
+ │ │ ├── base.ts
351
+ │ │ ├── porkbun.ts
352
+ │ │ └── namecheap.ts
353
+ │ ├── fallbacks/ # RDAP and WHOIS fallbacks
354
+ │ │ ├── rdap.ts
355
+ │ │ └── whois.ts
356
+ │ ├── services/ # Business logic
357
+ │ │ └── domain-search.ts
358
+ │ └── utils/ # Utilities
359
+ │ ├── logger.ts
360
+ │ ├── cache.ts
361
+ │ ├── errors.ts
362
+ │ └── validators.ts
363
+ ├── tests/
364
+ │ ├── unit/
365
+ │ └── integration/
366
+ ├── examples/
367
+ ├── package.json
368
+ ├── tsconfig.json
369
+ └── README.md
370
+ ```
371
+
372
+ ## Error Handling
373
+
374
+ The server provides user-friendly error messages with suggested actions:
375
+
376
+ ```json
377
+ {
378
+ "error": true,
379
+ "code": "RATE_LIMIT",
380
+ "message": "Too many requests to porkbun. Please slow down.",
381
+ "retryable": true,
382
+ "suggestedAction": "Wait 30 seconds before trying again."
383
+ }
384
+ ```
385
+
386
+ ### Error Codes
387
+
388
+ | Code | Description | Retryable |
389
+ |------|-------------|-----------|
390
+ | `INVALID_DOMAIN` | Domain name format is invalid | No |
391
+ | `UNSUPPORTED_TLD` | TLD is not supported | No |
392
+ | `RATE_LIMIT` | Too many requests | Yes |
393
+ | `AUTH_ERROR` | API credentials invalid | No |
394
+ | `REGISTRAR_API_ERROR` | Registrar API failed | Depends |
395
+ | `NO_SOURCE_AVAILABLE` | All sources failed | Yes |
396
+ | `TIMEOUT` | Request timed out | Yes |
397
+
398
+ ## Security
399
+
400
+ - API keys are never logged (automatic secret masking)
401
+ - Structured JSON logging for audit trails
402
+ - No PII stored or logged
403
+ - Rate limiting to prevent abuse
404
+
405
+ ## Contributing
406
+
407
+ 1. Fork the repository
408
+ 2. Create a feature branch: `git checkout -b feature/amazing-feature`
409
+ 3. Commit your changes: `git commit -m 'Add amazing feature'`
410
+ 4. Push to the branch: `git push origin feature/amazing-feature`
411
+ 5. Open a Pull Request
412
+
413
+ ## License
414
+
415
+ MIT License - see [LICENSE](LICENSE) for details.
416
+
417
+ ## Links
418
+
419
+ - [MCP Protocol Documentation](https://anthropic.com/model-context-protocol)
420
+ - [Porkbun API Docs](https://porkbun.com/api/json/v3/documentation)
421
+ - [Namecheap API Docs](https://www.namecheap.com/support/api/intro/)
422
+ - [RDAP RFC 7480](https://datatracker.ietf.org/doc/html/rfc7480)
423
+
424
+ ---
425
+
426
+ Built with care for the vibecoding community. Magic in under 60 seconds.