yandex-webmaster-mcp 1.2.0 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/package.json +10 -7
- package/src/index.mjs +10 -6
package/LICENSE
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "yandex-webmaster-mcp",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"description": "MCP server for Yandex Webmaster API - site analytics, indexing status, search queries, and SEO diagnostics",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.mjs",
|
|
@@ -28,22 +28,25 @@
|
|
|
28
28
|
"claude",
|
|
29
29
|
"ai"
|
|
30
30
|
],
|
|
31
|
-
"author":
|
|
31
|
+
"author": {
|
|
32
|
+
"name": "Seyka AI",
|
|
33
|
+
"url": "https://seyka.ru"
|
|
34
|
+
},
|
|
32
35
|
"license": "MIT",
|
|
33
36
|
"repository": {
|
|
34
37
|
"type": "git",
|
|
35
|
-
"url": "git+https://github.com/
|
|
38
|
+
"url": "git+https://github.com/seyka-ai/yandex-tools-mcp.git",
|
|
36
39
|
"directory": "packages/yandex-webmaster-mcp"
|
|
37
40
|
},
|
|
38
41
|
"bugs": {
|
|
39
|
-
"url": "https://github.com/
|
|
42
|
+
"url": "https://github.com/seyka-ai/yandex-tools-mcp/issues"
|
|
40
43
|
},
|
|
41
|
-
"homepage": "https://github.com/
|
|
44
|
+
"homepage": "https://github.com/seyka-ai/yandex-tools-mcp/tree/main/packages/yandex-webmaster-mcp#readme",
|
|
42
45
|
"engines": {
|
|
43
46
|
"node": ">=18.0.0"
|
|
44
47
|
},
|
|
45
48
|
"dependencies": {
|
|
46
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
47
|
-
"zod": "^4.
|
|
49
|
+
"@modelcontextprotocol/sdk": "^1.32.2",
|
|
50
|
+
"zod": "^4.6.7"
|
|
48
51
|
}
|
|
49
52
|
}
|
package/src/index.mjs
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
+
import { createRequire } from 'node:module';
|
|
3
4
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
4
5
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
5
6
|
import { z } from 'zod';
|
|
6
7
|
|
|
8
|
+
// Reported to MCP clients; read from package.json so it can't drift from releases.
|
|
9
|
+
const { version } = createRequire(import.meta.url)('../package.json');
|
|
10
|
+
|
|
7
11
|
// Handle CLI commands
|
|
8
12
|
const command = process.argv[2];
|
|
9
13
|
if (command === 'auth') {
|
|
@@ -14,7 +18,7 @@ if (command === 'auth') {
|
|
|
14
18
|
}
|
|
15
19
|
|
|
16
20
|
async function runServer() {
|
|
17
|
-
const BASE_URL = 'https://api.webmaster.yandex.net/v4';
|
|
21
|
+
const BASE_URL = process.env.YANDEX_WEBMASTER_BASE_URL || 'https://api.webmaster.yandex.net/v4';
|
|
18
22
|
|
|
19
23
|
// Cache user_id for the session
|
|
20
24
|
let cachedUserId = null;
|
|
@@ -174,7 +178,7 @@ async function runServer() {
|
|
|
174
178
|
{ id: 16, name: 'Ярославль' },
|
|
175
179
|
];
|
|
176
180
|
|
|
177
|
-
const server = new McpServer({ name: 'yandex-webmaster', version
|
|
181
|
+
const server = new McpServer({ name: 'yandex-webmaster', version });
|
|
178
182
|
|
|
179
183
|
// ============ Core Tools ============
|
|
180
184
|
|
|
@@ -629,7 +633,7 @@ async function runServer() {
|
|
|
629
633
|
},
|
|
630
634
|
},
|
|
631
635
|
async ({ host_id, date_from, date_to }) => {
|
|
632
|
-
let endpoint = await hostEndpoint(host_id, '/
|
|
636
|
+
let endpoint = await hostEndpoint(host_id, '/search-urls/in-search/history');
|
|
633
637
|
const params = new URLSearchParams();
|
|
634
638
|
if (date_from) params.set('date_from', formatDate(date_from));
|
|
635
639
|
if (date_to) params.set('date_to', formatDate(date_to));
|
|
@@ -662,7 +666,7 @@ async function runServer() {
|
|
|
662
666
|
},
|
|
663
667
|
},
|
|
664
668
|
async ({ host_id, limit = 10, offset }) => {
|
|
665
|
-
let endpoint = await hostEndpoint(host_id, '/
|
|
669
|
+
let endpoint = await hostEndpoint(host_id, '/search-urls/in-search/samples');
|
|
666
670
|
const params = new URLSearchParams();
|
|
667
671
|
params.set('limit', limit.toString());
|
|
668
672
|
if (offset) params.set('offset', offset.toString());
|
|
@@ -825,7 +829,7 @@ async function runServer() {
|
|
|
825
829
|
},
|
|
826
830
|
},
|
|
827
831
|
async ({ host_id, limit = 10, offset }) => {
|
|
828
|
-
let endpoint = await hostEndpoint(host_id, '/links/internal/samples');
|
|
832
|
+
let endpoint = await hostEndpoint(host_id, '/links/internal/broken/samples');
|
|
829
833
|
const params = new URLSearchParams();
|
|
830
834
|
params.set('limit', limit.toString());
|
|
831
835
|
if (offset) params.set('offset', offset.toString());
|
|
@@ -857,7 +861,7 @@ async function runServer() {
|
|
|
857
861
|
},
|
|
858
862
|
},
|
|
859
863
|
async ({ host_id, date_from, date_to }) => {
|
|
860
|
-
let endpoint = await hostEndpoint(host_id, '/links/internal/history');
|
|
864
|
+
let endpoint = await hostEndpoint(host_id, '/links/internal/broken/history');
|
|
861
865
|
const params = new URLSearchParams();
|
|
862
866
|
if (date_from) params.set('date_from', formatDate(date_from));
|
|
863
867
|
if (date_to) params.set('date_to', formatDate(date_to));
|