@rivi-software/agentic-seo-check 0.6.0 → 0.7.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.
- package/README.md +46 -7
- package/dist/brand.d.ts +1 -0
- package/dist/brand.js +1 -1
- package/dist/brand.js.map +1 -1
- package/dist/core/aeo/audit.js +31 -5
- package/dist/core/aeo/audit.js.map +1 -1
- package/dist/core/aeo/probe.d.ts +2 -0
- package/dist/core/aeo/probe.js +7 -2
- package/dist/core/aeo/probe.js.map +1 -1
- package/dist/core/aeo/site-rules.d.ts +2 -0
- package/dist/core/aeo/site-rules.js +6 -0
- package/dist/core/aeo/site-rules.js.map +1 -1
- package/dist/core/audit.d.ts +4 -0
- package/dist/core/audit.js +3 -0
- package/dist/core/audit.js.map +1 -1
- package/dist/core/crawl.d.ts +11 -2
- package/dist/core/crawl.js +176 -90
- package/dist/core/crawl.js.map +1 -1
- package/dist/core/fetch.d.ts +40 -0
- package/dist/core/fetch.js +74 -15
- package/dist/core/fetch.js.map +1 -1
- package/dist/core/hosted.d.ts +54 -0
- package/dist/core/hosted.js +134 -0
- package/dist/core/hosted.js.map +1 -0
- package/dist/core/refusals.d.ts +27 -0
- package/dist/core/refusals.js +56 -0
- package/dist/core/refusals.js.map +1 -0
- package/dist/core/robots.d.ts +12 -3
- package/dist/core/robots.js +20 -15
- package/dist/core/robots.js.map +1 -1
- package/dist/core/rules/aeo.js +11 -0
- package/dist/core/rules/aeo.js.map +1 -1
- package/dist/core/rules/response.js +13 -0
- package/dist/core/rules/response.js.map +1 -1
- package/dist/core/site-probes.d.ts +3 -0
- package/dist/core/site-probes.js +10 -2
- package/dist/core/site-probes.js.map +1 -1
- package/dist/core/site-rules.d.ts +6 -0
- package/dist/core/site-rules.js +125 -29
- package/dist/core/site-rules.js.map +1 -1
- package/dist/core/sitemap.d.ts +22 -3
- package/dist/core/sitemap.js +29 -10
- package/dist/core/sitemap.js.map +1 -1
- package/dist/core/types.d.ts +2 -0
- package/dist/core/types.js.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/mcp-hosted.d.ts +47 -0
- package/dist/mcp-hosted.js +347 -0
- package/dist/mcp-hosted.js.map +1 -0
- package/dist/mcp-shared.d.ts +135 -0
- package/dist/mcp-shared.js +122 -0
- package/dist/mcp-shared.js.map +1 -0
- package/dist/mcp.d.ts +10 -1
- package/dist/mcp.js +11 -118
- package/dist/mcp.js.map +1 -1
- package/dist/version.d.ts +8 -0
- package/dist/version.js +6 -3
- package/dist/version.js.map +1 -1
- package/package.json +10 -3
- package/skills/seo-audit/SKILL.md +2 -0
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { auditAeoHtml, auditAeoSite, auditAeoUrl } from "./core/aeo/audit.js";
|
|
3
|
+
import { auditHtml, auditSite, auditUrl } from "./core/audit.js";
|
|
4
|
+
import { RequestRefusedError } from "./core/fetch.js";
|
|
5
|
+
import { HOSTED_LIMITS, hostedGate, hostedUrlProblem, LOCAL_SERVER, } from "./core/hosted.js";
|
|
6
|
+
import { commonOptions, detail, fail, format, LIST_RULES, listRules, respond, respondAeo, toOptions, } from "./mcp-shared.js";
|
|
7
|
+
const LIMITS = HOSTED_LIMITS;
|
|
8
|
+
/** What every hosted tool says it cannot do, and where to go instead. */
|
|
9
|
+
const HOSTED_NOTE = `This is the hosted server: it requests pages from Cloudflare's network, so it cannot reach localhost, private networks or sites behind a login, cannot read build directories, does not render JavaScript or run Lighthouse, and limits requests per site and per caller. The local server does all of that: \`${LOCAL_SERVER}\`. `;
|
|
10
|
+
const description = (schema) => schema.description ?? "";
|
|
11
|
+
const ruleIds = (base) => z
|
|
12
|
+
.array(z.string().max(LIMITS.maxRuleIdChars))
|
|
13
|
+
.max(LIMITS.maxRuleIds)
|
|
14
|
+
.optional()
|
|
15
|
+
.describe(description(base));
|
|
16
|
+
/** The local server's common options, capped, without `userAgent` and `headers`. */
|
|
17
|
+
const hostedOptions = {
|
|
18
|
+
keyword: z
|
|
19
|
+
.string()
|
|
20
|
+
.max(LIMITS.maxKeywordChars)
|
|
21
|
+
.optional()
|
|
22
|
+
.describe(description(commonOptions.keyword)),
|
|
23
|
+
includeInfo: commonOptions.includeInfo,
|
|
24
|
+
disableRules: ruleIds(commonOptions.disableRules),
|
|
25
|
+
rules: ruleIds(commonOptions.rules),
|
|
26
|
+
baseline: z
|
|
27
|
+
.array(z.string().max(LIMITS.maxBaselineIdChars))
|
|
28
|
+
.max(LIMITS.maxBaselineIds)
|
|
29
|
+
.optional()
|
|
30
|
+
.describe(description(commonOptions.baseline)),
|
|
31
|
+
timeoutMs: z
|
|
32
|
+
.number()
|
|
33
|
+
.int()
|
|
34
|
+
.min(1000)
|
|
35
|
+
.max(LIMITS.timeoutMs)
|
|
36
|
+
.optional()
|
|
37
|
+
.describe(`Per-request timeout in milliseconds (default and most ${LIMITS.timeoutMs}).`),
|
|
38
|
+
format,
|
|
39
|
+
detail,
|
|
40
|
+
};
|
|
41
|
+
const url = z.string().url().max(2048);
|
|
42
|
+
const html = z
|
|
43
|
+
.string()
|
|
44
|
+
.max(LIMITS.maxHtmlChars)
|
|
45
|
+
.optional()
|
|
46
|
+
.describe(`Raw HTML to audit instead of fetching a URL, up to ${LIMITS.maxHtmlChars.toLocaleString("en")} characters.`);
|
|
47
|
+
const patterns = (what) => z
|
|
48
|
+
.array(z.string().max(LIMITS.maxPatternChars))
|
|
49
|
+
.max(LIMITS.maxPatterns)
|
|
50
|
+
.optional()
|
|
51
|
+
.describe(`${what} (at most ${LIMITS.maxPatterns}, of ${LIMITS.maxPatternChars} characters each).`);
|
|
52
|
+
const crawlLimits = {
|
|
53
|
+
maxDepth: z
|
|
54
|
+
.number()
|
|
55
|
+
.int()
|
|
56
|
+
.min(0)
|
|
57
|
+
.max(LIMITS.maxDepth)
|
|
58
|
+
.default(LIMITS.maxDepth)
|
|
59
|
+
.describe(`Maximum link depth from the start URL (at most ${LIMITS.maxDepth}).`),
|
|
60
|
+
concurrency: z
|
|
61
|
+
.number()
|
|
62
|
+
.int()
|
|
63
|
+
.min(1)
|
|
64
|
+
.max(LIMITS.concurrency)
|
|
65
|
+
.default(LIMITS.concurrency)
|
|
66
|
+
.describe(`Parallel requests (at most ${LIMITS.concurrency}).`),
|
|
67
|
+
};
|
|
68
|
+
/** The page count of an answer, for the record of the call. */
|
|
69
|
+
const pagesOf = (audit) => audit.kind === "page" ? 1 : (audit.pages?.length ?? 1);
|
|
70
|
+
/** The host of a URL to audit, once the address rules allow it; throws their answer otherwise. */
|
|
71
|
+
const allowedHost = (target) => {
|
|
72
|
+
const parsed = new URL(target);
|
|
73
|
+
const problem = hostedUrlProblem(parsed);
|
|
74
|
+
if (problem) {
|
|
75
|
+
throw new Error(problem);
|
|
76
|
+
}
|
|
77
|
+
return parsed.hostname;
|
|
78
|
+
};
|
|
79
|
+
/** The answer of a tool's work, or its error as a tool error, and how the call ended. */
|
|
80
|
+
const settle = async (work) => {
|
|
81
|
+
try {
|
|
82
|
+
const { result, pages } = await work();
|
|
83
|
+
return { result, end: { outcome: "ok", pages } };
|
|
84
|
+
}
|
|
85
|
+
catch (error) {
|
|
86
|
+
return {
|
|
87
|
+
result: fail(error),
|
|
88
|
+
end: {
|
|
89
|
+
outcome: error instanceof RequestRefusedError ? "refused" : "error",
|
|
90
|
+
pages: 0,
|
|
91
|
+
},
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
/**
|
|
96
|
+
* Runs one tool call through the hosted profile: `startCall` may refuse it, every request goes
|
|
97
|
+
* through the hosted gate, and `end` hears how it went, once the answer is ready.
|
|
98
|
+
*/
|
|
99
|
+
const runCall = async (profile, info, work) => {
|
|
100
|
+
let call;
|
|
101
|
+
try {
|
|
102
|
+
call = await profile.startCall(info);
|
|
103
|
+
}
|
|
104
|
+
catch (error) {
|
|
105
|
+
return fail(error);
|
|
106
|
+
}
|
|
107
|
+
const { result, end } = await settle(() => work({
|
|
108
|
+
userAgent: profile.userAgent,
|
|
109
|
+
maxBodyBytes: LIMITS.maxBodyBytes,
|
|
110
|
+
gate: hostedGate(call.gate),
|
|
111
|
+
}));
|
|
112
|
+
try {
|
|
113
|
+
call.end?.(end);
|
|
114
|
+
}
|
|
115
|
+
catch {
|
|
116
|
+
// The record of a call is the server's to keep; failing to keep it never costs the caller
|
|
117
|
+
// the answer.
|
|
118
|
+
}
|
|
119
|
+
return result;
|
|
120
|
+
};
|
|
121
|
+
/** The options of an audit on the hosted server: the caller's, with the hosted fetch. */
|
|
122
|
+
const auditOptions = (input, fetch) => ({
|
|
123
|
+
...toOptions(input),
|
|
124
|
+
fetch: { ...fetch, timeoutMs: input.timeoutMs },
|
|
125
|
+
});
|
|
126
|
+
const registerAuditPage = (server, profile) => {
|
|
127
|
+
server.registerTool("seo_audit_page", {
|
|
128
|
+
title: "Audit one page for SEO",
|
|
129
|
+
description: `Audit a single page and return prioritised, actionable findings (rule id, severity, message, recommendation, CSS selector, evidence) with a \`fix\` for each: the exact edits that resolve it, quoting the code to replace (\`{{…}}\` marks words the author writes). ` +
|
|
130
|
+
`Checks title, meta description, headings, canonical, robots/noindex, viewport/lang, Open Graph/Twitter cards, images, links, hreflang, structured data (JSON-LD/microdata), content quality and the HTTP response. ` +
|
|
131
|
+
`Provide either \`url\` (a public http(s) URL) or \`html\` (raw HTML string, e.g. from a template or test render). ${HOSTED_NOTE}Typical workflow: audit, apply the \`fix\` of each error and warning in the source code, then re-check with \`rules\` (the rules you fixed) and \`baseline\` (the finding ids) to confirm they are fixed and nothing new appeared.`,
|
|
132
|
+
inputSchema: {
|
|
133
|
+
url: url
|
|
134
|
+
.optional()
|
|
135
|
+
.describe("Absolute http(s) URL to fetch and audit."),
|
|
136
|
+
html,
|
|
137
|
+
baseUrl: z
|
|
138
|
+
.string()
|
|
139
|
+
.url()
|
|
140
|
+
.optional()
|
|
141
|
+
.describe("With `html`: the URL the HTML would be served at (used to resolve links and classify them as internal/external)."),
|
|
142
|
+
...hostedOptions,
|
|
143
|
+
},
|
|
144
|
+
annotations: {
|
|
145
|
+
readOnlyHint: true,
|
|
146
|
+
openWorldHint: true,
|
|
147
|
+
idempotentHint: true,
|
|
148
|
+
},
|
|
149
|
+
}, (input) => {
|
|
150
|
+
const { html: source, url: target } = input;
|
|
151
|
+
// `html` wins over `url`; an empty `html` counts only when a `url` came with it.
|
|
152
|
+
const inline = source !== undefined && Boolean(source || target);
|
|
153
|
+
if (!inline && !target) {
|
|
154
|
+
return fail(new Error("Provide `url` or `html`."));
|
|
155
|
+
}
|
|
156
|
+
let host = null;
|
|
157
|
+
try {
|
|
158
|
+
host = inline || !target ? null : allowedHost(target);
|
|
159
|
+
}
|
|
160
|
+
catch (error) {
|
|
161
|
+
return fail(error);
|
|
162
|
+
}
|
|
163
|
+
return runCall(profile, { tool: "seo_audit_page", fetches: !inline, crawl: false, host }, async (fetch) => {
|
|
164
|
+
const options = {
|
|
165
|
+
...auditOptions(input, fetch),
|
|
166
|
+
baseUrl: input.baseUrl,
|
|
167
|
+
};
|
|
168
|
+
const audit = inline || !target
|
|
169
|
+
? await auditHtml(source ?? "", { url: input.baseUrl, source: "html", target: "inline-html" }, options)
|
|
170
|
+
: await auditUrl(target, options);
|
|
171
|
+
return {
|
|
172
|
+
result: respond(audit, input.format, input.detail),
|
|
173
|
+
pages: 1,
|
|
174
|
+
};
|
|
175
|
+
});
|
|
176
|
+
});
|
|
177
|
+
};
|
|
178
|
+
const registerCrawlSite = (server, profile) => {
|
|
179
|
+
server.registerTool("seo_crawl_site", {
|
|
180
|
+
title: "Crawl a site and audit every page",
|
|
181
|
+
description: `Crawl internal links from a start URL (at most ${LIMITS.maxPages} pages, depth ${LIMITS.maxDepth}), audit every HTML page, and run site-wide checks: robots.txt, XML sitemap coverage (missing/noindex/non-canonical/broken URLs), broken internal links with their sources, redirect chains, duplicate titles/descriptions/H1s/content, orphan and deep pages, soft-404 behaviour, http→https and www redirects, hreflang return links. ` +
|
|
182
|
+
`Returns site findings plus \`issues\` (page findings rolled up by rule with example URLs) and per-page scores. Use seo_audit_page on a specific URL for full per-page detail. ` +
|
|
183
|
+
`The crawl obeys robots.txt (a group for agentic-seo-check included), checks at most ${LIMITS.maxLinkChecks} link targets and reads at most ${LIMITS.maxSitemaps} sitemaps. ${HOSTED_NOTE}`,
|
|
184
|
+
inputSchema: {
|
|
185
|
+
url: url.describe("Start URL (usually the homepage)."),
|
|
186
|
+
maxPages: z
|
|
187
|
+
.number()
|
|
188
|
+
.int()
|
|
189
|
+
.min(1)
|
|
190
|
+
.max(LIMITS.maxPages)
|
|
191
|
+
.default(LIMITS.maxPages)
|
|
192
|
+
.describe(`Maximum pages to fetch (at most ${LIMITS.maxPages}).`),
|
|
193
|
+
...crawlLimits,
|
|
194
|
+
delayMs: z
|
|
195
|
+
.number()
|
|
196
|
+
.int()
|
|
197
|
+
.min(0)
|
|
198
|
+
.max(5000)
|
|
199
|
+
.default(0)
|
|
200
|
+
.describe("Delay between requests per worker (politeness)."),
|
|
201
|
+
includeSubdomains: z
|
|
202
|
+
.boolean()
|
|
203
|
+
.default(false)
|
|
204
|
+
.describe("Treat subdomains of the start host as internal."),
|
|
205
|
+
checkExternalLinks: z
|
|
206
|
+
.boolean()
|
|
207
|
+
.default(false)
|
|
208
|
+
.describe(`Also probe external link targets for 4xx/5xx (at most ${LIMITS.maxLinkChecks}; slower).`),
|
|
209
|
+
includePatterns: patterns("Only crawl URLs matching one of these regular expressions"),
|
|
210
|
+
excludePatterns: patterns("Skip URLs matching any of these regular expressions"),
|
|
211
|
+
pageDetail: z
|
|
212
|
+
.enum(["summary", "full"])
|
|
213
|
+
.default("summary")
|
|
214
|
+
.describe("summary: per-page scores/counts only (findings are rolled up in `issues`); full: every finding on every page."),
|
|
215
|
+
...hostedOptions,
|
|
216
|
+
},
|
|
217
|
+
annotations: { readOnlyHint: true, openWorldHint: true },
|
|
218
|
+
}, (input) => {
|
|
219
|
+
let host;
|
|
220
|
+
try {
|
|
221
|
+
host = allowedHost(input.url);
|
|
222
|
+
}
|
|
223
|
+
catch (error) {
|
|
224
|
+
return fail(error);
|
|
225
|
+
}
|
|
226
|
+
return runCall(profile, { tool: "seo_crawl_site", fetches: true, crawl: true, host }, async (fetch) => {
|
|
227
|
+
const audit = await auditSite(input.url, {
|
|
228
|
+
...auditOptions(input, fetch),
|
|
229
|
+
maxPages: input.maxPages,
|
|
230
|
+
maxDepth: input.maxDepth,
|
|
231
|
+
concurrency: input.concurrency,
|
|
232
|
+
delayMs: input.delayMs,
|
|
233
|
+
respectRobots: true,
|
|
234
|
+
includeSubdomains: input.includeSubdomains,
|
|
235
|
+
checkExternalLinks: input.checkExternalLinks,
|
|
236
|
+
maxLinkChecks: LIMITS.maxLinkChecks,
|
|
237
|
+
includePatterns: input.includePatterns,
|
|
238
|
+
excludePatterns: input.excludePatterns,
|
|
239
|
+
pageDetail: input.pageDetail,
|
|
240
|
+
maxSitemaps: LIMITS.maxSitemaps,
|
|
241
|
+
maxSitemapBytes: LIMITS.maxSitemapBytes,
|
|
242
|
+
});
|
|
243
|
+
return {
|
|
244
|
+
result: respond(audit, input.format, input.detail),
|
|
245
|
+
pages: pagesOf(audit),
|
|
246
|
+
};
|
|
247
|
+
});
|
|
248
|
+
});
|
|
249
|
+
};
|
|
250
|
+
const registerAeoAudit = (server, profile) => {
|
|
251
|
+
server.registerTool("seo_aeo_audit", {
|
|
252
|
+
title: "Audit a page or site for answer engines (AEO)",
|
|
253
|
+
description: `Answer engine optimization audit: can AI answer engines (ChatGPT search, Claude, Perplexity, Google AI Overviews and AI Mode, Copilot, Gemini) reach, quote and trust the content? ` +
|
|
254
|
+
`Checks robots.txt for each AI crawler (search crawlers, answer bots, training bots), Content-Signal lines and the shared \`__usage_ai-training\` opt-out, /llms.txt, nosnippet/max-snippet/data-nosnippet, Bing's noarchive/nocache for Copilot, noai, content that needs JavaScript, question headings without a direct answer, FAQPage/HowTo markup that the page does not show, article author and dates, and Organization/Person entities with sameAs. ` +
|
|
255
|
+
`Returns its own AEO score, a per-bot \`crawlers\` table and findings with rule ids (aeo.*). ` +
|
|
256
|
+
`Provide one of \`url\` (one page, or a site with \`crawl: true\`) or \`html\`. ${HOSTED_NOTE}The local server can also request the page with each AI bot's User-Agent (\`aiBots\`).`,
|
|
257
|
+
inputSchema: {
|
|
258
|
+
url: url
|
|
259
|
+
.optional()
|
|
260
|
+
.describe("Absolute http(s) URL to audit (the start URL with `crawl`)."),
|
|
261
|
+
html: z
|
|
262
|
+
.string()
|
|
263
|
+
.max(LIMITS.maxHtmlChars)
|
|
264
|
+
.optional()
|
|
265
|
+
.describe(`Raw HTML to audit instead of fetching a URL, up to ${LIMITS.maxHtmlChars.toLocaleString("en")} characters. Page checks only: there is no site to read robots.txt or llms.txt from.`),
|
|
266
|
+
baseUrl: z
|
|
267
|
+
.string()
|
|
268
|
+
.url()
|
|
269
|
+
.optional()
|
|
270
|
+
.describe("With `html`: the origin the HTML is served from (default http://localhost/)."),
|
|
271
|
+
crawl: z
|
|
272
|
+
.boolean()
|
|
273
|
+
.default(false)
|
|
274
|
+
.describe("With `url`: crawl internal links and audit every page."),
|
|
275
|
+
maxPages: z
|
|
276
|
+
.number()
|
|
277
|
+
.int()
|
|
278
|
+
.min(1)
|
|
279
|
+
.max(LIMITS.maxPages)
|
|
280
|
+
.default(LIMITS.maxPages)
|
|
281
|
+
.describe(`Crawl: maximum pages to audit (at most ${LIMITS.maxPages}).`),
|
|
282
|
+
...crawlLimits,
|
|
283
|
+
includeSubdomains: z
|
|
284
|
+
.boolean()
|
|
285
|
+
.default(false)
|
|
286
|
+
.describe("Crawl: treat subdomains of the start host as internal."),
|
|
287
|
+
pageDetail: z
|
|
288
|
+
.enum(["summary", "full"])
|
|
289
|
+
.default("summary")
|
|
290
|
+
.describe("Crawl: summary keeps page findings rolled up in `issues`; full lists every page finding in `findings`."),
|
|
291
|
+
includeInfo: hostedOptions.includeInfo,
|
|
292
|
+
disableRules: hostedOptions.disableRules,
|
|
293
|
+
rules: hostedOptions.rules,
|
|
294
|
+
baseline: hostedOptions.baseline,
|
|
295
|
+
timeoutMs: hostedOptions.timeoutMs,
|
|
296
|
+
format,
|
|
297
|
+
detail,
|
|
298
|
+
},
|
|
299
|
+
annotations: { readOnlyHint: true, openWorldHint: true },
|
|
300
|
+
}, (input) => {
|
|
301
|
+
if ((input.url === undefined) === (input.html === undefined)) {
|
|
302
|
+
return fail(new Error("Provide exactly one of `url` or `html`."));
|
|
303
|
+
}
|
|
304
|
+
let host = null;
|
|
305
|
+
try {
|
|
306
|
+
host = input.url === undefined ? null : allowedHost(input.url);
|
|
307
|
+
}
|
|
308
|
+
catch (error) {
|
|
309
|
+
return fail(error);
|
|
310
|
+
}
|
|
311
|
+
const crawl = input.url !== undefined && input.crawl;
|
|
312
|
+
return runCall(profile, { tool: "seo_aeo_audit", fetches: host !== null, crawl, host }, async (fetch) => {
|
|
313
|
+
const options = {
|
|
314
|
+
...auditOptions(input, fetch),
|
|
315
|
+
baseUrl: input.baseUrl,
|
|
316
|
+
maxPages: input.maxPages,
|
|
317
|
+
maxDepth: input.maxDepth,
|
|
318
|
+
concurrency: input.concurrency,
|
|
319
|
+
respectRobots: true,
|
|
320
|
+
includeSubdomains: input.includeSubdomains,
|
|
321
|
+
pageDetail: input.pageDetail,
|
|
322
|
+
};
|
|
323
|
+
let audit;
|
|
324
|
+
if (input.url === undefined) {
|
|
325
|
+
audit = await auditAeoHtml(input.html ?? "", { url: input.baseUrl, target: "inline-html" }, options);
|
|
326
|
+
}
|
|
327
|
+
else if (crawl) {
|
|
328
|
+
audit = await auditAeoSite(input.url, options);
|
|
329
|
+
}
|
|
330
|
+
else {
|
|
331
|
+
audit = await auditAeoUrl(input.url, options);
|
|
332
|
+
}
|
|
333
|
+
return {
|
|
334
|
+
result: respondAeo(audit, input.format, input.detail),
|
|
335
|
+
pages: pagesOf(audit),
|
|
336
|
+
};
|
|
337
|
+
});
|
|
338
|
+
});
|
|
339
|
+
};
|
|
340
|
+
/** The hosted server's tools: as the local server's, less what needs the user's machine. */
|
|
341
|
+
export const registerHostedTools = (server, profile) => {
|
|
342
|
+
registerAuditPage(server, profile);
|
|
343
|
+
registerCrawlSite(server, profile);
|
|
344
|
+
registerAeoAudit(server, profile);
|
|
345
|
+
server.registerTool("seo_list_rules", LIST_RULES, (input) => runCall(profile, { tool: "seo_list_rules", fetches: false, crawl: false, host: null }, () => ({ result: listRules(input), pages: 0 })));
|
|
346
|
+
};
|
|
347
|
+
//# sourceMappingURL=mcp-hosted.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-hosted.js","sourceRoot":"","sources":["../src/mcp-hosted.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAE9E,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEtD,OAAO,EACL,aAAa,EACb,UAAU,EACV,gBAAgB,EAChB,YAAY,GACb,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,aAAa,EACb,MAAM,EACN,IAAI,EACJ,MAAM,EACN,UAAU,EACV,SAAS,EACT,OAAO,EACP,UAAU,EACV,SAAS,GACV,MAAM,iBAAiB,CAAC;AA2CzB,MAAM,MAAM,GAAG,aAAa,CAAC;AAE7B,yEAAyE;AACzE,MAAM,WAAW,GAAG,kTAAkT,YAAY,MAAM,CAAC;AAEzV,MAAM,WAAW,GAAG,CAAC,MAAiB,EAAU,EAAE,CAAC,MAAM,CAAC,WAAW,IAAI,EAAE,CAAC;AAE5E,MAAM,OAAO,GAAG,CAAC,IAAe,EAAE,EAAE,CAClC,CAAC;KACE,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG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D,OAAO,CACL,OAAO,EACP,EAAE,IAAI,EAAE,gBAAgB,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,EACpE,GAAG,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAC/C,CACF,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
/** What the local MCP server (mcp.ts) and the hosted one (mcp-hosted.ts) share: options and answers. */
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import type { CrawlOptions } from "./core/audit.js";
|
|
4
|
+
import type { AeoAudit, Audit } from "./core/types.js";
|
|
5
|
+
export declare const format: z.ZodDefault<z.ZodEnum<{
|
|
6
|
+
json: "json";
|
|
7
|
+
markdown: "markdown";
|
|
8
|
+
}>>;
|
|
9
|
+
export declare const detail: z.ZodDefault<z.ZodEnum<{
|
|
10
|
+
compact: "compact";
|
|
11
|
+
full: "full";
|
|
12
|
+
}>>;
|
|
13
|
+
export declare const commonOptions: {
|
|
14
|
+
keyword: z.ZodOptional<z.ZodString>;
|
|
15
|
+
includeInfo: z.ZodDefault<z.ZodBoolean>;
|
|
16
|
+
disableRules: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
17
|
+
rules: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
18
|
+
baseline: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
19
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
20
|
+
userAgent: z.ZodOptional<z.ZodString>;
|
|
21
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
22
|
+
format: z.ZodDefault<z.ZodEnum<{
|
|
23
|
+
json: "json";
|
|
24
|
+
markdown: "markdown";
|
|
25
|
+
}>>;
|
|
26
|
+
detail: z.ZodDefault<z.ZodEnum<{
|
|
27
|
+
compact: "compact";
|
|
28
|
+
full: "full";
|
|
29
|
+
}>>;
|
|
30
|
+
};
|
|
31
|
+
export declare const toOptions: (input: {
|
|
32
|
+
keyword?: string;
|
|
33
|
+
includeInfo?: boolean;
|
|
34
|
+
disableRules?: string[];
|
|
35
|
+
rules?: string[];
|
|
36
|
+
baseline?: string[];
|
|
37
|
+
timeoutMs?: number;
|
|
38
|
+
userAgent?: string;
|
|
39
|
+
headers?: Record<string, string>;
|
|
40
|
+
}) => CrawlOptions;
|
|
41
|
+
export declare const respond: (audit: Audit, fmt: "json" | "markdown", det: "full" | "compact") => {
|
|
42
|
+
content: {
|
|
43
|
+
type: "text";
|
|
44
|
+
text: string;
|
|
45
|
+
}[];
|
|
46
|
+
structuredContent: {
|
|
47
|
+
schemaVersion: 1;
|
|
48
|
+
kind: "page";
|
|
49
|
+
target: string;
|
|
50
|
+
url: string;
|
|
51
|
+
source: import("./core/types.js").PageSource;
|
|
52
|
+
auditedAt: string;
|
|
53
|
+
response?: import("./core/types.js").ResponseInfo;
|
|
54
|
+
summary: import("./core/types.js").PageSummary;
|
|
55
|
+
baseline?: import("./core/types.js").BaselineComparison;
|
|
56
|
+
findings: import("./core/types.js").Finding[];
|
|
57
|
+
counts: import("./core/types.js").SeverityCounts;
|
|
58
|
+
score: number;
|
|
59
|
+
performance?: import("./core/types.js").PerformanceResult;
|
|
60
|
+
rendering?: import("./core/types.js").RenderComparison;
|
|
61
|
+
depth?: number;
|
|
62
|
+
} | {
|
|
63
|
+
schemaVersion: 1;
|
|
64
|
+
kind: "site";
|
|
65
|
+
target: string;
|
|
66
|
+
source: "crawl" | "directory";
|
|
67
|
+
auditedAt: string;
|
|
68
|
+
crawl: import("./core/types.js").CrawlStats;
|
|
69
|
+
robotsTxt: import("./core/types.js").RobotsTxtInfo | null;
|
|
70
|
+
sitemaps: import("./core/types.js").SitemapInfo;
|
|
71
|
+
pages: import("./core/types.js").PageAudit[];
|
|
72
|
+
baseline?: import("./core/types.js").BaselineComparison;
|
|
73
|
+
siteFindings: import("./core/types.js").Finding[];
|
|
74
|
+
issues: import("./core/types.js").IssueRollup[];
|
|
75
|
+
counts: import("./core/types.js").SeverityCounts;
|
|
76
|
+
score: number;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
export declare const respondAeo: (audit: AeoAudit, fmt: "json" | "markdown", det: "full" | "compact") => {
|
|
80
|
+
content: {
|
|
81
|
+
type: "text";
|
|
82
|
+
text: string;
|
|
83
|
+
}[];
|
|
84
|
+
structuredContent: {
|
|
85
|
+
schemaVersion: 1;
|
|
86
|
+
kind: "aeo";
|
|
87
|
+
target: string;
|
|
88
|
+
url: string;
|
|
89
|
+
source: import("./core/types.js").PageSource | "crawl" | "directory";
|
|
90
|
+
score: number;
|
|
91
|
+
counts: import("./core/types.js").SeverityCounts;
|
|
92
|
+
auditedAt: string;
|
|
93
|
+
summary: import("./core/types.js").AeoSummary;
|
|
94
|
+
baseline?: import("./core/types.js").BaselineComparison;
|
|
95
|
+
findings: import("./core/types.js").Finding[];
|
|
96
|
+
crawlers: import("./core/types.js").AiCrawlerReport | null;
|
|
97
|
+
llmsTxt: import("./core/types.js").LlmsTxtInfo | null;
|
|
98
|
+
pages?: import("./core/types.js").AeoPage[];
|
|
99
|
+
issues?: import("./core/types.js").IssueRollup[];
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
/** seo_list_rules: the same tool on both servers. */
|
|
103
|
+
export declare const LIST_RULES: {
|
|
104
|
+
title: string;
|
|
105
|
+
description: string;
|
|
106
|
+
inputSchema: {
|
|
107
|
+
category: z.ZodOptional<z.ZodString>;
|
|
108
|
+
rule: z.ZodOptional<z.ZodString>;
|
|
109
|
+
};
|
|
110
|
+
annotations: {
|
|
111
|
+
readOnlyHint: boolean;
|
|
112
|
+
openWorldHint: boolean;
|
|
113
|
+
idempotentHint: boolean;
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
export declare const listRules: (input: {
|
|
117
|
+
category?: string;
|
|
118
|
+
rule?: string;
|
|
119
|
+
}) => {
|
|
120
|
+
content: {
|
|
121
|
+
type: "text";
|
|
122
|
+
text: string;
|
|
123
|
+
}[];
|
|
124
|
+
structuredContent: {
|
|
125
|
+
count: number;
|
|
126
|
+
rules: import("./core/types.js").RuleMeta[];
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
export declare const fail: (error: unknown) => {
|
|
130
|
+
isError: boolean;
|
|
131
|
+
content: {
|
|
132
|
+
type: "text";
|
|
133
|
+
text: string;
|
|
134
|
+
}[];
|
|
135
|
+
};
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/** What the local MCP server (mcp.ts) and the hosted one (mcp-hosted.ts) share: options and answers. */
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { compactAeoAudit } from "./core/aeo/audit.js";
|
|
4
|
+
import { compactAudit } from "./core/audit.js";
|
|
5
|
+
import { baselineFromIds } from "./core/recheck.js";
|
|
6
|
+
import { renderAeoMarkdown, renderMarkdown } from "./core/report/markdown.js";
|
|
7
|
+
import { ALL_RULES } from "./core/rules/index.js";
|
|
8
|
+
export const format = z
|
|
9
|
+
.enum(["json", "markdown"])
|
|
10
|
+
.default("json")
|
|
11
|
+
.describe("json (default) returns the structured audit; markdown returns a human-readable report.");
|
|
12
|
+
export const detail = z
|
|
13
|
+
.enum(["full", "compact"])
|
|
14
|
+
.default("compact")
|
|
15
|
+
.describe("compact trims evidence lists and bulky fields to save tokens (default); full returns everything.");
|
|
16
|
+
export const commonOptions = {
|
|
17
|
+
keyword: z
|
|
18
|
+
.string()
|
|
19
|
+
.optional()
|
|
20
|
+
.describe("Target keyword/phrase. Enables keyword.* checks (title, H1, body, description, URL, density)."),
|
|
21
|
+
includeInfo: z
|
|
22
|
+
.boolean()
|
|
23
|
+
.default(true)
|
|
24
|
+
.describe("Include info-level findings (best practices). Set false to see only errors and warnings."),
|
|
25
|
+
disableRules: z
|
|
26
|
+
.array(z.string())
|
|
27
|
+
.optional()
|
|
28
|
+
.describe('Rule ids to skip, e.g. ["twitter.card-missing"]. Use seo_list_rules to see ids.'),
|
|
29
|
+
rules: z
|
|
30
|
+
.array(z.string())
|
|
31
|
+
.optional()
|
|
32
|
+
.describe('Run only these rule ids, e.g. ["img.alt-missing"] to re-check the findings a fix was for. Use with `baseline`.'),
|
|
33
|
+
baseline: z
|
|
34
|
+
.array(z.string())
|
|
35
|
+
.optional()
|
|
36
|
+
.describe("The `id` of every finding of the earlier audit. The result then has `baseline`: the ids since fixed, still open and new (a new one may be a problem a fix caused). Re-check with the same options; for a crawl or directory, run both audits with pageDetail full so page findings have ids."),
|
|
37
|
+
timeoutMs: z
|
|
38
|
+
.number()
|
|
39
|
+
.int()
|
|
40
|
+
.min(1000)
|
|
41
|
+
.max(120_000)
|
|
42
|
+
.optional()
|
|
43
|
+
.describe("Per-request timeout in milliseconds (default 15000)."),
|
|
44
|
+
userAgent: z.string().optional().describe("Override the User-Agent header."),
|
|
45
|
+
headers: z
|
|
46
|
+
.record(z.string(), z.string())
|
|
47
|
+
.optional()
|
|
48
|
+
.describe('Extra request headers, e.g. {"Authorization": "Basic ..."} for staging sites.'),
|
|
49
|
+
format,
|
|
50
|
+
detail,
|
|
51
|
+
};
|
|
52
|
+
export const toOptions = (input) => ({
|
|
53
|
+
keyword: input.keyword,
|
|
54
|
+
includeInfo: input.includeInfo,
|
|
55
|
+
disableRules: input.disableRules,
|
|
56
|
+
onlyRules: input.rules,
|
|
57
|
+
baseline: input.baseline ? baselineFromIds(input.baseline) : undefined,
|
|
58
|
+
fetch: {
|
|
59
|
+
timeoutMs: input.timeoutMs,
|
|
60
|
+
userAgent: input.userAgent,
|
|
61
|
+
headers: input.headers,
|
|
62
|
+
},
|
|
63
|
+
});
|
|
64
|
+
export const respond = (audit, fmt, det) => {
|
|
65
|
+
const report = det === "compact" ? compactAudit(audit) : audit;
|
|
66
|
+
const text = fmt === "markdown"
|
|
67
|
+
? renderMarkdown(report)
|
|
68
|
+
: JSON.stringify(report, null, 2);
|
|
69
|
+
return {
|
|
70
|
+
content: [{ type: "text", text }],
|
|
71
|
+
structuredContent: { ...report },
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
export const respondAeo = (audit, fmt, det) => {
|
|
75
|
+
const report = det === "compact" ? compactAeoAudit(audit) : audit;
|
|
76
|
+
const text = fmt === "markdown"
|
|
77
|
+
? renderAeoMarkdown(report)
|
|
78
|
+
: JSON.stringify(report, null, 2);
|
|
79
|
+
return {
|
|
80
|
+
content: [{ type: "text", text }],
|
|
81
|
+
structuredContent: { ...report },
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
/** seo_list_rules: the same tool on both servers. */
|
|
85
|
+
export const LIST_RULES = {
|
|
86
|
+
title: "List SEO rules",
|
|
87
|
+
description: "List every rule this tool can report, with id, category, typical severity, what it checks and the generic fix. Filter by category or look up one rule id to understand a finding.",
|
|
88
|
+
inputSchema: {
|
|
89
|
+
category: z
|
|
90
|
+
.string()
|
|
91
|
+
.optional()
|
|
92
|
+
.describe("Filter by category (title, meta, headings, canonical, indexing, document, social, images, links, international, structured-data, content, keyword, response, rendering, performance, site, aeo)."),
|
|
93
|
+
rule: z.string().optional().describe("Return only this rule id."),
|
|
94
|
+
},
|
|
95
|
+
annotations: {
|
|
96
|
+
readOnlyHint: true,
|
|
97
|
+
openWorldHint: false,
|
|
98
|
+
idempotentHint: true,
|
|
99
|
+
},
|
|
100
|
+
};
|
|
101
|
+
export const listRules = (input) => {
|
|
102
|
+
const rules = ALL_RULES.filter((r) => (!input.category || r.category === input.category) &&
|
|
103
|
+
(!input.rule || r.id === input.rule));
|
|
104
|
+
const payload = { count: rules.length, rules };
|
|
105
|
+
return {
|
|
106
|
+
content: [
|
|
107
|
+
{ type: "text", text: JSON.stringify(payload, null, 2) },
|
|
108
|
+
],
|
|
109
|
+
structuredContent: payload,
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
// oxlint-disable-next-line anti-slop/no-unknown-parameters -- a thrown value is unknown until this reads it
|
|
113
|
+
export const fail = (error) => {
|
|
114
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
115
|
+
return {
|
|
116
|
+
isError: true,
|
|
117
|
+
content: [
|
|
118
|
+
{ type: "text", text: `agentic-seo-check error: ${message}` },
|
|
119
|
+
],
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
//# sourceMappingURL=mcp-shared.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-shared.js","sourceRoot":"","sources":["../src/mcp-shared.ts"],"names":[],"mappings":"AAAA,wGAAwG;AACxG,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC9E,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAGlD,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC;KACpB,IAAI,CAAC,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;KAC1B,OAAO,CAAC,MAAM,CAAC;KACf,QAAQ,CACP,wFAAwF,CACzF,CAAC;AAEJ,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC;KACpB,IAAI,CAAC,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;KACzB,OAAO,CAAC,SAAS,CAAC;KAClB,QAAQ,CACP,kGAAkG,CACnG,CAAC;AAEJ,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,OAAO,EAAE,CAAC;SACP,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CACP,+FAA+F,CAChG;IACH,WAAW,EAAE,CAAC;SACX,OAAO,EAAE;SACT,OAAO,CAAC,IAAI,CAAC;SACb,QAAQ,CACP,0FAA0F,CA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AE,4BAA4B,OAAO,EAAE,EAAE;SACvE;KACF,CAAC;AACJ,CAAC,CAAC"}
|
package/dist/mcp.d.ts
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
|
+
import type { HostedProfile } from "./mcp-hosted.js";
|
|
3
|
+
export type { HostedCall, HostedCallEnd, HostedCallInfo, HostedProfile, } from "./mcp-hosted.js";
|
|
2
4
|
export declare const MCP_SERVER_NAME = "agentic-seo-check";
|
|
3
5
|
export declare const MCP_SERVER_VERSION: string;
|
|
4
|
-
export
|
|
6
|
+
export interface McpServerOptions {
|
|
7
|
+
/**
|
|
8
|
+
* Serve the hosted server's tools (hosted/, a Cloudflare Worker) instead of the local server's:
|
|
9
|
+
* no files on disk, rendering or Lighthouse, inputs capped, and every request through the gate.
|
|
10
|
+
*/
|
|
11
|
+
hosted?: HostedProfile;
|
|
12
|
+
}
|
|
13
|
+
export declare const createMcpServer: (serverOptions?: McpServerOptions) => McpServer;
|
|
5
14
|
export declare const startMcpServer: () => Promise<void>;
|