@automatelab/ai-seo-mcp 0.3.4 → 0.4.1
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 +21 -21
- package/README.md +23 -17
- package/dist/index.js +524 -282
- package/dist/index.js.map +1 -1
- package/dist/output-schemas.d.ts +658 -0
- package/dist/output-schemas.d.ts.map +1 -0
- package/dist/output-schemas.js +265 -0
- package/dist/output-schemas.js.map +1 -0
- package/dist/tools/audit-site.d.ts.map +1 -1
- package/dist/tools/audit-site.js +9 -2
- package/dist/tools/audit-site.js.map +1 -1
- package/dist/tools/rewrite-for-aeo.js +28 -28
- package/dist/tools/rewrite-for-geo.js +28 -28
- package/dist/tools/save-audit-report.js +3 -3
- package/dist/tools/save-audit-report.js.map +1 -1
- package/package.json +2 -1
- package/smithery.yaml +13 -0
- package/src/lib/crawlers.json +6 -6
- package/src/lib/schema-types.json +56 -56
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
// Output schemas mirroring the result interfaces in tools/*.ts.
|
|
2
|
+
// Used by registerTool so MCP clients can type-check tool responses.
|
|
3
|
+
// Each schema captures the key fields callers consume; runtime extras pass through.
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
export const findingSchema = z.object({
|
|
6
|
+
severity: z.enum(["critical", "warning", "info"]).describe("Triage priority: critical blocks AI citation, warning hurts probability, info is nice-to-have."),
|
|
7
|
+
category: z
|
|
8
|
+
.enum([
|
|
9
|
+
"schema",
|
|
10
|
+
"robots",
|
|
11
|
+
"technical",
|
|
12
|
+
"freshness",
|
|
13
|
+
"structure",
|
|
14
|
+
"authority",
|
|
15
|
+
"presence",
|
|
16
|
+
"sitemap",
|
|
17
|
+
"llms_txt",
|
|
18
|
+
])
|
|
19
|
+
.describe("Finding category - which AI-SEO dimension it relates to."),
|
|
20
|
+
where: z.string().describe("Location of the issue (CSS selector, JSON-LD path, robots.txt line, or 'page-level')."),
|
|
21
|
+
message: z.string().describe("Human-readable description of the issue."),
|
|
22
|
+
fix: z.string().describe("Concrete, copy-pasteable fix."),
|
|
23
|
+
estimated_impact: z.enum(["high", "medium", "low"]).optional().describe("Estimated impact on AI citation probability when resolved."),
|
|
24
|
+
});
|
|
25
|
+
export const gradeSchema = z.enum(["A", "B", "C", "D", "F"]).describe("Letter grade derived from the numeric score.");
|
|
26
|
+
export const auditPageOutputShape = {
|
|
27
|
+
url: z.string().describe("The URL that was audited."),
|
|
28
|
+
fetched_at: z.string().describe("UTC ISO-8601 timestamp of the fetch."),
|
|
29
|
+
score: z.number().min(0).max(100).describe("Composite 0-100 AI-citation score."),
|
|
30
|
+
grade: gradeSchema,
|
|
31
|
+
findings: z.array(findingSchema).describe("All findings emitted by the sub-audits, deduplicated."),
|
|
32
|
+
citation_verdict: z
|
|
33
|
+
.object({
|
|
34
|
+
will_ai_cite: z.enum(["unlikely", "marginal", "likely"]).describe("Coarse verdict from the composite score."),
|
|
35
|
+
top_3_blockers: z
|
|
36
|
+
.array(z.object({
|
|
37
|
+
category: z.string(),
|
|
38
|
+
message: z.string(),
|
|
39
|
+
fix: z.string(),
|
|
40
|
+
estimated_impact: z.enum(["high", "medium", "low"]).optional(),
|
|
41
|
+
}))
|
|
42
|
+
.describe("Top three highest-impact issues blocking AI citation."),
|
|
43
|
+
one_line_summary: z.string().describe("Single-sentence explanation suitable for headlines/dashboards."),
|
|
44
|
+
})
|
|
45
|
+
.describe("Prepended block summarizing whether AI assistants will cite this page and why."),
|
|
46
|
+
dimension_scores: z
|
|
47
|
+
.object({
|
|
48
|
+
schema: z.number(),
|
|
49
|
+
robots: z.number(),
|
|
50
|
+
technical: z.number(),
|
|
51
|
+
freshness: z.number(),
|
|
52
|
+
structure: z.number(),
|
|
53
|
+
authority: z.number(),
|
|
54
|
+
entity_density: z.number(),
|
|
55
|
+
sitemap: z.number(),
|
|
56
|
+
})
|
|
57
|
+
.describe("Per-dimension 0-100 subscores. The composite score is a weighted blend of these."),
|
|
58
|
+
content_quality: z
|
|
59
|
+
.enum(["static_html", "ssr_likely", "spa_empty"])
|
|
60
|
+
.describe("Classification of the fetched HTML's readiness. spa_empty means audit results are degraded."),
|
|
61
|
+
raw_html: z.string().optional().describe("Full raw HTML response. Present only when include_raw_html=true."),
|
|
62
|
+
report_html: z.string().optional().describe("Self-contained HTML scorecard. Present only when generate_report=true."),
|
|
63
|
+
};
|
|
64
|
+
export const crawlerStatusSchema = z.object({
|
|
65
|
+
allowed: z.boolean().describe("Whether this crawler is allowed to fetch the site root."),
|
|
66
|
+
match_source: z.string().optional().describe("The robots.txt rule line that produced this verdict, if any."),
|
|
67
|
+
});
|
|
68
|
+
export const checkRobotsOutputShape = {
|
|
69
|
+
robots_url: z.string().describe("The robots.txt URL that was fetched."),
|
|
70
|
+
fetched_at: z.string().describe("UTC ISO-8601 timestamp of the fetch."),
|
|
71
|
+
training_crawlers: z.record(z.string(), crawlerStatusSchema).describe("Allow/disallow posture per known AI training crawler (GPTBot, ClaudeBot, CCBot, etc.)."),
|
|
72
|
+
search_crawlers: z.record(z.string(), crawlerStatusSchema).describe("Allow/disallow posture per known AI search crawler (OAI-SearchBot, PerplexityBot, etc.)."),
|
|
73
|
+
user_triggered: z.record(z.string(), crawlerStatusSchema).describe("Allow/disallow posture per user-triggered fetcher (ChatGPT-User, Claude-User, etc.)."),
|
|
74
|
+
findings: z.array(findingSchema).describe("Per-crawler findings explaining why the posture matters."),
|
|
75
|
+
recommended_posture: z
|
|
76
|
+
.enum(["block_training_allow_search", "allow_all", "block_all", "custom"])
|
|
77
|
+
.describe("Suggested posture given the current rules."),
|
|
78
|
+
};
|
|
79
|
+
export const checkSitemapOutputShape = {
|
|
80
|
+
domain: z.string().describe("The hostname the sitemap was checked for."),
|
|
81
|
+
fetched_at: z.string().describe("UTC ISO-8601 timestamp of the check."),
|
|
82
|
+
status: z.enum(["found", "missing", "error"]).describe("Outcome of the sitemap lookup."),
|
|
83
|
+
sitemap_url: z.string().nullable().describe("Resolved sitemap URL (null when status != found)."),
|
|
84
|
+
total_urls: z.number().describe("Total URLs declared across the sitemap (and indexed children)."),
|
|
85
|
+
urls_with_lastmod: z.number().describe("Count of URLs that carry a lastmod attribute."),
|
|
86
|
+
findings: z.array(findingSchema),
|
|
87
|
+
};
|
|
88
|
+
export const checkTechnicalOutputShape = {
|
|
89
|
+
url: z.string(),
|
|
90
|
+
fetched_at: z.string(),
|
|
91
|
+
https: z.boolean().describe("Whether the URL is served over HTTPS after redirects."),
|
|
92
|
+
canonical: z.string().nullable().describe("Canonical link href, if present."),
|
|
93
|
+
og_url: z.string().nullable().describe("OpenGraph og:url, if present."),
|
|
94
|
+
noindex: z.boolean().describe("Whether meta robots includes noindex."),
|
|
95
|
+
title: z.string().nullable().describe("Page title text."),
|
|
96
|
+
h1: z.string().nullable().describe("First H1 text."),
|
|
97
|
+
findings: z.array(findingSchema),
|
|
98
|
+
};
|
|
99
|
+
export const auditSchemaOutputShape = {
|
|
100
|
+
source: z.enum(["url", "inline"]).describe("Where the JSON-LD came from."),
|
|
101
|
+
url: z.string().nullable().describe("Source URL (null when source=inline)."),
|
|
102
|
+
fetched_at: z.string().nullable(),
|
|
103
|
+
found_types: z.array(z.string()).describe("Schema.org @type values discovered across all JSON-LD blocks."),
|
|
104
|
+
ai_citation_readiness_score: z.number().min(0).max(100).describe("0-100 score for the JSON-LD's AI-citation readiness."),
|
|
105
|
+
findings: z.array(findingSchema),
|
|
106
|
+
};
|
|
107
|
+
export const auditCanonicalOutputShape = {
|
|
108
|
+
url: z.string(),
|
|
109
|
+
fetched_at: z.string(),
|
|
110
|
+
canonical: z.string().nullable(),
|
|
111
|
+
og_url: z.string().nullable(),
|
|
112
|
+
self_referencing: z.boolean().describe("Whether the canonical points to the audited URL."),
|
|
113
|
+
cross_domain: z.boolean().describe("Whether the canonical points to a different domain."),
|
|
114
|
+
findings: z.array(findingSchema),
|
|
115
|
+
};
|
|
116
|
+
export const scoreAiOverviewOutputShape = {
|
|
117
|
+
url: z.string(),
|
|
118
|
+
fetched_at: z.string(),
|
|
119
|
+
overall_eligibility_score: z.number().min(0).max(100),
|
|
120
|
+
factors: z
|
|
121
|
+
.object({
|
|
122
|
+
semantic_completeness: z.number(),
|
|
123
|
+
structured_data: z.number(),
|
|
124
|
+
eeat_signals: z.number(),
|
|
125
|
+
entity_density: z.number(),
|
|
126
|
+
freshness: z.number(),
|
|
127
|
+
technical_hygiene: z.number(),
|
|
128
|
+
})
|
|
129
|
+
.describe("Per-factor 0-100 subscores."),
|
|
130
|
+
top_improvements: z.array(z.object({ factor: z.string(), suggestion: z.string() })),
|
|
131
|
+
};
|
|
132
|
+
export const scoreCitationOutputShape = {
|
|
133
|
+
source: z.enum(["url", "text"]),
|
|
134
|
+
url: z.string().nullable(),
|
|
135
|
+
target_query: z.string().nullable(),
|
|
136
|
+
overall_score: z.number().min(0).max(100),
|
|
137
|
+
engine_scores: z.object({
|
|
138
|
+
perplexity: z.number(),
|
|
139
|
+
chatgpt: z.number(),
|
|
140
|
+
google_ai_overviews: z.number(),
|
|
141
|
+
claude: z.number(),
|
|
142
|
+
}),
|
|
143
|
+
signals: z.record(z.string(), z.number()).describe("Per-signal subscores (bluf, faq, stats, entities, etc.)."),
|
|
144
|
+
suggestions: z.array(z.string()),
|
|
145
|
+
};
|
|
146
|
+
export const generateLlmsTxtOutputShape = {
|
|
147
|
+
domain: z.string(),
|
|
148
|
+
llms_txt: z.string().describe("The generated llms.txt file content. Caller is responsible for hosting it."),
|
|
149
|
+
llms_full_txt: z.string().optional().describe("The generated llms-full.txt content. Present only when include_full=true."),
|
|
150
|
+
pages_indexed: z.number().describe("Number of pages successfully sampled from the sitemap."),
|
|
151
|
+
};
|
|
152
|
+
export const validateLlmsTxtOutputShape = {
|
|
153
|
+
source: z.enum(["url", "content"]),
|
|
154
|
+
url: z.string().nullable(),
|
|
155
|
+
valid: z.boolean().describe("Whether the file passes structural and link rules."),
|
|
156
|
+
findings: z.array(findingSchema),
|
|
157
|
+
};
|
|
158
|
+
export const rewriteOutputShape = {
|
|
159
|
+
source: z.enum(["url", "text"]),
|
|
160
|
+
url: z.string().nullable(),
|
|
161
|
+
target_query: z.string(),
|
|
162
|
+
format: z.string().optional().describe("Output format (article, faq, howto, comparison)."),
|
|
163
|
+
rewritten: z.string().describe("The rewritten content. The caller decides where to publish it."),
|
|
164
|
+
notes: z.array(z.string()).describe("Notes from the rewrite (e.g. truncations, format adjustments)."),
|
|
165
|
+
};
|
|
166
|
+
export const extractEntitiesOutputShape = {
|
|
167
|
+
source: z.enum(["url", "text"]),
|
|
168
|
+
url: z.string().nullable(),
|
|
169
|
+
entity_count: z.number(),
|
|
170
|
+
entities: z.array(z.object({
|
|
171
|
+
name: z.string(),
|
|
172
|
+
type: z.string().optional(),
|
|
173
|
+
confidence: z.number().optional(),
|
|
174
|
+
same_as: z.array(z.string()).optional(),
|
|
175
|
+
})),
|
|
176
|
+
citation_density_score: z.number().min(0).max(100),
|
|
177
|
+
};
|
|
178
|
+
export const diffPagesOutputShape = {
|
|
179
|
+
url_a: z.string(),
|
|
180
|
+
url_b: z.string(),
|
|
181
|
+
query: z.string().nullable(),
|
|
182
|
+
better_for_citation: z.enum(["a", "b", "tie"]),
|
|
183
|
+
scores: z.object({ a: z.number(), b: z.number() }),
|
|
184
|
+
delta: z.record(z.string(), z.object({
|
|
185
|
+
a: z.number(),
|
|
186
|
+
b: z.number(),
|
|
187
|
+
advantage: z.enum(["a", "b", "tie"]),
|
|
188
|
+
})),
|
|
189
|
+
missing_in_a: z.array(z.string()),
|
|
190
|
+
missing_in_b: z.array(z.string()),
|
|
191
|
+
fix_recommendations_for_a: z.array(z.object({ category: z.string(), message: z.string(), fix: z.string() })),
|
|
192
|
+
};
|
|
193
|
+
export const auditSiteOutputShape = {
|
|
194
|
+
domain: z.string(),
|
|
195
|
+
homepage_url: z.string(),
|
|
196
|
+
fetched_at: z.string(),
|
|
197
|
+
overall_score: z.number().min(0).max(100),
|
|
198
|
+
overall_grade: gradeSchema,
|
|
199
|
+
top_5_fixes: z.array(findingSchema).describe("Up to five highest-impact findings across all sub-audits."),
|
|
200
|
+
parts: z
|
|
201
|
+
.object({
|
|
202
|
+
audit_page: z.record(z.string(), z.unknown()).describe("Result of the homepage audit (or { error } on failure)."),
|
|
203
|
+
check_robots: z.record(z.string(), z.unknown()),
|
|
204
|
+
check_sitemap: z.record(z.string(), z.unknown()),
|
|
205
|
+
audit_schema: z.record(z.string(), z.unknown()),
|
|
206
|
+
})
|
|
207
|
+
.describe("Raw sub-audit results, for callers who want to drill in."),
|
|
208
|
+
};
|
|
209
|
+
export const saveReportOutputShape = {
|
|
210
|
+
saved_to: z.string().describe("Absolute path of the file that was written."),
|
|
211
|
+
bytes_written: z.number(),
|
|
212
|
+
format: z.enum(["audit_page", "audit_site"]).describe("Which input shape the report was rendered for."),
|
|
213
|
+
};
|
|
214
|
+
export const testCitationOutputShape = {
|
|
215
|
+
target_query: z.string().describe("The query the engine simulation answered."),
|
|
216
|
+
engine: z.enum(["chatgpt", "claude", "perplexity", "google_ai_overviews", "any"]).describe("Which engine persona produced the verdict."),
|
|
217
|
+
would_cite: z.boolean().describe("Binary verdict: would the simulated engine cite this page for the query?"),
|
|
218
|
+
confidence: z.number().min(0).max(100).describe("How likely a real engine is to surface this page (0-100)."),
|
|
219
|
+
citation_excerpt: z.string().nullable().describe("If would_cite=true, the 20-60 word verbatim excerpt the engine would surface; otherwise null."),
|
|
220
|
+
reasoning: z.string().describe("Plain-language explanation of the verdict."),
|
|
221
|
+
blocking_issues: z.array(z.string()).describe("Concrete reasons the page is (or is not) citable. Empty if would_cite=true and excerpt is clearly attributable."),
|
|
222
|
+
improvements: z.array(z.object({
|
|
223
|
+
change: z.string().describe("Specific edit the author should make."),
|
|
224
|
+
estimated_impact: z.enum(["high", "medium", "low"]).describe("Estimated impact of this change on citation probability."),
|
|
225
|
+
})).describe("Ranked, specific edits to improve citation probability."),
|
|
226
|
+
mode: z.enum(["sampling", "static_heuristic"]).describe("Which code path produced the result: MCP sampling (host LLM) or deterministic heuristic fallback."),
|
|
227
|
+
};
|
|
228
|
+
export const auditSitemapOutputShape = {
|
|
229
|
+
domain: z.string().describe("The domain audited."),
|
|
230
|
+
sitemap_url: z.string().nullable().describe("Resolved sitemap URL (null when discovery failed)."),
|
|
231
|
+
total_urls_in_sitemap: z.number().describe("Total URLs declared across the sitemap and any indexed children."),
|
|
232
|
+
urls_sampled: z.number().describe("Number of URLs picked via uniform-stride sampling."),
|
|
233
|
+
sampling: z.literal("uniform_stride").describe("Sampling strategy. Deterministic uniform stride: every Nth URL is picked."),
|
|
234
|
+
audited: z.array(z.object({
|
|
235
|
+
url: z.string(),
|
|
236
|
+
score: z.number(),
|
|
237
|
+
grade: gradeSchema,
|
|
238
|
+
top_issue: z.string().nullable(),
|
|
239
|
+
})).describe("Per-page audit results that completed successfully."),
|
|
240
|
+
failed: z.array(z.object({ url: z.string(), error: z.string() })).describe("URLs whose audit failed, with the error message."),
|
|
241
|
+
score_distribution: z.object({
|
|
242
|
+
avg: z.number(),
|
|
243
|
+
median: z.number(),
|
|
244
|
+
min: z.number(),
|
|
245
|
+
max: z.number(),
|
|
246
|
+
p25: z.number(),
|
|
247
|
+
p75: z.number(),
|
|
248
|
+
}).describe("Summary statistics across the audited sample."),
|
|
249
|
+
grade_distribution: z.object({ A: z.number(), B: z.number(), C: z.number(), D: z.number(), F: z.number() }).describe("Count of pages per letter grade."),
|
|
250
|
+
worst_pages: z.array(z.object({
|
|
251
|
+
url: z.string(),
|
|
252
|
+
score: z.number(),
|
|
253
|
+
grade: gradeSchema,
|
|
254
|
+
top_issue: z.string().nullable(),
|
|
255
|
+
})).describe("Lowest-scoring pages from the sample, worst first."),
|
|
256
|
+
top_findings: z.array(z.object({
|
|
257
|
+
message: z.string(),
|
|
258
|
+
category: z.string(),
|
|
259
|
+
severity: z.enum(["critical", "warning", "info"]),
|
|
260
|
+
count: z.number().describe("How many pages in the sample had this finding."),
|
|
261
|
+
fix: z.string(),
|
|
262
|
+
})).describe("Most-common findings across all sampled pages, sorted by occurrence count desc."),
|
|
263
|
+
fetched_at: z.string().describe("UTC ISO-8601 timestamp of the audit."),
|
|
264
|
+
};
|
|
265
|
+
//# sourceMappingURL=output-schemas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"output-schemas.js","sourceRoot":"","sources":["../src/output-schemas.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,qEAAqE;AACrE,oFAAoF;AAEpF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,gGAAgG,CAAC;IAC5J,QAAQ,EAAE,CAAC;SACR,IAAI,CAAC;QACJ,QAAQ;QACR,QAAQ;QACR,WAAW;QACX,WAAW;QACX,WAAW;QACX,WAAW;QACX,UAAU;QACV,SAAS;QACT,UAAU;KACX,CAAC;SACD,QAAQ,CAAC,0DAA0D,CAAC;IACvE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,uFAAuF,CAAC;IACnH,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,0CAA0C,CAAC;IACxE,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,+BAA+B,CAAC;IACzD,gBAAgB,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,4DAA4D,CAAC;CACtI,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,QAAQ,CA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E,YAAY,GAAG;YAAE,KAAK,EAAE,MAAM,CAAA;SAAE,CAAC;QAC/C,aAAa,EAAE,aAAa,GAAG;YAAE,KAAK,EAAE,MAAM,CAAA;SAAE,CAAC;QACjD,YAAY,EAAE,iBAAiB,GAAG;YAAE,KAAK,EAAE,MAAM,CAAA;SAAE,CAAC;KACrD,CAAC;CACH;AAoCD,wBAAsB,SAAS,CAAC,KAAK,EAAE,cAAc,GAAG,OAAO,CAAC,eAAe,CAAC,CA+E/E"}
|
package/dist/tools/audit-site.js
CHANGED
|
@@ -8,8 +8,15 @@ import { checkSitemap } from "./check-sitemap.js";
|
|
|
8
8
|
import { auditSchema } from "./audit-schema.js";
|
|
9
9
|
import { deriveGrade } from "../lib/score.js";
|
|
10
10
|
export const auditSiteInputSchema = z.object({
|
|
11
|
-
domain: z
|
|
12
|
-
|
|
11
|
+
domain: z
|
|
12
|
+
.string()
|
|
13
|
+
.min(3)
|
|
14
|
+
.describe("Hostname or origin to audit. Examples: `example.com`, `https://example.com`. The tool resolves the homepage and runs audit_page + check_robots + check_sitemap + audit_schema in parallel against it, then returns an overall grade plus top-5 fixes. Issues several HTTP GETs against the domain."),
|
|
15
|
+
respect_robots: z
|
|
16
|
+
.boolean()
|
|
17
|
+
.optional()
|
|
18
|
+
.default(true)
|
|
19
|
+
.describe("If true (default), respect robots.txt before fetching the homepage. Set false ONLY to audit a site you own that has temporarily blocked crawlers."),
|
|
13
20
|
});
|
|
14
21
|
function normalizeDomain(input) {
|
|
15
22
|
let host = input.trim();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit-site.js","sourceRoot":"","sources":["../../src/tools/audit-site.ts"],"names":[],"mappings":"AAAA,mBAAmB;AACnB,+FAA+F;AAC/F,+FAA+F;AAE/F,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAwB,MAAM,iBAAiB,CAAC;AAClE,OAAO,EAAE,WAAW,EAAqB,MAAM,mBA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AI,CAAC,GAAG,SAAS,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IAChD,CAAC;IAED,kFAAkF;IAClF,4FAA4F;IAC5F,MAAM,aAAa,GACjB,OAAO,CAAC,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;IAC5D,MAAM,aAAa,GAAG,WAAW,CAAC,aAAa,CAAC,CAAC;IAEjD,MAAM,MAAM,GAAG,cAAc,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QACvD,MAAM,GAAG,GAAG,YAAY,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,YAAY,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;QAChE,IAAI,GAAG,KAAK,CAAC;YAAE,OAAO,GAAG,CAAC;QAC1B,OAAO,UAAU,CAAC,CAAC,CAAC,gBAAgB,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC;IACzE,CAAC,CAAC,CAAC;IAEH,OAAO;QACL,MAAM,EAAE,QAAQ;QAChB,YAAY,EAAE,WAAW;QACzB,UAAU;QACV,aAAa;QACb,aAAa;QACb,WAAW,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;QAC/B,KAAK,EAAE;YACL,UAAU,EAAE,QAAQ;YACpB,YAAY,EAAE,UAAU;YACxB,aAAa,EAAE,WAAW;YAC1B,YAAY,EAAE,UAAU;SACzB;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -17,20 +17,20 @@ export const rewriteForAeoInputSchema = z
|
|
|
17
17
|
.refine((d) => d.url !== undefined || d.text !== undefined, {
|
|
18
18
|
message: "One of url or text is required",
|
|
19
19
|
});
|
|
20
|
-
const AEO_SYSTEM_PROMPT = `You are an Answer Engine Optimization (AEO) specialist. Rewrite the provided content to maximize AI engine citation probability.
|
|
21
|
-
|
|
22
|
-
Rules:
|
|
23
|
-
1. Open with a direct 40-60 word answer to the target query (BLUF - Bottom Line Up Front).
|
|
24
|
-
2. Structure body content into FAQ format: H3 questions ending in "?" followed by 40-60 word answers.
|
|
25
|
-
3. Include at least one ordered list for procedural content.
|
|
26
|
-
4. Define key technical terms inline (e.g., "X is a type of Y that...").
|
|
27
|
-
5. Cite statistics with year and source where present.
|
|
28
|
-
6. End with a "Key Takeaways" or "Summary" section.
|
|
29
|
-
7. No em-dashes. No filler phrases ("In conclusion", "It is important to note").
|
|
30
|
-
8. Keep within the max_words limit.
|
|
31
|
-
9. For howto format: use numbered HowToStep structure.
|
|
32
|
-
10. For comparison format: include a comparison table.
|
|
33
|
-
|
|
20
|
+
const AEO_SYSTEM_PROMPT = `You are an Answer Engine Optimization (AEO) specialist. Rewrite the provided content to maximize AI engine citation probability.
|
|
21
|
+
|
|
22
|
+
Rules:
|
|
23
|
+
1. Open with a direct 40-60 word answer to the target query (BLUF - Bottom Line Up Front).
|
|
24
|
+
2. Structure body content into FAQ format: H3 questions ending in "?" followed by 40-60 word answers.
|
|
25
|
+
3. Include at least one ordered list for procedural content.
|
|
26
|
+
4. Define key technical terms inline (e.g., "X is a type of Y that...").
|
|
27
|
+
5. Cite statistics with year and source where present.
|
|
28
|
+
6. End with a "Key Takeaways" or "Summary" section.
|
|
29
|
+
7. No em-dashes. No filler phrases ("In conclusion", "It is important to note").
|
|
30
|
+
8. Keep within the max_words limit.
|
|
31
|
+
9. For howto format: use numbered HowToStep structure.
|
|
32
|
+
10. For comparison format: include a comparison table.
|
|
33
|
+
|
|
34
34
|
Also generate a JSON-LD schema block appropriate for the content type and format.`;
|
|
35
35
|
export async function rewriteForAeo(input, hostDelays, robotsCache, server) {
|
|
36
36
|
// Fetch URL if provided
|
|
@@ -47,18 +47,18 @@ export async function rewriteForAeo(input, hostDelays, robotsCache, server) {
|
|
|
47
47
|
// Compute before score
|
|
48
48
|
const beforeResult = await scoreCitationWorthiness({ text: originalText, target_query: input.target_query, respect_robots: false }, hostDelays, robotsCache);
|
|
49
49
|
const before_score = beforeResult.overall_score;
|
|
50
|
-
const userMessage = `Target query: "${input.target_query}"
|
|
51
|
-
Format: ${input.format}
|
|
52
|
-
Max words: ${input.max_words}
|
|
53
|
-
|
|
54
|
-
Original content:
|
|
55
|
-
---
|
|
56
|
-
${originalText.substring(0, 4000)}
|
|
57
|
-
---
|
|
58
|
-
|
|
59
|
-
Rewrite this content for AEO. Return your response as JSON with these fields:
|
|
60
|
-
- rewritten_text: the rewritten content (Markdown)
|
|
61
|
-
- schema_additions: JSON-LD string to add to the page <head>
|
|
50
|
+
const userMessage = `Target query: "${input.target_query}"
|
|
51
|
+
Format: ${input.format}
|
|
52
|
+
Max words: ${input.max_words}
|
|
53
|
+
|
|
54
|
+
Original content:
|
|
55
|
+
---
|
|
56
|
+
${originalText.substring(0, 4000)}
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
Rewrite this content for AEO. Return your response as JSON with these fields:
|
|
60
|
+
- rewritten_text: the rewritten content (Markdown)
|
|
61
|
+
- schema_additions: JSON-LD string to add to the page <head>
|
|
62
62
|
- changes_made: array of strings describing each change applied`;
|
|
63
63
|
// Attempt MCP sampling
|
|
64
64
|
if (server) {
|
|
@@ -102,8 +102,8 @@ Rewrite this content for AEO. Return your response as JSON with these fields:
|
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
// Prompt template fallback
|
|
105
|
-
const promptTemplate = `${AEO_SYSTEM_PROMPT}
|
|
106
|
-
|
|
105
|
+
const promptTemplate = `${AEO_SYSTEM_PROMPT}
|
|
106
|
+
|
|
107
107
|
${userMessage}`;
|
|
108
108
|
return {
|
|
109
109
|
rewritten_text: promptTemplate,
|
|
@@ -16,19 +16,19 @@ export const rewriteForGeoInputSchema = z
|
|
|
16
16
|
.refine((d) => d.url !== undefined || d.text !== undefined, {
|
|
17
17
|
message: "One of url or text is required",
|
|
18
18
|
});
|
|
19
|
-
const GEO_SYSTEM_PROMPT = `You are a Generative Engine Optimization (GEO) specialist focused on Google AI Overviews and multi-source synthesis engines.
|
|
20
|
-
|
|
21
|
-
Rules:
|
|
22
|
-
1. Define every key entity inline on first mention: "X (also known as Y) is a type of Z that...".
|
|
23
|
-
2. Include authoritative external citations with hyperlinks (Wikipedia, official docs, research papers).
|
|
24
|
-
3. Add a comparison table if requested or if the query implies comparison.
|
|
25
|
-
4. Use numbered feature lists for technical capabilities.
|
|
26
|
-
5. Structure for multi-source synthesis: each section should be independently citable without reading the full article.
|
|
27
|
-
6. Cite statistics with source, year, and context.
|
|
28
|
-
7. Add a "Related entities" section at the end listing key entities with sameAs links.
|
|
29
|
-
8. No em-dashes. No filler phrases.
|
|
30
|
-
9. Keep within the max_words limit.
|
|
31
|
-
|
|
19
|
+
const GEO_SYSTEM_PROMPT = `You are a Generative Engine Optimization (GEO) specialist focused on Google AI Overviews and multi-source synthesis engines.
|
|
20
|
+
|
|
21
|
+
Rules:
|
|
22
|
+
1. Define every key entity inline on first mention: "X (also known as Y) is a type of Z that...".
|
|
23
|
+
2. Include authoritative external citations with hyperlinks (Wikipedia, official docs, research papers).
|
|
24
|
+
3. Add a comparison table if requested or if the query implies comparison.
|
|
25
|
+
4. Use numbered feature lists for technical capabilities.
|
|
26
|
+
5. Structure for multi-source synthesis: each section should be independently citable without reading the full article.
|
|
27
|
+
6. Cite statistics with source, year, and context.
|
|
28
|
+
7. Add a "Related entities" section at the end listing key entities with sameAs links.
|
|
29
|
+
8. No em-dashes. No filler phrases.
|
|
30
|
+
9. Keep within the max_words limit.
|
|
31
|
+
|
|
32
32
|
Generate JSON-LD schema for all key entities mentioned (Organization, Person, Product, SoftwareApplication as appropriate) with sameAs links.`;
|
|
33
33
|
export async function rewriteForGeo(input, hostDelays, robotsCache, server) {
|
|
34
34
|
let originalText = input.text ?? "";
|
|
@@ -43,19 +43,19 @@ export async function rewriteForGeo(input, hostDelays, robotsCache, server) {
|
|
|
43
43
|
}
|
|
44
44
|
const beforeResult = await scoreCitationWorthiness({ text: originalText, target_query: input.target_query, respect_robots: false }, hostDelays, robotsCache);
|
|
45
45
|
const before_score = beforeResult.overall_score;
|
|
46
|
-
const userMessage = `Target query: "${input.target_query}"
|
|
47
|
-
Add comparison table: ${input.add_comparison_table}
|
|
48
|
-
Max words: ${input.max_words}
|
|
49
|
-
|
|
50
|
-
Original content:
|
|
51
|
-
---
|
|
52
|
-
${originalText.substring(0, 4000)}
|
|
53
|
-
---
|
|
54
|
-
|
|
55
|
-
Rewrite this content for GEO. Return JSON with:
|
|
56
|
-
- rewritten_text: Markdown content
|
|
57
|
-
- schema_additions: JSON-LD for key entities
|
|
58
|
-
- changes_made: array of changes applied
|
|
46
|
+
const userMessage = `Target query: "${input.target_query}"
|
|
47
|
+
Add comparison table: ${input.add_comparison_table}
|
|
48
|
+
Max words: ${input.max_words}
|
|
49
|
+
|
|
50
|
+
Original content:
|
|
51
|
+
---
|
|
52
|
+
${originalText.substring(0, 4000)}
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
Rewrite this content for GEO. Return JSON with:
|
|
56
|
+
- rewritten_text: Markdown content
|
|
57
|
+
- schema_additions: JSON-LD for key entities
|
|
58
|
+
- changes_made: array of changes applied
|
|
59
59
|
- entities_added: array of entity names you defined or linked`;
|
|
60
60
|
if (server) {
|
|
61
61
|
try {
|
|
@@ -97,8 +97,8 @@ Rewrite this content for GEO. Return JSON with:
|
|
|
97
97
|
// sampling unavailable
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
|
-
const promptTemplate = `${GEO_SYSTEM_PROMPT}
|
|
101
|
-
|
|
100
|
+
const promptTemplate = `${GEO_SYSTEM_PROMPT}
|
|
101
|
+
|
|
102
102
|
${userMessage}`;
|
|
103
103
|
return {
|
|
104
104
|
rewritten_text: promptTemplate,
|
|
@@ -5,9 +5,9 @@ import { z } from "zod";
|
|
|
5
5
|
import { writeFile, mkdir } from "node:fs/promises";
|
|
6
6
|
import { dirname, isAbsolute, resolve, sep, relative } from "node:path";
|
|
7
7
|
export const saveAuditReportInputSchema = z.object({
|
|
8
|
-
audit_result: z.unknown().describe("The return value of
|
|
9
|
-
path: z.string().min(1).describe("Target file path. May be relative to MCP_WORKSPACE_ROOT (or cwd)."),
|
|
10
|
-
overwrite: z.boolean().optional().default(true),
|
|
8
|
+
audit_result: z.unknown().describe("The return value of `audit.page` or `audit.site`. Pass the structured result verbatim - the tool detects which shape it is and renders the matching Markdown report."),
|
|
9
|
+
path: z.string().min(1).describe("Target file path. May be relative to MCP_WORKSPACE_ROOT (or cwd if unset). Paths that escape the workspace root are rejected."),
|
|
10
|
+
overwrite: z.boolean().optional().default(true).describe("If true (default), overwrite an existing file. If false, the write fails when the target already exists."),
|
|
11
11
|
});
|
|
12
12
|
function severityEmoji(s) {
|
|
13
13
|
return s === "critical" ? "🔴" : s === "warning" ? "🟡" : "🔵";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"save-audit-report.js","sourceRoot":"","sources":["../../src/tools/save-audit-report.ts"],"names":[],"mappings":"AAAA,0BAA0B;AAC1B,sFAAsF;AACtF,+EAA+E;AAE/E,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAKxE,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IACjD,YAAY,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,
|
|
1
|
+
{"version":3,"file":"save-audit-report.js","sourceRoot":"","sources":["../../src/tools/save-audit-report.ts"],"names":[],"mappings":"AAAA,0BAA0B;AAC1B,sFAAsF;AACtF,+EAA+E;AAE/E,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,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AAQ;QAClB,aAAa,EAAE,MAAM,CAAC,UAAU,CAAC,QAAQ,EAAE,MAAM,CAAC;QAClD,MAAM;KACP,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automatelab/ai-seo-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"mcpName": "io.github.AutomateLab-tech/ai-seo-mcp",
|
|
5
5
|
"description": "AI Citation Toolkit - audit, score, and rewrite web pages for AI-citation eligibility. AEO/GEO/LLM visibility for any MCP client.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
"src/lib/crawlers.json",
|
|
52
52
|
"src/lib/schema-types.json",
|
|
53
53
|
"action.yml",
|
|
54
|
+
"smithery.yaml",
|
|
54
55
|
"README.md",
|
|
55
56
|
"LICENSE"
|
|
56
57
|
],
|
package/smithery.yaml
ADDED
package/src/lib/crawlers.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
{
|
|
2
|
-
"training": ["GPTBot", "ClaudeBot", "CCBot", "Meta-ExternalAgent", "Amazonbot"],
|
|
3
|
-
"search": ["OAI-SearchBot", "Claude-SearchBot", "PerplexityBot", "Bingbot", "DuckAssistBot"],
|
|
4
|
-
"user_triggered": ["ChatGPT-User", "Claude-User", "Google-Agent"],
|
|
5
|
-
"robots_token_only": ["Google-Extended", "Applebot-Extended"]
|
|
6
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"training": ["GPTBot", "ClaudeBot", "CCBot", "Meta-ExternalAgent", "Amazonbot"],
|
|
3
|
+
"search": ["OAI-SearchBot", "Claude-SearchBot", "PerplexityBot", "Bingbot", "DuckAssistBot"],
|
|
4
|
+
"user_triggered": ["ChatGPT-User", "Claude-User", "Google-Agent"],
|
|
5
|
+
"robots_token_only": ["Google-Extended", "Applebot-Extended"]
|
|
6
|
+
}
|