@itsaakashpatel/seo-webmaster-mcp 0.0.0-stage → 1.1.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 (213) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/LICENSE +21 -0
  3. package/README.md +380 -2
  4. package/build/approvals/format.d.ts +29 -0
  5. package/build/approvals/format.js +88 -0
  6. package/build/approvals/gate.d.ts +23 -0
  7. package/build/approvals/gate.js +102 -0
  8. package/build/approvals/groups.d.ts +14 -0
  9. package/build/approvals/groups.js +113 -0
  10. package/build/approvals/session.d.ts +8 -0
  11. package/build/approvals/session.js +23 -0
  12. package/build/cli/args.d.ts +18 -0
  13. package/build/cli/args.js +41 -0
  14. package/build/cli/commands.d.ts +8 -0
  15. package/build/cli/commands.js +64 -0
  16. package/build/cli/engines.d.ts +1 -0
  17. package/build/cli/engines.js +6 -0
  18. package/build/cli/help.d.ts +2 -0
  19. package/build/cli/help.js +29 -0
  20. package/build/cli/install/clients.d.ts +18 -0
  21. package/build/cli/install/clients.js +46 -0
  22. package/build/cli/install/command.d.ts +21 -0
  23. package/build/cli/install/command.js +44 -0
  24. package/build/cli/install/exec.d.ts +3 -0
  25. package/build/cli/install/exec.js +14 -0
  26. package/build/cli/install/flow.d.ts +14 -0
  27. package/build/cli/install/flow.js +114 -0
  28. package/build/cli/install/json-config.d.ts +24 -0
  29. package/build/cli/install/json-config.js +70 -0
  30. package/build/cli/prompter.d.ts +21 -0
  31. package/build/cli/prompter.js +15 -0
  32. package/build/cli/run.d.ts +17 -0
  33. package/build/cli/run.js +48 -0
  34. package/build/cli/screens.d.ts +45 -0
  35. package/build/cli/screens.js +83 -0
  36. package/build/cli/setup/approvals.d.ts +2 -0
  37. package/build/cli/setup/approvals.js +59 -0
  38. package/build/cli/setup/bing.d.ts +2 -0
  39. package/build/cli/setup/bing.js +35 -0
  40. package/build/cli/setup/flow.d.ts +8 -0
  41. package/build/cli/setup/flow.js +91 -0
  42. package/build/cli/setup/google.d.ts +2 -0
  43. package/build/cli/setup/google.js +94 -0
  44. package/build/cli/setup/helpers.d.ts +13 -0
  45. package/build/cli/setup/helpers.js +38 -0
  46. package/build/cli/setup/indexnow.d.ts +3 -0
  47. package/build/cli/setup/indexnow.js +89 -0
  48. package/build/cli/setup/services.d.ts +5 -0
  49. package/build/cli/setup/services.js +62 -0
  50. package/build/cli/setup/text.d.ts +10 -0
  51. package/build/cli/setup/text.js +40 -0
  52. package/build/cli/setup/types.d.ts +35 -0
  53. package/build/cli/setup/types.js +1 -0
  54. package/build/cli/status.d.ts +14 -0
  55. package/build/cli/status.js +54 -0
  56. package/build/cli/terminal.d.ts +6 -0
  57. package/build/cli/terminal.js +134 -0
  58. package/build/config/file.d.ts +29 -0
  59. package/build/config/file.js +58 -0
  60. package/build/config/index.d.ts +24 -0
  61. package/build/config/index.js +72 -0
  62. package/build/config/paths.d.ts +11 -0
  63. package/build/config/paths.js +19 -0
  64. package/build/core/analytics.d.ts +5 -0
  65. package/build/core/analytics.js +18 -0
  66. package/build/core/constants.d.ts +9 -0
  67. package/build/core/constants.js +9 -0
  68. package/build/core/errors.d.ts +18 -0
  69. package/build/core/errors.js +53 -0
  70. package/build/core/filters.d.ts +14 -0
  71. package/build/core/filters.js +42 -0
  72. package/build/core/guards.d.ts +11 -0
  73. package/build/core/guards.js +32 -0
  74. package/build/core/http.d.ts +17 -0
  75. package/build/core/http.js +51 -0
  76. package/build/core/insights/compare.d.ts +32 -0
  77. package/build/core/insights/compare.js +56 -0
  78. package/build/core/insights/crawl.d.ts +9 -0
  79. package/build/core/insights/crawl.js +61 -0
  80. package/build/core/insights/links.d.ts +5 -0
  81. package/build/core/insights/links.js +20 -0
  82. package/build/core/insights/metrics.d.ts +8 -0
  83. package/build/core/insights/metrics.js +15 -0
  84. package/build/core/insights/opportunities.d.ts +15 -0
  85. package/build/core/insights/opportunities.js +40 -0
  86. package/build/core/insights/periods.d.ts +12 -0
  87. package/build/core/insights/periods.js +38 -0
  88. package/build/core/insights/types.d.ts +31 -0
  89. package/build/core/insights/types.js +1 -0
  90. package/build/core/markdown.d.ts +14 -0
  91. package/build/core/markdown.js +28 -0
  92. package/build/core/paging.d.ts +11 -0
  93. package/build/core/paging.js +5 -0
  94. package/build/core/provider.d.ts +15 -0
  95. package/build/core/provider.js +1 -0
  96. package/build/core/rate-limit.d.ts +8 -0
  97. package/build/core/rate-limit.js +19 -0
  98. package/build/core/registry.d.ts +11 -0
  99. package/build/core/registry.js +16 -0
  100. package/build/core/responses.d.ts +13 -0
  101. package/build/core/responses.js +9 -0
  102. package/build/core/secrets.d.ts +2 -0
  103. package/build/core/secrets.js +9 -0
  104. package/build/core/types.d.ts +137 -0
  105. package/build/core/types.js +13 -0
  106. package/build/core/untrusted.d.ts +11 -0
  107. package/build/core/untrusted.js +34 -0
  108. package/build/core/urls.d.ts +16 -0
  109. package/build/core/urls.js +80 -0
  110. package/build/core/validation.d.ts +23 -0
  111. package/build/core/validation.js +100 -0
  112. package/build/index.d.ts +2 -0
  113. package/build/index.js +30 -0
  114. package/build/providers/bing/auth.d.ts +11 -0
  115. package/build/providers/bing/auth.js +87 -0
  116. package/build/providers/bing/mappers.d.ts +18 -0
  117. package/build/providers/bing/mappers.js +87 -0
  118. package/build/providers/bing/operations.d.ts +8 -0
  119. package/build/providers/bing/operations.js +40 -0
  120. package/build/providers/bing/provider.d.ts +16 -0
  121. package/build/providers/bing/provider.js +132 -0
  122. package/build/providers/bing/records.d.ts +11 -0
  123. package/build/providers/bing/records.js +47 -0
  124. package/build/providers/bing/wire.d.ts +86 -0
  125. package/build/providers/bing/wire.js +38 -0
  126. package/build/providers/bing/writes.d.ts +9 -0
  127. package/build/providers/bing/writes.js +31 -0
  128. package/build/providers/google/auth.d.ts +13 -0
  129. package/build/providers/google/auth.js +174 -0
  130. package/build/providers/google/indexing.d.ts +14 -0
  131. package/build/providers/google/indexing.js +89 -0
  132. package/build/providers/google/mappers.d.ts +6 -0
  133. package/build/providers/google/mappers.js +96 -0
  134. package/build/providers/google/probe.d.ts +9 -0
  135. package/build/providers/google/probe.js +42 -0
  136. package/build/providers/google/provider.d.ts +15 -0
  137. package/build/providers/google/provider.js +118 -0
  138. package/build/providers/index.d.ts +4 -0
  139. package/build/providers/index.js +7 -0
  140. package/build/providers/indexnow/probe.d.ts +8 -0
  141. package/build/providers/indexnow/probe.js +17 -0
  142. package/build/providers/indexnow/provider.d.ts +21 -0
  143. package/build/providers/indexnow/provider.js +96 -0
  144. package/build/providers/insights/bing.d.ts +2 -0
  145. package/build/providers/insights/bing.js +73 -0
  146. package/build/providers/insights/google.d.ts +2 -0
  147. package/build/providers/insights/google.js +67 -0
  148. package/build/providers/insights/index.d.ts +5 -0
  149. package/build/providers/insights/index.js +15 -0
  150. package/build/providers/insights/source.d.ts +14 -0
  151. package/build/providers/insights/source.js +1 -0
  152. package/build/server.d.ts +2 -0
  153. package/build/server.js +14 -0
  154. package/build/tools/bing/catalog-crawl.d.ts +2 -0
  155. package/build/tools/bing/catalog-crawl.js +125 -0
  156. package/build/tools/bing/catalog-settings.d.ts +2 -0
  157. package/build/tools/bing/catalog-settings.js +51 -0
  158. package/build/tools/bing/catalog-site.d.ts +2 -0
  159. package/build/tools/bing/catalog-site.js +70 -0
  160. package/build/tools/bing/catalog-traffic.d.ts +2 -0
  161. package/build/tools/bing/catalog-traffic.js +88 -0
  162. package/build/tools/bing/index.d.ts +6 -0
  163. package/build/tools/bing/index.js +26 -0
  164. package/build/tools/bing/inputs.d.ts +21 -0
  165. package/build/tools/bing/inputs.js +34 -0
  166. package/build/tools/bing/read-tool.d.ts +23 -0
  167. package/build/tools/bing/read-tool.js +71 -0
  168. package/build/tools/bing/render.d.ts +8 -0
  169. package/build/tools/bing/render.js +50 -0
  170. package/build/tools/bing/write-tool.d.ts +25 -0
  171. package/build/tools/bing/write-tool.js +127 -0
  172. package/build/tools/bing/writes-settings.d.ts +2 -0
  173. package/build/tools/bing/writes-settings.js +227 -0
  174. package/build/tools/bing/writes-sites.d.ts +2 -0
  175. package/build/tools/bing/writes-sites.js +172 -0
  176. package/build/tools/engine-status.d.ts +14 -0
  177. package/build/tools/engine-status.js +81 -0
  178. package/build/tools/get-sitemap.d.ts +4 -0
  179. package/build/tools/get-sitemap.js +46 -0
  180. package/build/tools/index.d.ts +6 -0
  181. package/build/tools/index.js +43 -0
  182. package/build/tools/insights/bing-crawl-overview.d.ts +2 -0
  183. package/build/tools/insights/bing-crawl-overview.js +46 -0
  184. package/build/tools/insights/bing-link-evidence.d.ts +2 -0
  185. package/build/tools/insights/bing-link-evidence.js +65 -0
  186. package/build/tools/insights/declining-pages.d.ts +2 -0
  187. package/build/tools/insights/declining-pages.js +59 -0
  188. package/build/tools/insights/performance-overview.d.ts +2 -0
  189. package/build/tools/insights/performance-overview.js +39 -0
  190. package/build/tools/insights/report.d.ts +50 -0
  191. package/build/tools/insights/report.js +86 -0
  192. package/build/tools/insights/search-opportunities.d.ts +2 -0
  193. package/build/tools/insights/search-opportunities.js +30 -0
  194. package/build/tools/insights/shared.d.ts +44 -0
  195. package/build/tools/insights/shared.js +90 -0
  196. package/build/tools/inspect-url.d.ts +4 -0
  197. package/build/tools/inspect-url.js +104 -0
  198. package/build/tools/list-sitemaps.d.ts +4 -0
  199. package/build/tools/list-sitemaps.js +37 -0
  200. package/build/tools/list-sites.d.ts +4 -0
  201. package/build/tools/list-sites.js +56 -0
  202. package/build/tools/search-analytics.d.ts +4 -0
  203. package/build/tools/search-analytics.js +108 -0
  204. package/build/tools/shared.d.ts +29 -0
  205. package/build/tools/shared.js +63 -0
  206. package/build/tools/sitemaps.d.ts +2 -0
  207. package/build/tools/sitemaps.js +140 -0
  208. package/build/tools/submit-google.d.ts +4 -0
  209. package/build/tools/submit-google.js +68 -0
  210. package/build/tools/submit-urls.d.ts +4 -0
  211. package/build/tools/submit-urls.js +65 -0
  212. package/package.json +66 -4
  213. package/server.json +58 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,36 @@
