@serpstat/serpstat-mcp-server 1.1.1 → 1.1.3

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 (43) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/README.md +147 -80
  3. package/dist/handlers/domain_tools.d.ts +16 -0
  4. package/dist/handlers/domain_tools.d.ts.map +1 -1
  5. package/dist/handlers/domain_tools.js +133 -1
  6. package/dist/handlers/domain_tools.js.map +1 -1
  7. package/dist/http-server.d.ts +8 -0
  8. package/dist/http-server.d.ts.map +1 -0
  9. package/dist/http-server.js +202 -0
  10. package/dist/http-server.js.map +1 -0
  11. package/dist/middleware/auth.d.ts +3 -0
  12. package/dist/middleware/auth.d.ts.map +1 -0
  13. package/dist/middleware/auth.js +112 -0
  14. package/dist/middleware/auth.js.map +1 -0
  15. package/dist/server.d.ts.map +1 -1
  16. package/dist/server.js +108 -66
  17. package/dist/server.js.map +1 -1
  18. package/dist/services/base.d.ts.map +1 -1
  19. package/dist/services/base.js +2 -0
  20. package/dist/services/base.js.map +1 -1
  21. package/dist/services/domain_tools.d.ts +4 -2
  22. package/dist/services/domain_tools.d.ts.map +1 -1
  23. package/dist/services/domain_tools.js +39 -0
  24. package/dist/services/domain_tools.js.map +1 -1
  25. package/dist/transports/sse.d.ts +20 -0
  26. package/dist/transports/sse.d.ts.map +1 -0
  27. package/dist/transports/sse.js +52 -0
  28. package/dist/transports/sse.js.map +1 -0
  29. package/dist/types/serpstat.d.ts +25 -0
  30. package/dist/types/serpstat.d.ts.map +1 -1
  31. package/dist/utils/clientInfo.d.ts +9 -0
  32. package/dist/utils/clientInfo.d.ts.map +1 -0
  33. package/dist/utils/clientInfo.js +22 -0
  34. package/dist/utils/clientInfo.js.map +1 -0
  35. package/dist/utils/constants.d.ts +2 -0
  36. package/dist/utils/constants.d.ts.map +1 -1
  37. package/dist/utils/constants.js +12 -1
  38. package/dist/utils/constants.js.map +1 -1
  39. package/dist/utils/validation.d.ts +123 -0
  40. package/dist/utils/validation.d.ts.map +1 -1
  41. package/dist/utils/validation.js +38 -1
  42. package/dist/utils/validation.js.map +1 -1
  43. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.1.3] - 2025-11-27
4
+
5
+ ### Added
6
+
7
+ - **Market Research Tools**: Added two new methods for analyzing competitive landscape by market categories
8
+ - `get_market_categories` - Get complete list of available market research categories (1000+ hierarchical categories organized by industry verticals like Arts & Entertainment, Business & Industrial, E-commerce, Health & Fitness, etc.) with unique category IDs in format .X.Y.Z. for use in competitive analysis (does not consume API credits)
9
+ - `get_category_top_domains` - Get top-performing domains in a specific market category with comprehensive SEO metrics including traffic, visibility, keywords count, referring domains, backlinks, and Serpstat Domain Rank (SDR). Supports filtering by various metrics (traffic, visibility, keywords, backlinks, SDR) and sorting options (global rank, category rank, traffic, visibility). Useful for competitive landscape analysis and market leader identification (consumes 1 API credit per result row)
10
+ - Added comprehensive validation schemas and TypeScript types for market research operations
11
+ - Added test coverage for market research methods (6 new tests covering validation schemas and service methods)
12
+ - Updated documentation with market research usage examples and tools reference in README.md
13
+ - Domain Analysis Tools category now includes 8 tools (previously 6), bringing total tool count to 65 across all categories
14
+
15
+ ## [1.1.2] - 2025-10-24
16
+
17
+ ### Added
18
+
19
+ - **Category Filtering**: Added support for filtering tools by categories via `SERPSTAT_ENABLED_CATEGORIES` environment variable
20
+ - Enable only specific tool categories to reduce context window usage in AI assistants
21
+ - Comma-separated list of categories: `domain`, `keywords`, `backlinks`, `url`, `projects`, `credits`, `rt`, `audit`, `page-audit`
22
+ - Default behavior (no filter): all 63 tools available across 9 categories
23
+ - Example: `SERPSTAT_ENABLED_CATEGORIES=keywords,domain` loads only keyword research (8 tools) and domain analysis (6 tools) tools
24
+ - Useful for creating specialized configurations focused on specific SEO analysis areas
25
+ - Updated documentation with category filtering examples in README.md and CLAUDE.md
26
+ - Added category-based handler organization in `src/server.ts` for maintainable tool management
27
+
28
+
3
29
  ## [1.1.1] - 2025-10-04
4
30
 
5
31
  ### Added
package/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # Serpstat MCP Server
2
2
 
