seo-intel 1.5.26 → 1.5.27
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/CHANGELOG.md +13 -0
- package/mcp/server.js +118 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.5.27 (2026-05-16)
|
|
4
|
+
|
|
5
|
+
### MCP — three new free-tier read tools
|
|
6
|
+
The MCP server (`seo-intel-mcp`) now exposes individual records, not just summaries. AI agents can drill from inventory into actual pages, keywords, and heading structures without leaving the agent chat.
|
|
7
|
+
|
|
8
|
+
- **`get_pages(project, role?, limit?, offset?)`** — paginated page list with url, title, word count, status, click depth, and domain role. Filterable by role (target / owned / competitor). Returns total count for pagination math.
|
|
9
|
+
- **`list_keywords(project, domain?, limit?)`** — top extracted keywords grouped by domain + location (title / h1 / h2 / meta / body). Use to surface what each site is targeting before running gap analysis.
|
|
10
|
+
- **`get_headings(project, url, limit?)`** — heading structure (H1–H6) for a specific page. Returns ordered `{ level, text }` list. Useful for content-architecture comparisons between target and competitor pages.
|
|
11
|
+
|
|
12
|
+
All three are **free tier** — no license required. Pairs naturally with the existing `list_projects` and `get_intel(raw)` to give AI agents a complete free-tier read surface: list projects → inspect inventory → drill into pages → read headings → analyze with the agent's own flagship LLM.
|
|
13
|
+
|
|
14
|
+
Errors are returned as proper MCP `isError: true` responses with helpful guidance (e.g. `get_headings` on an unknown URL points the agent at `get_pages`).
|
|
15
|
+
|
|
3
16
|
## 1.5.26 (2026-05-16)
|
|
4
17
|
|
|
5
18
|
### New — MCP server (`seo-intel-mcp`)
|
package/mcp/server.js
CHANGED
|
@@ -116,11 +116,128 @@ server.registerTool(
|
|
|
116
116
|
}
|
|
117
117
|
);
|
|
118
118
|
|
|
119
|
+
// ── Tool: get_pages (free) ────────────────────────────────────────────────
|
|
120
|
+
server.registerTool(
|
|
121
|
+
'get_pages',
|
|
122
|
+
{
|
|
123
|
+
description: 'Paginated list of crawled pages for a project, with url, title, word count, status, and domain role. Use this to drill into individual pages after seeing the inventory summary from get_intel. Free tier.',
|
|
124
|
+
inputSchema: {
|
|
125
|
+
project: z.string().describe('Project slug'),
|
|
126
|
+
role: z.enum(['target', 'owned', 'competitor']).optional().describe('Filter by domain role'),
|
|
127
|
+
limit: z.number().int().positive().max(500).optional().describe('Max pages to return (default 50, max 500)'),
|
|
128
|
+
offset: z.number().int().nonnegative().optional().describe('Offset for pagination (default 0)'),
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
async ({ project, role, limit = 50, offset = 0 }) => {
|
|
132
|
+
try {
|
|
133
|
+
const db = getDb();
|
|
134
|
+
const whereParams = role ? [project, role] : [project];
|
|
135
|
+
const where = role ? 'd.project = ? AND d.role = ?' : 'd.project = ?';
|
|
136
|
+
const rows = db.prepare(
|
|
137
|
+
`SELECT p.url, p.title, p.word_count, p.status_code, p.click_depth,
|
|
138
|
+
d.domain, d.role
|
|
139
|
+
FROM pages p JOIN domains d ON d.id = p.domain_id
|
|
140
|
+
WHERE ${where}
|
|
141
|
+
ORDER BY d.role, d.domain, p.url
|
|
142
|
+
LIMIT ? OFFSET ?`
|
|
143
|
+
).all(...whereParams, limit, offset);
|
|
144
|
+
const total = db.prepare(
|
|
145
|
+
`SELECT COUNT(*) AS n FROM pages p JOIN domains d ON d.id = p.domain_id WHERE ${where}`
|
|
146
|
+
).get(...whereParams)?.n || 0;
|
|
147
|
+
const out = { project, role: role || 'any', total, returned: rows.length, offset, pages: rows };
|
|
148
|
+
return {
|
|
149
|
+
content: [{ type: 'text', text: JSON.stringify(out, null, 2) }],
|
|
150
|
+
structuredContent: out,
|
|
151
|
+
};
|
|
152
|
+
} catch (err) {
|
|
153
|
+
return { content: [{ type: 'text', text: `seo-intel error: ${err.message}` }], isError: true };
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
);
|
|
157
|
+
|
|
158
|
+
// ── Tool: list_keywords (free) ────────────────────────────────────────────
|
|
159
|
+
server.registerTool(
|
|
160
|
+
'list_keywords',
|
|
161
|
+
{
|
|
162
|
+
description: 'Top extracted keywords for a project, grouped by domain. Each keyword has frequency, location (title/h1/h2/meta/body), and source domain. Use this to surface what each site is targeting before running gap analysis. Free tier.',
|
|
163
|
+
inputSchema: {
|
|
164
|
+
project: z.string().describe('Project slug'),
|
|
165
|
+
domain: z.string().optional().describe('Optional: filter to a single domain'),
|
|
166
|
+
limit: z.number().int().positive().max(1000).optional().describe('Max keywords to return (default 100, max 1000)'),
|
|
167
|
+
},
|
|
168
|
+
},
|
|
169
|
+
async ({ project, domain, limit = 100 }) => {
|
|
170
|
+
try {
|
|
171
|
+
const db = getDb();
|
|
172
|
+
const params = [project];
|
|
173
|
+
let where = 'd.project = ?';
|
|
174
|
+
if (domain) { where += ' AND d.domain = ?'; params.push(domain); }
|
|
175
|
+
params.push(limit);
|
|
176
|
+
const rows = db.prepare(
|
|
177
|
+
`SELECT k.keyword, k.location, d.domain, d.role, COUNT(*) AS freq
|
|
178
|
+
FROM keywords k
|
|
179
|
+
JOIN pages p ON p.id = k.page_id
|
|
180
|
+
JOIN domains d ON d.id = p.domain_id
|
|
181
|
+
WHERE ${where}
|
|
182
|
+
GROUP BY k.keyword, k.location, d.domain
|
|
183
|
+
ORDER BY freq DESC
|
|
184
|
+
LIMIT ?`
|
|
185
|
+
).all(...params);
|
|
186
|
+
const out = { project, domain: domain || 'all', returned: rows.length, keywords: rows };
|
|
187
|
+
return {
|
|
188
|
+
content: [{ type: 'text', text: JSON.stringify(out, null, 2) }],
|
|
189
|
+
structuredContent: out,
|
|
190
|
+
};
|
|
191
|
+
} catch (err) {
|
|
192
|
+
return { content: [{ type: 'text', text: `seo-intel error: ${err.message}` }], isError: true };
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
);
|
|
196
|
+
|
|
197
|
+
// ── Tool: get_headings (free) ─────────────────────────────────────────────
|
|
198
|
+
server.registerTool(
|
|
199
|
+
'get_headings',
|
|
200
|
+
{
|
|
201
|
+
description: 'Heading structure (H1–H6) for a specific page. Returns ordered list of { level, text }. Useful for content architecture comparisons between target and competitor pages. Free tier.',
|
|
202
|
+
inputSchema: {
|
|
203
|
+
project: z.string().describe('Project slug'),
|
|
204
|
+
url: z.string().describe('Exact page URL (as crawled). Get URLs from get_pages.'),
|
|
205
|
+
limit: z.number().int().positive().max(200).optional().describe('Max headings (default 50)'),
|
|
206
|
+
},
|
|
207
|
+
},
|
|
208
|
+
async ({ project, url, limit = 50 }) => {
|
|
209
|
+
try {
|
|
210
|
+
const db = getDb();
|
|
211
|
+
const page = db.prepare(
|
|
212
|
+
`SELECT p.id, p.title, p.word_count, d.domain, d.role
|
|
213
|
+
FROM pages p JOIN domains d ON d.id = p.domain_id
|
|
214
|
+
WHERE d.project = ? AND p.url = ?`
|
|
215
|
+
).get(project, url);
|
|
216
|
+
if (!page) {
|
|
217
|
+
return {
|
|
218
|
+
content: [{ type: 'text', text: `No crawled page found for url="${url}" in project "${project}". Use get_pages to discover URLs.` }],
|
|
219
|
+
isError: true,
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
const headings = db.prepare(
|
|
223
|
+
`SELECT level, text FROM headings WHERE page_id = ? ORDER BY id LIMIT ?`
|
|
224
|
+
).all(page.id, limit);
|
|
225
|
+
const out = { project, url, page_title: page.title, domain: page.domain, role: page.role, word_count: page.word_count, headings };
|
|
226
|
+
return {
|
|
227
|
+
content: [{ type: 'text', text: JSON.stringify(out, null, 2) }],
|
|
228
|
+
structuredContent: out,
|
|
229
|
+
};
|
|
230
|
+
} catch (err) {
|
|
231
|
+
return { content: [{ type: 'text', text: `seo-intel error: ${err.message}` }], isError: true };
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
);
|
|
235
|
+
|
|
119
236
|
async function main() {
|
|
120
237
|
const transport = new StdioServerTransport();
|
|
121
238
|
await server.connect(transport);
|
|
122
239
|
// stderr is fine; the host typically surfaces this in its MCP logs panel.
|
|
123
|
-
console.error(`[seo-intel-mcp] v${VERSION} ready on stdio. Tools: list_projects, get_intel.`);
|
|
240
|
+
console.error(`[seo-intel-mcp] v${VERSION} ready on stdio. Tools: list_projects, get_intel, get_pages, list_keywords, get_headings.`);
|
|
124
241
|
}
|
|
125
242
|
|
|
126
243
|
main().catch(err => {
|