1
+ # Changelog
2
+
3
+ ## 1.1.0
4
+
5
+ ### Added
6
+ - 61 Bing tools: 35 read and 26 write. They cover the operations of the Bing Webmaster API.
7
+ - 5 insight tools: `get_performance_overview`, `find_search_opportunities`,
8
+ `find_declining_pages`, `bing_get_crawl_overview` and `bing_get_link_evidence`.
9
+
10
+ - The `setup` command. It configures Google, Bing and IndexNow with hidden key prompts, tests each key
11
+ with a read call, and saves the keys in a configuration file with mode 600.
12
+ - The `install` command. It adds the server to Claude Code, Claude Desktop or Cursor. It shows the
13
+ change first, asks for `y`, and writes a backup of a JSON file.
14
+ - The `status` command, `--help` and `--version`. A start without a command still starts the server
15
+ when stdin is not a terminal.
16
+ - A configuration file. An environment variable has priority over it.
17
+ - Approval groups: `read`, `submit`, `visibility` and `access`. Before a risky call, the server shows an
18
+ approval dialog, with the choices `once` and `session`. The user can choose "run without asking" in
19
+ `setup`. A client without dialogs runs the call, and the first risky result has a warning.
20
+ - `_meta["anthropic/requiresUserInteraction"]` on the `visibility` and `access` tools.
21
+ - `engine_status` shows whether the client supports approval dialogs and the approval choices.
22
+
23
+ ### Fixed
24
+ - Bing calls use the correct API address, and a rejected key gives a clear message.
25
+ - `list_sites` shows `Unknown` when Bing sends no role. It showed `SiteOwner`.
26
+
27
+ ### Changed
28
+ - The server lists the 61 Bing operation tools only when Bing has a key at the start. It lists 13 tools
29
+ without a key and 74 with a key. Before, it always listed all tools.
30
+ - Providers read keys through one configuration module, not from `process.env`.
31
+ - `submit_urls_google` is marked destructive, because `URL_DELETED` removes pages.
32
+ - The server removes the Bing API key from every response before it reads it.
33
+
34
+ ## 1.0.0
35
+
36
+ - First version, with 8 tools. It was not published.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Aakash Patel
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 CHANGED
@@ -1,3 +1,381 @@
1
- # Temporary Holding Version
1
+ # seo-webmaster-mcp
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ [![MCP](https://img.shields.io/badge/Model%20Context%20Protocol-Compatible-blue.svg)](https://modelcontextprotocol.io/)
4
+ [![TypeScript](https://img.shields.io/badge/TypeScript-5.7-blue.svg)](https://www.typescriptlang.org/)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6
+
7
+ A unified **Model Context Protocol (MCP)** server providing AI assistants (**Claude Desktop**, **Claude Code**, **Cursor**, **Windsurf**, **Cline**, **Zed**, etc.) with comprehensive organic search analytics, URL inspection, sitemap health monitoring, and instant search engine indexing across **Google Search Console**, **Google Indexing API**, **Bing Webmaster Tools**, and **IndexNow**.
8
+
9
+ ---
10
+
11
+ ## 🚀 Quickstart (Running in 2 Minutes)
12
+
13
+ You do **not** need to configure all engines. **All engines are completely optional!**
14
+ - If you only have Google Search Console, only configure Google.
15
+ - If you only have Bing Webmaster Tools, only configure Bing.
16
+ - If you want instant indexing without API keys, you can use IndexNow.
17
+ - If you configure nothing, start the server and ask your AI: *"Check engine status"* to see step-by-step setup guides!
18
+
19
+ ### Option A: Run the setup (Recommended)
20
+
21
+ One command configures Google, Bing and IndexNow. You do not need a `.env` file.
22
+
23
+ ```bash
24
+ npx -y @itsaakashpatel/seo-webmaster-mcp setup
25
+ ```
26
+
27
+ The setup asks for each key in a hidden prompt, tests the key with a read call, and shows a summary before it writes anything. Then it offers to add the server to Claude Code, Claude Desktop or Cursor. Restart your client after the setup.
28
+
29
+ | Command | Result |
30
+ | --- | --- |
31
+ | `setup` | Sets up the engines and the approval choices. Needs a terminal. |
32
+ | `install` | Adds the server to Claude Code, Claude Desktop or Cursor. It shows the change and waits for `y`. |
33
+ | `status` | Shows the engines, the approval choices and the path of the configuration file. Never a key. |
34
+ | `serve` | Starts the MCP server. This is the default when a client starts the command. |
35
+ | `--help`, `--version` | Show the help text or the version. |
36
+
37
+ The setup saves the keys as **plain text** in `$XDG_CONFIG_HOME/seo-webmaster-mcp/config.json`, or in `~/.config/seo-webmaster-mcp/config.json` (on Windows: `%APPDATA%\seo-webmaster-mcp\config.json`). The file has mode 600 and its folder has mode 700. The setup stores the path of your Google key file, not its content. An environment variable that has a value has priority over the file. `status` shows each value that an environment variable overrides.
38
+
39
+ ### Option B: Set environment variables in the client configuration
40
+
41
+ Use this option if you do not want a configuration file. No cloning is required. Your MCP client downloads and runs the latest version automatically.
42
+
43
+ #### 1. Claude Desktop
44
+ Add to your `claude_desktop_config.json`:
45
+ - **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
46
+ - **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
47
+
48
+ ```json
49
+ {
50
+ "mcpServers": {
51
+ "seo-webmaster": {
52
+ "command": "npx",
53
+ "args": ["-y", "@itsaakashpatel/seo-webmaster-mcp"],
54
+ "env": {
55
+ "GOOGLE_APPLICATION_CREDENTIALS": "/path/to/your/gsc-key.json",
56
+ "BING_WEBMASTER_API_KEY": "your_bing_api_key",
57
+ "INDEXNOW_KEY": "your_indexnow_key"
58
+ }
59
+ }
60
+ }
61
+ }
62
+ ```
63
+
64
+ #### 2. Cursor
65
+ Add to `.cursor/mcp.json` (project-level) or **Cursor Settings → Features → MCP Servers**:
66
+
67
+ ```json
68
+ {
69
+ "mcpServers": {
70
+ "seo-webmaster": {
71
+ "command": "npx",
72
+ "args": ["-y", "@itsaakashpatel/seo-webmaster-mcp"],
73
+ "env": {
74
+ "GOOGLE_APPLICATION_CREDENTIALS": "/path/to/your/gsc-key.json",
75
+ "BING_WEBMASTER_API_KEY": "your_bing_api_key",
76
+ "INDEXNOW_KEY": "your_indexnow_key"
77
+ }
78
+ }
79
+ }
80
+ }
81
+ ```
82
+
83
+ #### 3. Claude Code CLI
84
+ Run this command. Add one `--env` flag for each engine that you use.
85
+
86
+ ```bash
87
+ claude mcp add seo-webmaster \
88
+ --env BING_WEBMASTER_API_KEY=your_bing_api_key \
89
+ -- npx -y @itsaakashpatel/seo-webmaster-mcp
90
+ ```
91
+
92
+ ### Option C: Run from a local build
93
+ Use Node.js 22.18 or later.
94
+
95
+ ```bash
96
+ git clone https://github.com/itsaakashpatel/seo-webmaster-mcp.git
97
+ cd seo-webmaster-mcp
98
+ npm install
99
+ ```
100
+
101
+ `npm install` also builds the server. In the configurations above, set `"command"` to `"node"` and `"args"` to `["/absolute/path/to/seo-webmaster-mcp/build/index.js"]`.
102
+
103
+ ---
104
+
105
+ ## 🛠️ Step-by-Step Setup Guide
106
+
107
+ ### 1. Google Search Console & Google Indexing API
108
+
109
+ > [!TIP]
110
+ > Both Search Console and Indexing API use the **exact same** service account credentials.
111
+
112
+ 1. **Create a Cloud Project**: Go to [Google Cloud Console](https://console.cloud.google.com/) and create a project (e.g. `my-seo-tools`).
113
+ 2. **Enable APIs**:
114
+ - In **APIs & Services → Library**, search for **Google Search Console API** and click **Enable**.
115
+ - *(Optional for instant Google push)* Search for **Indexing API** (`indexing.googleapis.com`) and click **Enable**.
116
+ 3. **Create Service Account**:
117
+ - Go to **APIs & Services → Credentials → Create Credentials → Service Account**.
118
+ - Name it (e.g. `gsc-reader`), click **Create and Continue**, then **Done**.
119
+ 4. **Generate JSON Key File**:
120
+ - Click on the created service account email.
121
+ - Go to the **Keys** tab → **Add Key → Create new key → JSON**.
122
+ - Save the downloaded file somewhere safe on your computer (e.g., `~/.config/gcloud/gsc-key.json`).
123
+ 5. **Grant Property Access in Search Console**:
124
+ - Copy the service account's email address (e.g. `gsc-reader@my-seo-tools.iam.gserviceaccount.com`).
125
+ - Open [Google Search Console](https://search.google.com/search-console).
126
+ - Select your property → **Settings** (bottom left) → **Users and permissions** → **Add user**.
127
+ - Paste the service account email:
128
+ - For read-only search analytics: select **Restricted** or **Full**.
129
+ - If using Google Indexing API: select **Owner** (required by Google to publish indexing requests).
130
+ 6. **Give the key to the server**:
131
+ - Run `npx -y @itsaakashpatel/seo-webmaster-mcp setup` and give the path of your JSON file. Or set `GOOGLE_APPLICATION_CREDENTIALS` to the absolute path of your downloaded JSON file.
132
+ - Alternatively, you can paste the raw JSON string or base64 into `GOOGLE_SERVICE_ACCOUNT_KEY`.
133
+
134
+ ---
135
+
136
+ ### 2. Bing Webmaster Tools
137
+
138
+ 1. Sign in to [Bing Webmaster Tools](https://www.bing.com/webmasters) and ensure your site is verified.
139
+ 2. Click the **Settings** gear icon (top right) → **API Access** → **API Key**.
140
+ 3. Generate an API Key and copy it.
141
+ 4. Run `npx -y @itsaakashpatel/seo-webmaster-mcp setup` and paste the key. Or set the `BING_WEBMASTER_API_KEY` environment variable in your MCP configuration.
142
+
143
+ ---
144
+
145
+ ### 3. IndexNow (Instant Indexing to Bing, Yandex, Seznam, Naver)
146
+
147
+ IndexNow allows search engines to instantly discover updated, new, or deleted URLs without waiting for crawlers.
148
+
149
+ 1. **Generate a Key**: Create a random 32-character hexadecimal key (or use [Bing's Key Generator](https://www.bing.com/indexnow)).
150
+ 2. **Host the Verification File**:
151
+ - Place a text file named `<your-key>.txt` containing only the key at your website root:
152
+ `https://example.com/<your-key>.txt`
153
+ - Confirm it opens in your browser and displays only the key string.
154
+ 3. **Give the key to the server**:
155
+ - Run the setup and choose IndexNow. It can create a key and write the key file for you. Or set `INDEXNOW_KEY` to your key string.
156
+ - *(Optional)* If your key file is hosted in a subfolder or custom URL, set `INDEXNOW_KEY_LOCATION` to the full URL (e.g. `https://example.com/assets/my-key.txt`).
157
+
158
+ ---
159
+
160
+ ## 🧰 Available MCP Tools
161
+
162
+ | Tool | Engine | Description |
163
+ |---|:---:|---|
164
+ | [`engine_status`](#1-engine_status) | All | Check connection and configuration health across all 4 search engine providers with setup tips. |
165
+ | [`list_sites`](#2-list_sites) | Google & Bing | List all verified website properties with user permissions/roles. |
166
+ | [`search_analytics`](#3-search_analytics) | Google & Bing | Query clicks, impressions, CTR, and average position grouped by query, page, country, device, and date. |
167
+ | [`inspect_url`](#4-inspect_url) | Google & Bing | Inspect live URL index status, crawl dates, canonical tags, mobile usability, and rich results schema. |
168
+ | [`list_sitemaps`](#5-list_sitemaps) | Google & Bing | List submitted sitemaps, error/warning counts, crawl timestamps, and indexed URL breakdown. |
169
+ | [`get_sitemap`](#6-get_sitemap) | Google & Bing | Retrieve deep indexing statistics for a specific sitemap feed. |
170
+ | [`submit_urls_indexnow`](#7-submit_urls_indexnow) | IndexNow | Instantly notify Bing, Yandex, and partner engines about up to 10,000 published/updated/deleted URLs. |
171
+ | [`submit_urls_google`](#8-submit_urls_google) | Google Indexing | Push up to 200 URLs/day to Google via the Indexing API (`URL_UPDATED` or `URL_DELETED`). |
172
+
173
+ <details>
174
+ <summary><strong>Detailed Parameter Reference</strong></summary>
175
+
176
+ ### 1. `engine_status`
177
+ No parameters required.
178
+
179
+ ### 2. `list_sites`
180
+ | Parameter | Type | Required | Description |
181
+ |---|---|---|---|
182
+ | `engine` | string | No | Filter by engine: `all`, `google`, or `bing` (default: `all`) |
183
+
184
+ ### 3. `search_analytics`
185
+ | Parameter | Type | Required | Description |
186
+ |---|---|---|---|
187
+ | `siteUrl` | string | **Yes** | Site URL as verified in Search Console (e.g. `https://example.com/` or `sc-domain:example.com`) |
188
+ | `startDate` | string | **Yes** | Start date in `YYYY-MM-DD` format |
189
+ | `endDate` | string | **Yes** | End date in `YYYY-MM-DD` format |
190
+ | `engine` | string | No | Provider: `google` or `bing` (default: `google`) |
191
+ | `dimensions` | string | No | Comma-separated: `query`, `page`, `country`, `device`, `searchAppearance`, `date` (default: `query`) |
192
+ | `rowLimit` | number | No | Max rows to return (default: `100`, max: `25000`) |
193
+ | `searchType` | string | No | Vertical: `web`, `image`, `video`, `news`, `discover`, `googleNews` (default: `web`) |
194
+ | `dataState` | string | No | `all` (includes fresh data) or `final` (default: `all`) |
195
+ | `queryFilter` | string | No | Filter queries: `text` (contains), `!text`, `exact:keyword`, `!exact:keyword`, `regex:pattern`, or `!regex:pattern` ([RE2 syntax](https://github.com/google/re2/wiki/Syntax)) |
196
+ | `pageFilter` | string | No | Filter page URLs: same syntax as `queryFilter` |
197
+ | `countryFilter` | string | No | ISO 3166-1 alpha-3 code (e.g. `USA`, `GBR`, `DEU`, `IND`) |
198
+ | `deviceFilter` | string | No | `DESKTOP`, `MOBILE`, or `TABLET` |
199
+ | `startRow` | number | No | Pagination row offset (default: `0`) |
200
+
201
+ ### 4. `inspect_url`
202
+ | Parameter | Type | Required | Description |
203
+ |---|---|---|---|
204
+ | `siteUrl` | string | **Yes** | Site URL as verified in Search Console |
205
+ | `inspectionUrl` | string | **Yes** | Fully qualified URL to inspect |
206
+ | `engine` | string | No | `google` or `bing` (default: `google`) |
207
+ | `languageCode` | string | No | Language code for localized messages (default: `en-US`) |
208
+
209
+ ### 5. `list_sitemaps`
210
+ | Parameter | Type | Required | Description |
211
+ |---|---|---|---|
212
+ | `siteUrl` | string | **Yes** | Site URL as verified in Search Console |
213
+ | `engine` | string | No | `google` or `bing` (default: `google`) |
214
+
215
+ ### 6. `get_sitemap`
216
+ | Parameter | Type | Required | Description |
217
+ |---|---|---|---|
218
+ | `siteUrl` | string | **Yes** | Site URL as verified in Search Console |
219
+ | `feedpath` | string | **Yes** | Full URL or path to the sitemap feed |
220
+ | `engine` | string | No | `google` or `bing` (default: `google`) |
221
+
222
+ ### 7. `submit_urls_indexnow`
223
+ | Parameter | Type | Required | Description |
224
+ |---|---|---|---|
225
+ | `host` | string | **Yes** | Domain name without protocol (e.g. `example.com`) |
226
+ | `urls` | string | **Yes** | Comma/newline-separated list of full URLs (or JSON array) |
227
+ | `key` | string | No | IndexNow key (optional if `INDEXNOW_KEY` env var is set) |
228
+ | `keyLocation` | string | No | Full URL to key file if hosted in custom location |
229
+
230
+ ### 8. `submit_urls_google`
231
+ | Parameter | Type | Required | Description |
232
+ |---|---|---|---|
233
+ | `urls` | string | **Yes** | Comma/newline-separated full https URLs (or JSON array). Max 200 per call |
234
+ | `type` | string | No | `URL_UPDATED` (new/changed) or `URL_DELETED` (removed). Default: `URL_UPDATED` |
235
+
236
+ > **Google Indexing API note**: Only pages containing `JobPosting` or `BroadcastEvent` (in `VideoObject`) structured data are supported by Google. Default daily quota is 200 requests.
237
+
238
+ </details>
239
+
240
+ ### Insight tools
241
+
242
+ | Tool | Engine | Description |
243
+ |---|:---:|---|
244
+ | `get_performance_overview` | Google & Bing | Compare two periods: totals, and the queries and pages that changed, disappeared or appeared. |
245
+ | `find_search_opportunities` | Google & Bing | Find page-one results with a low CTR, and results at positions 11 to 20. |
246
+ | `find_declining_pages` | Google & Bing | Find pages that lost clicks, with the queries behind the loss. |
247
+ | `bing_get_crawl_overview` | Bing | Compare crawl results between two periods and group the crawl issues. |
248
+ | `bing_get_link_evidence` | Bing | Group inbound links by domain and anchor text. |
249
+
250
+ ### Bing tools
251
+
252
+ The 61 `bing_` operation tools cover the operations of the Bing Webmaster API. They need only `BING_WEBMASTER_API_KEY`. The full contract is in [`specs/bing-tools.md`](specs/bing-tools.md).
253
+
254
+ **Read (35):** `bing_get_sites`, `bing_get_site_roles`, `bing_get_site_moves`, `bing_get_feed_details`, `bing_get_url_submission_quota`, `bing_get_content_submission_quota`, `bing_get_fetched_urls`, `bing_get_fetched_url_details`, `bing_get_query_stats`, `bing_get_query_traffic_stats`, `bing_get_query_page_stats`, `bing_get_query_page_detail_stats`, `bing_get_page_stats`, `bing_get_page_query_stats`, `bing_get_rank_and_traffic_stats`, `bing_get_keyword`, `bing_get_keyword_stats`, `bing_get_related_keywords`, `bing_get_crawl_stats`, `bing_get_crawl_issues`, `bing_get_crawl_settings`, `bing_get_link_counts`, `bing_get_url_links`, `bing_get_connected_pages`, `bing_get_deep_link_blocks`, `bing_get_url_info`, `bing_get_url_traffic_info`, `bing_get_children_url_info`, `bing_get_children_url_traffic_info`, `bing_get_blocked_urls`, `bing_get_page_preview_blocks`, `bing_get_country_region_settings`, `bing_get_query_parameters`, `bing_get_deep_link`, `bing_get_deep_link_algo_urls`
255
+
256
+ **Add or submit (8):** `bing_add_site`, `bing_verify_site`, `bing_submit_url`, `bing_submit_url_batch`, `bing_submit_content`, `bing_submit_feed`, `bing_fetch_url`, `bing_add_connected_page`
257
+
258
+ **Change or remove (18):** `bing_add_site_role`, `bing_remove_site`, `bing_remove_site_role`, `bing_submit_site_move`, `bing_remove_feed`, `bing_update_crawl_settings`, `bing_add_deep_link_block`, `bing_remove_deep_link_block`, `bing_update_deep_link`, `bing_add_blocked_url`, `bing_remove_blocked_url`, `bing_add_page_preview_block`, `bing_remove_page_preview_block`, `bing_add_country_region_settings`, `bing_remove_country_region_settings`, `bing_add_query_parameter`, `bing_remove_query_parameter`, `bing_set_query_parameter_state`
259
+
260
+ The server lists the 61 `bing_` tools only when Bing has a key at the start. Without a Bing key, the server lists 13 tools. With a key, it lists 74. After you set a key, restart your client.
261
+
262
+ > [!WARNING]
263
+ > Some of these tools can remove your site from Bing, block pages or give another user access.
264
+ > - Each change or remove tool needs `confirmSiteUrl`, and your MCP client sees it as destructive.
265
+ > - Before a risky call, the server shows an approval dialog (see "Approvals").
266
+ > - Do not set your client to approve these tools automatically.
267
+ > - Search queries, link text and fetched pages come from other people. They can contain instructions that try to mislead an agent.
268
+
269
+ ### Approvals
270
+
271
+ Each tool is in one approval group. Before a risky call, the server asks you in a dialog, unless you chose "run without asking" in `setup`.
272
+
273
+ | Group | Tools | Risk |
274
+ | --- | :---: | --- |
275
+ | `read` | 46 | Reads search data of your sites. It never asks. |
276
+ | `submit` | 10 | Sends URLs, content and sitemaps to search engines, and adds sites. Uses daily quota. |
277
+ | `visibility` | 14 | Can remove pages or the whole site from search results, and slow the crawl. |
278
+ | `access` | 4 | Can remove or move a site, or give or remove the access of other people. |
279
+
280
+ - The default for `submit`, `visibility` and `access` is "ask first". Only the configuration file of your user holds this choice. No argument and no environment variable changes it.
281
+ - The dialog shows the tool, the risk, the site and the values of the call, written by the server. It shows no secret. You can accept for one call (`once`) or for the same group on the same site until the server stops (`session`). The `access` group never offers `session`.
282
+ - A decline or a cancel sends nothing. The dialog waits 10 minutes at most.
283
+ - `submit_urls_google` with `URL_DELETED` uses the rules of `visibility`.
284
+ - A client that cannot show dialogs (no form `elicitation` support) runs the call. The tool prompt of the client is then the only approval, and the first risky result of the session starts with a warning. `engine_status` shows whether your client supports dialogs. The `visibility` and `access` tools also ask Claude Code at each call through `_meta["anthropic/requiresUserInteraction"]`.
285
+ - Approvals are not a sandbox. An agent with shell access can change the configuration file. A client that approves tools automatically removes the client prompt.
286
+
287
+ A successful write means that Bing accepted the request. It does not mean that Bing applied it.
288
+
289
+ Bing returned HTTP 404 for `bing_get_site_moves`, `bing_get_deep_link` and `bing_get_deep_link_algo_urls` in December 2026.
290
+
291
+ ---
292
+
293
+ ## 💬 Example AI Assistant Prompts
294
+
295
+ Once configured in Claude or Cursor, you can interact with your search data in plain English:
296
+
297
+ - *"Check search engine provider status to see what is connected."*
298
+ - *"List all my verified websites across Google and Bing."*
299
+ - *"Which pages lost Bing clicks in the last 8 weeks, and for which queries?"*
300
+ - *"Group the current Bing crawl issues for my site."*
301
+ - *"Show me the top 20 queries for my site on Google over the last 28 days."*
302
+ - *"Find pages that get high impressions but low click-through rates (CTR < 2%)."*
303
+ - *"Inspect https://example.com/blog/latest-post and tell me if it has any schema errors or mobile usability issues."*
304
+ - *"Check all submitted sitemaps for my site and report indexing health."*
305
+ - *"I just published 5 new blog posts: [URL list]. Submit them to IndexNow immediately."*
306
+ - *"Notify Google that these 2 job postings were updated via the Indexing API."*
307
+
308
+ ---
309
+
310
+ ## ❓ Troubleshooting & FAQs
311
+
312
+ ### 1. `Permission error (403): User does not have sufficient permission`
313
+ - **Cause:** The service account has not been added as a user to your property in Google Search Console.
314
+ - **Fix:** In Google Search Console, go to **Settings → Users and permissions → Add user** and paste the exact email of your service account.
315
+
316
+ ### 2. `Site URL not found`
317
+ - **Cause:** Search Console differentiates between domain properties (`sc-domain:example.com`) and URL prefix properties (`https://example.com/`).
318
+ - **Fix:** Run the `list_sites` tool first to view the exact property string format for your website.
319
+
320
+ ### 3. `Bing Webmaster API rejected the API key`
321
+ - **Cause:** Missing or invalid Bing API key (`BING_WEBMASTER_API_KEY` or the key in the configuration file).
322
+ - **Fix:** Re-generate your API key in Bing Webmaster Tools (Settings → API Access → API Key) and ensure there are no leading/trailing spaces in your config.
323
+
324
+ ### 4. The `bing_` tools are not in the tool list
325
+ - **Cause:** The server lists the 61 `bing_` tools only when Bing has a key at the start.
326
+ - **Fix:** Run the setup, or set `BING_WEBMASTER_API_KEY`. Then restart your client. `seo-webmaster-mcp status` shows whether the server finds a key.
327
+
328
+ ### 5. `The user did not approve <tool>` or `The user rejected <tool>`
329
+ - **Cause:** You declined or cancelled the approval dialog, or the dialog got no answer in 10 minutes. The server sent nothing.
330
+ - **Fix:** Ask for the call again. To skip the dialog for a group, run the setup and choose Approvals.
331
+
332
+ ### 6. `Bing URL inspection returns UNKNOWN`
333
+ - **Explanation:** Unlike Google, the Bing Webmaster Tools API does not offer URL-level live inspection. The server returns coarse crawl stats if available, and transparently marks inspection verdict as `UNKNOWN` rather than fabricating data.
334
+
335
+ ---
336
+
337
+ ## 💻 Local Development & Contributing
338
+
339
+ Contributions are welcome! Please ensure all pull requests follow the project standards.
340
+
341
+ ```bash
342
+ # Clone the repository
343
+ git clone https://github.com/itsaakashpatel/seo-webmaster-mcp.git
344
+ cd seo-webmaster-mcp
345
+
346
+ # Install dependencies
347
+ npm install
348
+
349
+ # Compile TypeScript
350
+ npm run build
351
+
352
+ # Run unit tests
353
+ npm test
354
+
355
+ # Run linter (oxlint)
356
+ npm run lint
357
+
358
+ # Check code formatting (oxfmt)
359
+ npm run format:check
360
+ ```
361
+
362
+ ### Pull Requests
363
+ When opening a pull request, please use the template located at [`.github/pull_request_template.md`](.github/pull_request_template.md) and adhere to the guidelines in [`AGENTS.md`](AGENTS.md).
364
+
365
+ ---
366
+
367
+ ## 📦 Release
368
+
369
+ Add an npm automation token as the `NPM_TOKEN` repository secret. Do this one time only.
370
+
371
+ 1. Set the new version in `package.json`, `server.json` (two places) and `src/core/constants.ts`. `npm test` fails if they differ.
372
+ 2. Merge the change into `main`.
373
+ 3. Push a tag that matches the version, for example `git tag v1.1.0 && git push origin v1.1.0`.
374
+
375
+ The `publish` workflow then publishes to npm and to the MCP Registry.
376
+
377
+ ---
378
+
379
+ ## 📄 License
380
+
381
+ MIT © [Aakash Patel](https://github.com/itsaakashpatel)
@@ -0,0 +1,29 @@
1
+ import { type ApprovalGroup } from "./groups.js";
2
+ export declare const MAX_VALUE_CHARS = 200;
3
+ export declare const MAX_LISTED_ITEMS = 10;
4
+ /** One line of at most 200 characters. A cut value ends with `…`. */
5
+ export declare function cleanValue(text: string): string;
6
+ /** A list shows its count and its first 10 items. */
7
+ export declare function formatDialogValue(value: unknown): string;
8
+ /** The inputs that the dialog shows, in the order of the call. */
9
+ export declare function visibleFields(args: Readonly<Record<string, unknown>>): Array<[string, unknown]>;
10
+ export interface DialogContent {
11
+ readonly tool: string;
12
+ readonly group: ApprovalGroup;
13
+ readonly siteLabel: string;
14
+ readonly fields: ReadonlyArray<readonly [string, unknown]>;
15
+ readonly before?: Record<string, unknown>;
16
+ readonly after?: Record<string, unknown>;
17
+ }
18
+ /** The server writes all of this text. The agent adds no text of its own. */
19
+ export declare function renderDialogMessage(content: DialogContent): string;
20
+ /** The site key of a session approval: without a trailing slash, in lowercase. */
21
+ export declare function normalizeSite(siteUrl: string): string;
22
+ export interface SiteInfo {
23
+ readonly label: string;
24
+ /** Empty when the call has more than one site. Then the dialog offers no session choice. */
25
+ readonly sessionKey: string | undefined;
26
+ }
27
+ export declare function siteOfSiteUrl(siteUrl: string): SiteInfo;
28
+ /** A tool without `siteUrl` uses the host of its URLs. */
29
+ export declare function siteOfUrls(urls: readonly string[]): SiteInfo;
@@ -0,0 +1,88 @@
1
+ import { SERVER_NAME } from "../core/constants.js";
2
+ import { isRecord } from "../core/guards.js";
3
+ import { parseHttpUrl } from "../core/urls.js";
4
+ import { GROUP_RISK } from "./groups.js";
5
+ export const MAX_VALUE_CHARS = 200;
6
+ export const MAX_LISTED_ITEMS = 10;
7
+ /** Inputs that never appear in a dialog: secrets and confirmation flags. */
8
+ const HIDDEN_INPUTS = new Set([
9
+ "authenticationCode",
10
+ "key",
11
+ "confirmSiteUrl",
12
+ "confirmFullSiteRemoval",
13
+ ]);
14
+ // Control characters, line breaks, and characters that hide or reorder text. Code points are
15
+ // compared as numbers, so no invisible character appears in this file.
16
+ const UNSAFE_RANGES = [
17
+ [0x0000, 0x001f],
18
+ [0x007f, 0x009f],
19
+ [0x200b, 0x200f],
20
+ [0x2028, 0x202e],
21
+ [0x2066, 0x2069],
22
+ [0xfeff, 0xfeff],
23
+ ];
24
+ function isSafeChar(char) {
25
+ const point = char.codePointAt(0) ?? 0;
26
+ return !UNSAFE_RANGES.some(([low, high]) => point >= low && point <= high);
27
+ }
28
+ /** One line of at most 200 characters. A cut value ends with `…`. */
29
+ export function cleanValue(text) {
30
+ const clean = Array.from(text).filter(isSafeChar).join("");
31
+ return clean.length <= MAX_VALUE_CHARS ? clean : `${clean.slice(0, MAX_VALUE_CHARS - 1)}…`;
32
+ }
33
+ function formatScalar(value) {
34
+ if (typeof value === "string") {
35
+ return cleanValue(value);
36
+ }
37
+ if (value === null || value === undefined) {
38
+ return "-";
39
+ }
40
+ return cleanValue(typeof value === "object" ? JSON.stringify(value) : String(value));
41
+ }
42
+ /** A list shows its count and its first 10 items. */
43
+ export function formatDialogValue(value) {
44
+ if (!Array.isArray(value)) {
45
+ return formatScalar(value);
46
+ }
47
+ const shown = value.slice(0, MAX_LISTED_ITEMS).map(formatScalar).join(", ");
48
+ const more = value.length > MAX_LISTED_ITEMS ? `, first ${MAX_LISTED_ITEMS}` : "";
49
+ return `${value.length} items${more}: ${shown}`;
50
+ }
51
+ /** The inputs that the dialog shows, in the order of the call. */
52
+ export function visibleFields(args) {
53
+ return Object.entries(args).filter(([name, value]) => !HIDDEN_INPUTS.has(name) && value !== undefined && name !== "siteUrl");
54
+ }
55
+ function changeLines(label, values) {
56
+ if (!isRecord(values)) {
57
+ return [];
58
+ }
59
+ return [`${label}: ${formatDialogValue(values)}`];
60
+ }
61
+ /** The server writes all of this text. The agent adds no text of its own. */
62
+ export function renderDialogMessage(content) {
63
+ return [
64
+ `${SERVER_NAME} wants to run ${content.tool}`,
65
+ `Risk: ${GROUP_RISK[content.group]}`,
66
+ `Site: ${cleanValue(content.siteLabel)}`,
67
+ ...content.fields.map(([name, value]) => `${cleanValue(name)}: ${formatDialogValue(value)}`),
68
+ ...changeLines("Before", content.before),
69
+ ...changeLines("After", content.after),
70
+ ].join("\n");
71
+ }
72
+ /** The site key of a session approval: without a trailing slash, in lowercase. */
73
+ export function normalizeSite(siteUrl) {
74
+ return siteUrl.trim().replace(/\/+$/, "").toLowerCase();
75
+ }
76
+ export function siteOfSiteUrl(siteUrl) {
77
+ return { label: siteUrl, sessionKey: normalizeSite(siteUrl) };
78
+ }
79
+ /** A tool without `siteUrl` uses the host of its URLs. */
80
+ export function siteOfUrls(urls) {
81
+ const hosts = [
82
+ ...new Set(urls.flatMap((url) => parseHttpUrl(url)?.hostname.toLowerCase() ?? [])),
83
+ ];
84
+ const [only] = hosts;
85
+ return only !== undefined && hosts.length === 1
86
+ ? { label: only, sessionKey: only }
87
+ : { label: hosts.join(", ") || "unknown", sessionKey: undefined };
88
+ }
@@ -0,0 +1,23 @@
1
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ import type { ToolResult } from "../core/responses.js";
3
+ import { type DialogContent } from "./format.js";
4
+ export declare const DIALOG_TIMEOUT_MS: number;
5
+ export declare const NO_DIALOG_NOTICE = "This client cannot show approval dialogs. The server did not ask you before this change.";
6
+ export interface ApprovalRequest extends DialogContent {
7
+ /** The site of the call, in the form of a session key. Empty when there is no single site. */
8
+ readonly sessionKey: string | undefined;
9
+ readonly signal?: AbortSignal;
10
+ }
11
+ export interface ApprovalOutcome {
12
+ /** Text for the start of the result. */
13
+ readonly notice?: string;
14
+ }
15
+ /** True when the client sent the `elicitation` capability with form mode. */
16
+ export declare function clientSupportsDialogs(server: McpServer): boolean;
17
+ /**
18
+ * Decides before the server sends any request. It returns when the call may run. It throws an
19
+ * `ApprovalError` when the user declines, cancels, or does not answer in 10 minutes.
20
+ */
21
+ export declare function requireApproval(server: McpServer, request: ApprovalRequest): Promise<ApprovalOutcome>;
22
+ /** Adds the notice to the first text block of a result. */
23
+ export declare function prependNotice(result: ToolResult, outcome: ApprovalOutcome): ToolResult;