3
3
  [![npm version](https://badge.fury.io/js/@serpstat%2Fserpstat-mcp-server.svg)](https://badge.fury.io/js/@serpstat%2Fserpstat-mcp-server)
4
+ [![MCP Badge](https://lobehub.com/badge/mcp/serpstatglobal-serpstat-mcp-server-js)](https://lobehub.com/mcp/serpstatglobal-serpstat-mcp-server-js)
4
5
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
6
 
6
7
  A TypeScript server that integrates Serpstat SEO API with Anthropic's Model Context Protocol (MCP), enabling AI assistants like Claude to access comprehensive SEO data and analysis tools.
@@ -66,6 +67,7 @@ Set the following environment variables (can be in .env file):
66
67
  - `SERPSTAT_API_TOKEN` — Your Serpstat API token (required)
67
68
  - `SERPSTAT_API_URL` — Serpstat API URL (default: https://api.serpstat.com/v4)
68
69
  - `LOG_LEVEL` — Logging level: error, warn, info, debug (default: info)
70
+ - `SERPSTAT_ENABLED_CATEGORIES` — Filter tools by categories (optional, comma-separated, default: all categories enabled)
69
71
 
70
72
  ### Claude Desktop & Gemini CLI Configuration
71
73
 
@@ -104,13 +106,69 @@ For local development, use the full path:
104
106
  "command": "node",
105
107
  "args": ["/path/to/node_modules/serpstat-mcp-server/dist/index.js"],
106
108
  "env": {
107
- "SERPSTAT_API_TOKEN": "your_serpstat_api_token_here"
109
+ "SERPSTAT_API_TOKEN": "YOUR_SERPSTAT_API_TOKEN_HERE"
108
110
  }
109
111
  }
110
112
  }
111
113
  }
112
114
  ```
113
115
 
116
+ ### Filtering Tools by Category
117
+
118
+ You can limit which tools are available by specifying `SERPSTAT_ENABLED_CATEGORIES` environment variable. This is useful for:
119
+ - Reducing context window usage in AI assistants
120
+ - Focusing on specific SEO analysis areas
121
+ - Creating specialized configurations for different use cases
122
+
123
+ **Available categories:**
124
+ - `domain` - Domain analysis tools (domain info, competitors, domain keywords, etc.)
125
+ - `keywords` - Keyword research tools (keyword suggestions, search volume, difficulty, etc.)
126
+ - `backlinks` - Backlink analysis tools (backlink summary, anchors, referring domains, etc.)
127
+ - `url` - URL analysis tools (URL traffic, competitors, keywords, etc.)
128
+ - `projects` - Project management tools (create, list, delete projects)
129
+ - `credits` - Credits and usage monitoring tools
130
+ - `rt` - Rank tracking tools (rank history, SERP tracking, etc.)
131
+ - `audit` - Site audit tools (full site SEO audit, error reports, etc.)
132
+ - `page-audit` - One-page audit tools (single page analysis, on-page SEO, etc.)
133
+
134
+ **Example: Enable only keyword and domain tools**
135
+
136
+ ```json
137
+ {
138
+ "mcpServers": {
139
+ "serpstat": {
140
+ "command": "npx",
141
+ "args": ["-y", "@serpstat/serpstat-mcp-server"],
142
+ "env": {
143
+ "SERPSTAT_API_TOKEN": "YOUR_SERPSTAT_API_TOKEN_HERE",
144
+ "SERPSTAT_ENABLED_CATEGORIES": "keywords,domain"
145
+ }
146
+ }
147
+ }
148
+ }
149
+ ```
150
+
151
+ **Example: Enable only backlink analysis**
152
+
153
+ ```json
154
+ {
155
+ "mcpServers": {
156
+ "serpstat": {
157
+ "command": "npx",
158
+ "args": ["-y", "@serpstat/serpstat-mcp-server"],
159
+ "env": {
160
+ "SERPSTAT_API_TOKEN": "YOUR_SERPSTAT_API_TOKEN_HERE",
161
+ "SERPSTAT_ENABLED_CATEGORIES": "backlinks"
162
+ }
163
+ }
164
+ }
165
+ }
166
+ ```
167
+
168
+ **Default behavior (all tools enabled):**
169
+
170
+ If `SERPSTAT_ENABLED_CATEGORIES` is not specified or is empty, all tools are available (65 total tools across all categories).
171
+
114
172
  ## Usage Examples
115
173
 
116
174
  After installation and configuration in Claude Desktop, you can ask Claude:
@@ -120,6 +178,13 @@ After installation and configuration in Claude Desktop, you can ask Claude:
120
178
  - "Find competitors for **my-site.com** in Google US"
121
179
  - "Get top 50 keywords that **example.com** ranks for"
122
180
 
181
+ ### Market Research
182
+ - "Show me all available market research categories"
183
+ - "Find top domains in **'E-commerce'** category for Google US"
184
+ - "Get top 20 domains in **'/Arts & Entertainment/TV & Video'** category sorted by traffic"
185
+ - "Analyze competitive landscape in **'Business & Industrial'** category with domains that have SDR above 50"
186
+ - "Find leading players in **'Health & Fitness'** market with minimum 100k monthly traffic"
187
+
123
188
  ### Keyword Research
124
189
  - "Find related keywords to **'digital marketing'**"
125
190
  - "Get keyword suggestions for **'iphone 15'** excluding **'rent'** keywords"
@@ -162,111 +227,113 @@ After installation and configuration in Claude Desktop, you can ask Claude:
162
227
 
163
228
  ### Domain Analysis Tools
164
229
 
165
- | Tool Name | Description | Key Parameters |
166
- |--------------------------|--------------------------------------------------------------------------|--------------------------|
167
- | get_domains_info | Get SEO information for multiple domains | domains, se, filters |
168
- | get_domain_competitors | Get list of competitor domains | domain, se, size, filters|
169
- | get_domain_keywords | Get keywords that domain ranks for | domain, se, page, size |
170
- | get_domain_urls | Get URLs within a domain and their keyword counts | domain, se, page, size |
171
- | get_domain_regions_count | Get keyword count by region for a domain | domain, sort, order |
172
- | get_domain_uniq_keywords | Get unique keywords for two domains not ranked by a third domain | se, domains, minusDomain |
230
+ | Tool Name | Description | Key Parameters |
231
+ |--------------------------|---------------------------------------------------------------------------|--------------------------------------------|
232
+ | get_domains_info | Get SEO information for multiple domains | domains, se, filters |
233
+ | get_domain_competitors | Get list of competitor domains | domain, se, size, filters |
234
+ | get_domain_keywords | Get keywords that domain ranks for | domain, se, page, size |
235
+ | get_domain_urls | Get URLs within a domain and their keyword counts | domain, se, page, size |
236
+ | get_domain_regions_count | Get keyword count by region for a domain | domain, sort, order |
237
+ | get_domain_uniq_keywords | Get unique keywords for two domains not ranked by a third domain | se, domains, minusDomain |
238
+ | get_market_categories | Get complete list of 1000+ market research categories | none |
239
+ | get_category_top_domains | Get top-performing domains in a specific market category with SEO metrics | category_id, se, filters, sort, page, size |
173
240
 
174
241
  ### Keyword Research Tools
175
242
 
176
- | Tool Name | Description | Key Parameters |
177
- |-------------------------|--------------------------------------------------------------------------------------------------|----------------------------|
178
- | get_keywords | Get related organic keywords for a given keyword | keyword, se, filters |
179
- | get_related_keywords | Get semantically related keywords with frequency, CPC, competition, and difficulty data | keyword, se, filters, sort |
180
- | get_keyword_suggestions | Get search suggestions for a keyword using full-text search with geographic names info | keyword, se, filters |
181
- | get_keywords_info | Get keyword overview with volume, CPC, competition, difficulty, and SERP features | keywords, se, withIntents |
182
- | get_keyword_full_top | Get Google's top-100 search results for analyzed keywords | keyword, se, size |
183
- | get_keyword_top_urls | Get website pages that rank for the largest amount of analyzed keyword variations | keyword, se, page, page_size|
184
- | get_keyword_competitors | Get domains that rank for the given keyword in Google top-20 results with competitor analysis | keyword, se, filters, sort |
185
- | get_keyword_top | Get Google's top-100 search results for the analyzed keyword with position, URL, and SERP features| keyword, se, filters, size |
243
+ | Tool Name | Description | Key Parameters |
244
+ |-------------------------|----------------------------------------------------------------------------------------------------|------------------------------|
245
+ | get_keywords | Get related organic keywords for a given keyword | keyword, se, filters |
246
+ | get_related_keywords | Get semantically related keywords with frequency, CPC, competition, and difficulty data | keyword, se, filters, sort |
247
+ | get_keyword_suggestions | Get search suggestions for a keyword using full-text search with geographic names info | keyword, se, filters |
248
+ | get_keywords_info | Get keyword overview with volume, CPC, competition, difficulty, and SERP features | keywords, se, withIntents |
249
+ | get_keyword_full_top | Get Google's top-100 search results for analyzed keywords | keyword, se, size |
250
+ | get_keyword_top_urls | Get website pages that rank for the largest amount of analyzed keyword variations | keyword, se, page, page_size |
251
+ | get_keyword_competitors | Get domains that rank for the given keyword in Google top-20 results with competitor analysis | keyword, se, filters, sort |
252
+ | get_keyword_top | Get Google's top-100 search results for the analyzed keyword with position, URL, and SERP features | keyword, se, filters, size |
186
253
 
187
254
  ### URL Analysis Tools
188
255
 
189
- | Tool Name | Description | Key Parameters |
190
- |---------------------------|---------------------------------------------------------------------------------------------------|--------------------------|
191
- | get_url_summary_traff | Get traffic and keyword statistics for website pages matching a specific URL mask | se, domain, urlContains |
192
- | get_url_competitors | Get list of URL competitors showing domains competing for same keywords in top-10 results | se, url, sort, page |
193
- | get_url_keywords | Get keywords for which specified URL ranks in top-100 Google and top-50 Bing search results | se, url, filters, sort |
194
- | get_url_missing_keywords | Get keywords that competitors rank for but the given URL does not, identifying keyword gaps | url, se, filters, sort |
256
+ | Tool Name | Description | Key Parameters |
257
+ |--------------------------|---------------------------------------------------------------------------------------------|-------------------------|
258
+ | get_url_summary_traff | Get traffic and keyword statistics for website pages matching a specific URL mask | se, domain, urlContains |
259
+ | get_url_competitors | Get list of URL competitors showing domains competing for same keywords in top-10 results | se, url, sort, page |
260
+ | get_url_keywords | Get keywords for which specified URL ranks in top-100 Google and top-50 Bing search results | se, url, filters, sort |
261
+ | get_url_missing_keywords | Get keywords that competitors rank for but the given URL does not, identifying keyword gaps | url, se, filters, sort |
195
262
 
196
263
  ### Backlinks Analysis Tools
197
264
 
198
- | Tool Name | Description | Key Parameters |
199
- |----------------------------|-----------------------------------------------------------------------------------------------|------------------------------|
200
- | get_backlinks_summary | Get comprehensive backlinks summary with referring domains, quality metrics, and changes | domain, subdomain |
201
- | get_anchors | Get anchor text analysis for backlinks with metrics on referring domains and backlinks | query, searchType, anchor, sort|
202
- | get_active_backlinks | Get a list of active backlinks showing linking pages, target pages, and link attributes | query, searchType, sort, page|
203
- | get_referring_domains | Get a list of referring domains with domain rank metrics and referring pages count | query, searchType, sort, page|
204
- | get_lost_backlinks | Get a list of lost backlinks showing linking pages, target pages, and deletion dates | query, searchType, sort, page|
205
- | get_top_pages_by_backlinks | Get a list of top pages by backlinks with various filtering and sorting parameters | query, searchType, sort, size|
206
- | get_top10_anchors | Get TOP-10 anchors with the number of backlinks and referring domains | query, searchType |
207
- | get_backlinks_intersection | Get backlinks from domains that link to multiple analyzed sites for competitive analysis | query, intersect, sort, page |
208
- | get_active_outlinks | Get active outbound links from a domain or URL with target URLs and anchor text | query, searchType, sort, filters|
209
- | get_active_outlink_domains | Get external domains that receive outbound links from analyzed domain | query, searchType, sort, filters|
210
- | get_threat_backlinks | Get malicious backlinks pointing to analyzed domain from sites flagged for security threats | query, searchType, sort, filters|
265
+ | Tool Name | Description | Key Parameters |
266
+ |----------------------------|---------------------------------------------------------------------------------------------|----------------------------------|
267
+ | get_backlinks_summary | Get comprehensive backlinks summary with referring domains, quality metrics, and changes | domain, subdomain |
268
+ | get_anchors | Get anchor text analysis for backlinks with metrics on referring domains and backlinks | query, searchType, anchor, sort |
269
+ | get_active_backlinks | Get a list of active backlinks showing linking pages, target pages, and link attributes | query, searchType, sort, page |
270
+ | get_referring_domains | Get a list of referring domains with domain rank metrics and referring pages count | query, searchType, sort, page |
271
+ | get_lost_backlinks | Get a list of lost backlinks showing linking pages, target pages, and deletion dates | query, searchType, sort, page |
272
+ | get_top_pages_by_backlinks | Get a list of top pages by backlinks with various filtering and sorting parameters | query, searchType, sort, size |
273
+ | get_top10_anchors | Get TOP-10 anchors with the number of backlinks and referring domains | query, searchType |
274
+ | get_backlinks_intersection | Get backlinks from domains that link to multiple analyzed sites for competitive analysis | query, intersect, sort, page |
275
+ | get_active_outlinks | Get active outbound links from a domain or URL with target URLs and anchor text | query, searchType, sort, filters |
276
+ | get_active_outlink_domains | Get external domains that receive outbound links from analyzed domain | query, searchType, sort, filters |
277
+ | get_threat_backlinks | Get malicious backlinks pointing to analyzed domain from sites flagged for security threats | query, searchType, sort, filters |
211
278
 
212
279
  ### Project Management Tools
213
280
 
214
- | Tool Name | Description | Key Parameters |
215
- |----------------|--------------------------------------------------------------------------------|----------------------|
216
- | create_project | Create a new project in Serpstat for tracking SEO metrics and site audits | domain, name, groups |
217
- | delete_project | Delete an existing project from Serpstat by project ID | project_id |
218
- | list_projects | Retrieve a list of projects associated with the account with pagination | page, size |
281
+ | Tool Name | Description | Key Parameters |
282
+ |----------------|---------------------------------------------------------------------------|----------------------|
283
+ | create_project | Create a new project in Serpstat for tracking SEO metrics and site audits | domain, name, groups |
284
+ | delete_project | Delete an existing project from Serpstat by project ID | project_id |
285
+ | list_projects | Retrieve a list of projects associated with the account with pagination | page, size |
219
286
 
220
287
  ### Credits & Usage Monitoring Tools
221
288
 
222
- | Tool Name | Description | Key Parameters |
223
- |-----------------------------|----------------------------------------------------------------------------------------------|----------------|
289
+ | Tool Name | Description | Key Parameters |
290
+ |-----------------------------|---------------------------------------------------------------------------------------------|----------------|
224
291
  | get_credits_for_audit_stats | Check available audit credits (one-page audit, JavaScript scanning, crawl limits) *No cost* | none |
225
292
  | get_credits_stats | Check API credits usage, account info, and browser plugin limits *No cost* | none |
226
293
 
227
294
  ### Rank Tracking Tools
228
295
 
229
- | Tool Name | Description | Key Parameters |
230
- |-------------------------------------|--------------------------------------------------------------------------------------------------|-------------------------------|
231
- | get_rt_projects_list | Get rank tracker projects with ID, name, domain, creation date, and tracking status *No cost* | page, pageSize |
232
- | get_rt_project_status | Check if rank tracker project is parsing (true=processing, false=ready) *No cost* | projectId, regionId |
233
- | get_rt_project_regions_list | Get list of regions for a rank tracker project with status, SERP type, device, and location *No cost* | projectId |
234
- | get_rt_project_keyword_serp_history | Get Google's top-100 SERP history for rank tracker keywords with positions and URLs *No cost* | projectId, projectRegionId, page|
235
- | get_rt_project_url_serp_history | Get ranking history of URLs for rank tracker keywords with historical position data *No cost* | projectId, projectRegionId, page|
296
+ | Tool Name | Description | Key Parameters |
297
+ |-------------------------------------|-------------------------------------------------------------------------------------------------------|----------------------------------|
298
+ | get_rt_projects_list | Get rank tracker projects with ID, name, domain, creation date, and tracking status *No cost* | page, pageSize |
299
+ | get_rt_project_status | Check if rank tracker project is parsing (true=processing, false=ready) *No cost* | projectId, regionId |
300
+ | get_rt_project_regions_list | Get list of regions for a rank tracker project with status, SERP type, device, and location *No cost* | projectId |
301
+ | get_rt_project_keyword_serp_history | Get Google's top-100 SERP history for rank tracker keywords with positions and URLs *No cost* | projectId, projectRegionId, page |
302
+ | get_rt_project_url_serp_history | Get ranking history of URLs for rank tracker keywords with historical position data *No cost* | projectId, projectRegionId, page |
236
303
 
237
304
  ### Site Audit Tools
238
305
 
239
- | Tool Name | Description | Key Parameters |
240
- |-----------------------------|----------------------------------------------------------------------------------------------------------------------------------|-----------------------------|
241
- | get_site_audit_settings | Get audit settings for a project including scan parameters, scheduling, and error thresholds *No cost* | projectId |
242
- | set_site_audit_settings | Update audit settings for a project with scan configuration, scheduling, and notifications *No cost* | projectId, mainSettings, ... |
243
- | start_site_audit | Start audit session for a project and receive reportId for tracking progress (1 credit/page, 10 credits/page with JS rendering) | projectId |
244
- | stop_site_audit | Stop active audit session for a project *No cost* | projectId |
245
- | get_site_audit_results_by_categories | Get audit results statistics grouped by issue categories (pages status, meta tags, links, etc.) *No cost* | reportId |
246
- | get_site_audit_history | Get historical error count data for a specific error type across multiple audit reports *No cost* | projectId, errorName, limit, offset |
247
- | get_site_audits_list | Get list of all audit reports for a project with summary statistics and progress information *No cost* | projectId, limit, offset |
248
- | get_site_audit_scanned_urls_list | Get list of URLs that will be scanned based on project scan settings *No cost* | projectId |
249
- | get_site_audit_project_default_settings | Get default audit settings template to use when creating new projects *No cost* | - |
250
- | get_site_audit_bref_info | Get essential summary information from latest audit including SDO score, issue counts by priority, scan progress, and completion status *No cost* | reportId |
251
- | get_site_audit_deteailed_report | Get number of errors categorized by type with comparison to previous report showing countAll, countNew, and countFixed *No cost* | reportId, compareReportId (optional) |
252
- | get_site_audit_pages_spec_errors | Get list of all pages where a specific error was detected with filtering by mode (all/new/solved) and pagination support *No cost* | reportId, compareReportId, projectId, errorName, mode, limit, offset |
253
- | get_site_audit_elements_with_issues | Get list of sub-elements (URLs) containing specific errors using CRC from get_site_audit_pages_spec_errors response *No cost* | reportId, projectId, errorName, crc, compareReportId (optional), mode, limit, offset |
306
+ | Tool Name | Description | Key Parameters |
307
+ |-----------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------|
308
+ | get_site_audit_settings | Get audit settings for a project including scan parameters, scheduling, and error thresholds *No cost* | projectId |
309
+ | set_site_audit_settings | Update audit settings for a project with scan configuration, scheduling, and notifications *No cost* | projectId, mainSettings, ... |
310
+ | start_site_audit | Start audit session for a project and receive reportId for tracking progress (1 credit/page, 10 credits/page with JS rendering) | projectId |
311
+ | stop_site_audit | Stop active audit session for a project *No cost* | projectId |
312
+ | get_site_audit_results_by_categories | Get audit results statistics grouped by issue categories (pages status, meta tags, links, etc.) *No cost* | reportId |
313
+ | get_site_audit_history | Get historical error count data for a specific error type across multiple audit reports *No cost* | projectId, errorName, limit, offset |
314
+ | get_site_audits_list | Get list of all audit reports for a project with summary statistics and progress information *No cost* | projectId, limit, offset |
315
+ | get_site_audit_scanned_urls_list | Get list of URLs that will be scanned based on project scan settings *No cost* | projectId |
316
+ | get_site_audit_project_default_settings | Get default audit settings template to use when creating new projects *No cost* | - |
317
+ | get_site_audit_bref_info | Get essential summary information from latest audit including SDO score, issue counts by priority, scan progress, and completion status *No cost* | reportId |
318
+ | get_site_audit_deteailed_report | Get number of errors categorized by type with comparison to previous report showing countAll, countNew, and countFixed *No cost* | reportId, compareReportId (optional) |
319
+ | get_site_audit_pages_spec_errors | Get list of all pages where a specific error was detected with filtering by mode (all/new/solved) and pagination support *No cost* | reportId, compareReportId, projectId, errorName, mode, limit, offset |
320
+ | get_site_audit_elements_with_issues | Get list of sub-elements (URLs) containing specific errors using CRC from get_site_audit_pages_spec_errors response *No cost* | reportId, projectId, errorName, crc, compareReportId (optional), mode, limit, offset |
254
321
 
255
322
  ### One Page Audit Tools
256
323
 
257
- | Tool Name | Description | Key Parameters |
258
- |--------------------------------|----------------------------------------------------------------------------------------------------------------------------------|-----------------------------|
259
- | page_audit_start_scan | Scan a single webpage with JavaScript rendering. Returns pageId and reportId for tracking. Use page_audit_get_reports_for_page to check progress via status and progress fields (10 credits per scan) | name, url, userAgent (recommended: 0 for Chrome), httpAuthLogin (optional), httpAuthPass (optional) |
260
- | page_audit_get_last_scans | Get list of all one-page audit projects with pageId, url, name, status, lastActiveReport (latest scan results with SDO score), finishedReportCount, settings *No cost* | limit (optional, default 30), offset (optional, default 0), teamMemberId (optional) |
261
- | page_audit_get_reports_for_page | Get history of all audit reports for a specific page with reportId, auditDate, status (1=in progress, 3=finalizing, 4=completed), SDO score (0-100), error counts, progress (0-100) *No cost* | pageId, limit (optional), offset (optional) |
262
- | page_audit_get_results_report | Get detailed audit results with categories array (errors grouped by meta_tags, headings, content, multimedia, https, pagespeed_desktop/mobile, etc), hasAdditionRows flag for drill-down availability *No cost* | pageId (from page_audit_get_last_scans or page_audit_start_scan) |
263
- | page_audit_rescan | Rescan existing one-page audit project and create new audit report. Returns reportId. Track progress via page_audit_get_reports_for_page (10 credits per rescan) | pageId, name, userAgent (recommended: 0 for Chrome), httpAuthLogin (optional), httpAuthPass (optional) |
264
- | page_audit_stop | Stop active one-page audit scan. Returns boolean indicating success *No cost* | pageId |
265
- | page_audit_delete | Remove one-page audit project from customer project list permanently. Returns boolean *No cost* | pageId |
266
- | page_audit_get_report_by_categories | Get audit results by categories for specific report. Use compareReportId to see countNew (errors added) and countFixed (errors resolved) *No cost* | reportId, compareReportId (optional, enables change tracking) |
267
- | page_audit_report_drill_down | Get detailed problematic elements list. ONLY works for errors with hasAdditionRows=true. Response varies by error type (e.g., image URLs for multimedia errors) *No cost* | reportId, error (must match error.key), mode (all/new/solved, optional), compareReportId (optional), page (optional), size (optional, max 1000) |
268
- | page_audit_get_scan_names | Get list of all one-page audit project names with pageId, name, url, finishedReportCount for project discovery *No cost* | teamMemberId (optional) |
269
- | page_audit_scan_logs | Get chronological log of scan events with message (event name), type (info/warning/error), params (event-specific data or []), created_at timestamp for debugging *No cost* | reportId (optional, all scans if not specified), page (optional, default 0), pageSize (optional, default 100) |
324
+ | Tool Name | Description | Key Parameters |
325
+ |-------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------|
326
+ | page_audit_start_scan | Scan a single webpage with JavaScript rendering. Returns pageId and reportId for tracking. Use page_audit_get_reports_for_page to check progress via status and progress fields (10 credits per scan) | name, url, userAgent (recommended: 0 for Chrome), httpAuthLogin (optional), httpAuthPass (optional) |
327
+ | page_audit_get_last_scans | Get list of all one-page audit projects with pageId, url, name, status, lastActiveReport (latest scan results with SDO score), finishedReportCount, settings *No cost* | limit (optional, default 30), offset (optional, default 0), teamMemberId (optional) |
328
+ | page_audit_get_reports_for_page | Get history of all audit reports for a specific page with reportId, auditDate, status (1=in progress, 3=finalizing, 4=completed), SDO score (0-100), error counts, progress (0-100) *No cost* | pageId, limit (optional), offset (optional) |
329
+ | page_audit_get_results_report | Get detailed audit results with categories array (errors grouped by meta_tags, headings, content, multimedia, https, pagespeed_desktop/mobile, etc), hasAdditionRows flag for drill-down availability *No cost* | pageId (from page_audit_get_last_scans or page_audit_start_scan) |
330
+ | page_audit_rescan | Rescan existing one-page audit project and create new audit report. Returns reportId. Track progress via page_audit_get_reports_for_page (10 credits per rescan) | pageId, name, userAgent (recommended: 0 for Chrome), httpAuthLogin (optional), httpAuthPass (optional) |
331
+ | page_audit_stop | Stop active one-page audit scan. Returns boolean indicating success *No cost* | pageId |
332
+ | page_audit_delete | Remove one-page audit project from customer project list permanently. Returns boolean *No cost* | pageId |
333
+ | page_audit_get_report_by_categories | Get audit results by categories for specific report. Use compareReportId to see countNew (errors added) and countFixed (errors resolved) *No cost* | reportId, compareReportId (optional, enables change tracking) |
334
+ | page_audit_report_drill_down | Get detailed problematic elements list. ONLY works for errors with hasAdditionRows=true. Response varies by error type (e.g., image URLs for multimedia errors) *No cost* | reportId, error (must match error.key), mode (all/new/solved, optional), compareReportId (optional), page (optional), size (optional, max 1000) |
335
+ | page_audit_get_scan_names | Get list of all one-page audit project names with pageId, name, url, finishedReportCount for project discovery *No cost* | teamMemberId (optional) |
336
+ | page_audit_scan_logs | Get chronological log of scan events with message (event name), type (info/warning/error), params (event-specific data or []), created_at timestamp for debugging *No cost* | reportId (optional, all scans if not specified), page (optional, default 0), pageSize (optional, default 100) |
270
337
 
271
338
  ### Search Engines (se parameter)
272
339
 
@@ -48,4 +48,20 @@ export declare class GetDomainUniqKeywordsHandler extends BaseHandler {
48
48
  getInputSchema(): object;
49
49
  handle(call: MCPToolCall): Promise<MCPToolResponse>;
50
50
  }
51
+ export declare class GetMarketCategoriesHandler extends BaseHandler {
52
+ private domainService;
53
+ constructor();
54
+ getName(): string;
55
+ getDescription(): string;
56
+ getInputSchema(): object;
57
+ handle(call: MCPToolCall): Promise<MCPToolResponse>;
58
+ }
59
+ export declare class GetCategoryTopDomainsHandler extends BaseHandler {
60
+ private domainService;
61
+ constructor();
62
+ getName(): string;
63
+ getDescription(): string;
64
+ getInputSchema(): object;
65
+ handle(call: MCPToolCall): Promise<MCPToolResponse>;
66
+ }
51
67
  //# sourceMappingURL=domain_tools.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"domain_tools.d.ts","sourceRoot":"","sources":["../../src/handlers/domain_tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAExC,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAwC/D,qBAAa,kBAAmB,SAAQ,WAAW;IAC/C,OAAO,CAAC,aAAa,CAAgB;;IAQrC,OAAO,IAAI,MAAM;IAIjB,cAAc,IAAI,MAAM;IAIxB,cAAc,IAAI,MAAM;IAwClB,MAAM,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,eAAe,CAAC;CAY5D;AAED,qBAAa,kBAAmB,SAAQ,WAAW;IAC/C,OAAO,CAAC,aAAa,CAAgB;;IAQrC,OAAO,IAAI,MAAM;IAIjB,cAAc,IAAI,MAAM;IAIxB,cAAc,IAAI,MAAM;IAiDlB,MAAM,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,eAAe,CAAC;CAgB5D;AAED,qBAAa,qBAAsB,SAAQ,WAAW;IAClD,OAAO,CAAC,aAAa,CAAgB;;IAQrC,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C,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,eAAe,CAAC;CAY5D;AAED,qBAAa,4BAA6B,SAAQ,WAAW;IACzD,OAAO,CAAC,aAAa,CAAgB;;IAQrC,OAAO,IAAI,MAAM;IAIjB,cAAc,IAAI,MAAM;IAIxB,cAAc,IAAI,MAAM;IAqElB,MAAM,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,eAAe,CAAC;CAY5D"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GetDomainUniqKeywordsHandler = exports.DomainRegionsCountHandler = exports.DomainUrlsHandler = exports.DomainKeywordsHandler = exports.CompetitorsHandler = exports.DomainsInfoHandler = void 0;
3
+ exports.GetCategoryTopDomainsHandler = exports.GetMarketCategoriesHandler = exports.GetDomainUniqKeywordsHandler = exports.DomainRegionsCountHandler = exports.DomainUrlsHandler = exports.DomainKeywordsHandler = exports.CompetitorsHandler = exports.DomainsInfoHandler = void 0;
4
4
  const base_js_1 = require("./base.js");
5
5
  const domain_tools_js_1 = require("../services/domain_tools.js");
6
6
  const validation_js_1 = require("../utils/validation.js");
@@ -529,4 +529,136 @@ class GetDomainUniqKeywordsHandler extends base_js_1.BaseHandler {
529
529
  }
530
530
  }
531
531
  exports.GetDomainUniqKeywordsHandler = GetDomainUniqKeywordsHandler;
532
+ class GetMarketCategoriesHandler extends base_js_1.BaseHandler {
533
+ domainService;
534
+ constructor() {
535
+ super();
536
+ const config = (0, config_js_1.loadConfig)();
537
+ this.domainService = new domain_tools_js_1.DomainService(config);
538
+ }
539
+ getName() {
540
+ return 'get_market_categories';
541
+ }
542
+ getDescription() {
543
+ return 'Get complete list of available market research categories (1000+ categories). Use this method first to find the appropriate category_id for your analysis. Returns hierarchical categories like \'/Arts & Entertainment/TV & Video/Online Video\' with their IDs (e.g., \'.2.13.1.\'). The category_id is required for get_category_top_domains method.';
544
+ }
545
+ getInputSchema() {
546
+ return {
547
+ type: "object",
548
+ properties: {},
549
+ additionalProperties: false,
550
+ description: "No parameters required - returns all available market categories"
551
+ };
552
+ }
553
+ async handle(call) {
554
+ try {
555
+ const params = validation_js_1.getMarketCategoriesSchema.parse(call.arguments);
556
+ const result = await this.domainService.getMarketCategories(params);
557
+ return this.createSuccessResponse(result);
558
+ }
559
+ catch (error) {
560
+ if (error instanceof zod_1.z.ZodError) {
561
+ return this.createErrorResponse(new Error(`Invalid parameters: ${error.errors.map(e => `${e.path.join('.')}: ${e.message}`).join(', ')}`));
562
+ }
563
+ return this.createErrorResponse(error);
564
+ }
565
+ }
566
+ }
567
+ exports.GetMarketCategoriesHandler = GetMarketCategoriesHandler;
568
+ class GetCategoryTopDomainsHandler extends base_js_1.BaseHandler {
569
+ domainService;
570
+ constructor() {
571
+ super();
572
+ const config = (0, config_js_1.loadConfig)();
573
+ this.domainService = new domain_tools_js_1.DomainService(config);
574
+ }
575
+ getName() {
576
+ return 'get_category_top_domains';
577
+ }
578
+ getDescription() {
579
+ return 'Get top-performing domains in a specific market category with SEO metrics (traffic, visibility, keywords, backlinks, SDR). Requires category_id from get_market_categories - call that method first to find the right category. Returns ranked domains for competitive landscape analysis with filtering and sorting options.';
580
+ }
581
+ getInputSchema() {
582
+ return {
583
+ type: "object",
584
+ properties: {
585
+ category_id: {
586
+ type: "string",
587
+ pattern: constants_js_1.CATEGORY_ID_REGEX,
588
+ description: "Category identifier in format .X.Y.Z. (e.g., '.2.' for Arts & Entertainment or '.2.13.1.' for Arts & Entertainment/TV & Video/Online Video). Get this from get_market_categories method."
589
+ },
590
+ se: {
591
+ type: "string",
592
+ enum: constants_js_1.MAIN_SEARCH_ENGINES,
593
+ description: "Search engine database (e.g., g_us for Google US)"
594
+ },
595
+ filters: {
596
+ type: "object",
597
+ properties: {
598
+ visibility: { type: "number", description: "Exact visibility score" },
599
+ visibility_min: { type: "number", description: "Minimum visibility score" },
600
+ visibility_max: { type: "number", description: "Maximum visibility score" },
601
+ traffic: { type: "integer", description: "Exact traffic value" },
602
+ traffic_min: { type: "integer", description: "Minimum traffic" },
603
+ traffic_max: { type: "integer", description: "Maximum traffic" },
604
+ keywords: { type: "integer", description: "Exact number of keywords" },
605
+ keywords_min: { type: "integer", description: "Minimum number of keywords" },
606
+ keywords_max: { type: "integer", description: "Maximum number of keywords" },
607
+ referring_domains: { type: "integer", description: "Exact number of referring domains" },
608
+ referring_domains_min: { type: "integer", description: "Minimum number of referring domains" },
609
+ referring_domains_max: { type: "integer", description: "Maximum number of referring domains" },
610
+ backlinks: { type: "integer", description: "Exact number of backlinks" },
611
+ backlinks_min: { type: "integer", description: "Minimum number of backlinks" },
612
+ backlinks_max: { type: "integer", description: "Maximum number of backlinks" },
613
+ sdr: { type: "integer", minimum: 0, maximum: 100, description: "Exact Serpstat Domain Rank (0-100)" },
614
+ sdr_min: { type: "integer", minimum: 0, maximum: 100, description: "Minimum Serpstat Domain Rank" },
615
+ sdr_max: { type: "integer", minimum: 0, maximum: 100, description: "Maximum Serpstat Domain Rank" }
616
+ },
617
+ additionalProperties: false,
618
+ description: "Filter conditions. All filters support exact value, min threshold, and max threshold."
619
+ },
620
+ sort: {
621
+ type: "string",
622
+ enum: constants_js_1.MARKET_CATEGORY_SORT_FIELDS,
623
+ description: "Sort field (global_rank, category_rank, traffic, visibility, keywords, referring_domains, backlinks, sdr)",
624
+ default: "global_rank"
625
+ },
626
+ order: {
627
+ type: "string",
628
+ enum: constants_js_1.SORT_ORDER,
629
+ description: "Sort order (asc or desc)",
630
+ default: "asc"
631
+ },
632
+ page: {
633
+ type: "integer",
634
+ minimum: constants_js_1.MIN_PAGE,
635
+ description: "Page number",
636
+ default: 1
637
+ },
638
+ size: {
639
+ type: "integer",
640
+ enum: constants_js_1.PROJECT_ALLOWED_PAGE_SIZES,
641
+ description: "Number of results per page (allowed values: 20, 50, 100, 200, 500)",
642
+ default: 100
643
+ }
644
+ },
645
+ required: ["category_id", "se"],
646
+ additionalProperties: false
647
+ };
648
+ }
649
+ async handle(call) {
650
+ try {
651
+ const params = validation_js_1.getCategoryTopDomainsSchema.parse(call.arguments);
652
+ const result = await this.domainService.getCategoryTopDomains(params);
653
+ return this.createSuccessResponse(result);
654
+ }
655
+ catch (error) {
656
+ if (error instanceof zod_1.z.ZodError) {
657
+ return this.createErrorResponse(new Error(`Invalid parameters: ${error.errors.map(e => `${e.path.join('.')}: ${e.message}`).join(', ')}`));
658
+ }
659
+ return this.createErrorResponse(error);
660
+ }
661
+ }
662
+ }
663
+ exports.GetCategoryTopDomainsHandler = GetCategoryTopDomainsHandler;
532
664
  //# sourceMappingURL=domain_tools.js.map