@contentisking/seomcp 0.0.0-stage → 0.1.33
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 -0
- package/README.en.md +98 -0
- package/README.md +292 -2
- package/dist/auth/google.d.ts +18 -0
- package/dist/auth/google.js +117 -0
- package/dist/auth/google.js.map +1 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +77 -0
- package/dist/cli.js.map +1 -0
- package/dist/config.d.ts +61 -0
- package/dist/config.js +92 -0
- package/dist/config.js.map +1 -0
- package/dist/core/analysis.d.ts +64 -0
- package/dist/core/analysis.js +106 -0
- package/dist/core/analysis.js.map +1 -0
- package/dist/core/bing.d.ts +33 -0
- package/dist/core/bing.js +95 -0
- package/dist/core/bing.js.map +1 -0
- package/dist/core/dates.d.ts +20 -0
- package/dist/core/dates.js +34 -0
- package/dist/core/dates.js.map +1 -0
- package/dist/core/errors.d.ts +10 -0
- package/dist/core/errors.js +11 -0
- package/dist/core/errors.js.map +1 -0
- package/dist/core/fetch-page.d.ts +38 -0
- package/dist/core/fetch-page.js +144 -0
- package/dist/core/fetch-page.js.map +1 -0
- package/dist/core/ga.d.ts +51 -0
- package/dist/core/ga.js +131 -0
- package/dist/core/ga.js.map +1 -0
- package/dist/core/geo.d.ts +256 -0
- package/dist/core/geo.js +395 -0
- package/dist/core/geo.js.map +1 -0
- package/dist/core/google-errors.d.ts +11 -0
- package/dist/core/google-errors.js +33 -0
- package/dist/core/google-errors.js.map +1 -0
- package/dist/core/google-rich-results.d.ts +20 -0
- package/dist/core/google-rich-results.js +114 -0
- package/dist/core/google-rich-results.js.map +1 -0
- package/dist/core/gsc.d.ts +24 -0
- package/dist/core/gsc.js +110 -0
- package/dist/core/gsc.js.map +1 -0
- package/dist/core/html.d.ts +76 -0
- package/dist/core/html.js +288 -0
- package/dist/core/html.js.map +1 -0
- package/dist/core/pagespeed.d.ts +105 -0
- package/dist/core/pagespeed.js +183 -0
- package/dist/core/pagespeed.js.map +1 -0
- package/dist/core/schema-validate.d.ts +63 -0
- package/dist/core/schema-validate.js +384 -0
- package/dist/core/schema-validate.js.map +1 -0
- package/dist/core/site-trust.d.ts +32 -0
- package/dist/core/site-trust.js +102 -0
- package/dist/core/site-trust.js.map +1 -0
- package/dist/core/technical.d.ts +160 -0
- package/dist/core/technical.js +329 -0
- package/dist/core/technical.js.map +1 -0
- package/dist/core/types.d.ts +124 -0
- package/dist/core/types.js +3 -0
- package/dist/core/types.js.map +1 -0
- package/dist/data/schema-vocab.json +1 -0
- package/dist/doctor.d.ts +13 -0
- package/dist/doctor.js +167 -0
- package/dist/doctor.js.map +1 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.js +22 -0
- package/dist/index.js.map +1 -0
- package/dist/links.d.ts +26 -0
- package/dist/links.js +36 -0
- package/dist/links.js.map +1 -0
- package/dist/prompts/geo.d.ts +2 -0
- package/dist/prompts/geo.js +124 -0
- package/dist/prompts/geo.js.map +1 -0
- package/dist/server.d.ts +8 -0
- package/dist/server.js +69 -0
- package/dist/server.js.map +1 -0
- package/dist/setup/clients.d.ts +69 -0
- package/dist/setup/clients.js +156 -0
- package/dist/setup/clients.js.map +1 -0
- package/dist/setup/prompt.d.ts +20 -0
- package/dist/setup/prompt.js +80 -0
- package/dist/setup/prompt.js.map +1 -0
- package/dist/setup/wizard.d.ts +5 -0
- package/dist/setup/wizard.js +369 -0
- package/dist/setup/wizard.js.map +1 -0
- package/dist/tools/bing.d.ts +3 -0
- package/dist/tools/bing.js +72 -0
- package/dist/tools/bing.js.map +1 -0
- package/dist/tools/ga.d.ts +3 -0
- package/dist/tools/ga.js +150 -0
- package/dist/tools/ga.js.map +1 -0
- package/dist/tools/geo.d.ts +3 -0
- package/dist/tools/geo.js +28 -0
- package/dist/tools/geo.js.map +1 -0
- package/dist/tools/gsc.d.ts +3 -0
- package/dist/tools/gsc.js +146 -0
- package/dist/tools/gsc.js.map +1 -0
- package/dist/tools/pagespeed.d.ts +3 -0
- package/dist/tools/pagespeed.js +42 -0
- package/dist/tools/pagespeed.js.map +1 -0
- package/dist/tools/schema.d.ts +3 -0
- package/dist/tools/schema.js +38 -0
- package/dist/tools/schema.js.map +1 -0
- package/dist/tools/shared.d.ts +44 -0
- package/dist/tools/shared.js +49 -0
- package/dist/tools/shared.js.map +1 -0
- package/dist/tools/technical.d.ts +3 -0
- package/dist/tools/technical.js +25 -0
- package/dist/tools/technical.js.map +1 -0
- package/dist/version.d.ts +1 -0
- package/dist/version.js +4 -0
- package/dist/version.js.map +1 -0
- package/package.json +93 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Content is King Srl
|
|
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.en.md
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# seomcp
|
|
2
|
+
|
|
3
|
+
**Search Console, Analytics 4, Bing Webmaster, Core Web Vitals, GEO/AEO analysis, a schema.org validator and technical SEO checks inside your AI assistant.** Open source, free, made in Italy.
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@contentisking/seomcp)
|
|
6
|
+
|
|
7
|
+
[🇮🇹 Versione italiana](README.md) · [Website](https://seomcp.contentisking.guru) · [npm](https://www.npmjs.com/package/@contentisking/seomcp) · [MIT](LICENSE) license
|
|
8
|
+
|
|
9
|
+
`seomcp` is an [MCP](https://modelcontextprotocol.io) server that lets your AI assistant (Claude, ChatGPT, GitHub Copilot, Gemini CLI, Mistral Vibe and other MCP clients) read your sites' data from Search Console, Google Analytics 4, Bing Webmaster Tools, PageSpeed Insights and the Chrome UX Report, and analyze public pages: AI crawler access, structured data, redirects, canonicals, sitemaps and broken links. **25 tools and 8 prompts, all read-only.** Ask things like:
|
|
10
|
+
|
|
11
|
+
> Which queries rank in positions 4-20 over the last 90 days, and which pages should I optimize first?
|
|
12
|
+
>
|
|
13
|
+
> Compare this month with the same period last year and flag click drops above 30%.
|
|
14
|
+
>
|
|
15
|
+
> Is this page indexed? Which canonical did Google pick?
|
|
16
|
+
|
|
17
|
+
## Why you can trust it
|
|
18
|
+
|
|
19
|
+
- **Read-only.** It only requests the `webmasters.readonly` and `analytics.readonly` Google scopes and cannot change anything in your properties.
|
|
20
|
+
- **Your credentials stay on your machine.** No intermediate server, no third-party gateway, no telemetry.
|
|
21
|
+
- **Official libraries only:** the MCP SDK, `@googleapis/searchconsole`, `@googleapis/analyticsdata`, `@googleapis/analyticsadmin`, `@googleapis/pagespeedonline`, `@googleapis/chromeuxreport` and `google-auth-library`. Bing is a plain REST call. HTML parsing: `htmlparser2` (the engine behind cheerio).
|
|
22
|
+
- **Small, readable codebase.** About 4,800 lines of TypeScript in [`src/`](src), easy to audit before you install it.
|
|
23
|
+
- **No misuse of the Google Indexing API**, which Google reserves for job postings and livestreams.
|
|
24
|
+
|
|
25
|
+
## Tools (25)
|
|
26
|
+
|
|
27
|
+
| Tool | What it does |
|
|
28
|
+
|---|---|
|
|
29
|
+
| `seomcp_status` | Checks what is configured and explains what is missing |
|
|
30
|
+
| `gsc_list_sites` | Accessible Search Console properties |
|
|
31
|
+
| `gsc_performance` | Clicks, impressions, CTR and position by query, page, country, device and date, with filters |
|
|
32
|
+
| `gsc_compare_periods` | Compare against the previous period or the year before: losers and gainers |
|
|
33
|
+
| `gsc_striking_distance` | "Striking distance" queries (positions 4-20), sorted by potential |
|
|
34
|
+
| `gsc_inspect_url` | Index status, canonical, last crawl, rich results |
|
|
35
|
+
| `gsc_list_sitemaps` | Submitted sitemaps, errors and warnings |
|
|
36
|
+
| `ga_list_properties` | Accessible Google Analytics 4 properties and their IDs |
|
|
37
|
+
| `ga_report` | Free-form report: any dimensions, metrics and filters |
|
|
38
|
+
| `ga_organic_landing_pages` | Organic search landing pages: sessions, engagement, key events, revenue |
|
|
39
|
+
| `ga_compare_periods` | Period comparison on any metric: losers and gainers |
|
|
40
|
+
| `ga_realtime` | Active users in the last 30 minutes |
|
|
41
|
+
| `crux_query` | Real-user Core Web Vitals from Chrome (LCP, INP, CLS): rating and distribution |
|
|
42
|
+
| `crux_history` | Weekly trend of real-user Core Web Vitals, up to 40 weeks |
|
|
43
|
+
| `psi_analyze` | PageSpeed Insights test: scores, metrics, opportunities and SEO audits |
|
|
44
|
+
| `geo_ai_access` | GEO: which AI crawlers can read the site (robots.txt, llms.txt, Content Signals, TDMRep) |
|
|
45
|
+
| `geo_page_metrics` | GEO/AEO: page metrics as an AI crawler sees it, plus HTTPS and domain age |
|
|
46
|
+
| `geo_page_sections` | GEO/AEO: page text split into sections, with per-section metrics |
|
|
47
|
+
| `schema_validate` | schema.org validator: official vocabulary, Google rich result requirements, consistency with the page. Also on pasted JSON-LD |
|
|
48
|
+
| `tech_page_audit` | Technical page checks: redirects, TTFB, indexability, canonical, hreflang, Open Graph, images, headings, security headers |
|
|
49
|
+
| `tech_site_check` | Technical site checks: sitemap, URL sample, 404 page, broken internal links |
|
|
50
|
+
| `bing_list_sites` | Sites in your Bing Webmaster account |
|
|
51
|
+
| `bing_query_stats` | Bing performance by query |
|
|
52
|
+
| `bing_page_stats` | Bing performance by page |
|
|
53
|
+
| `bing_keyword_stats` | Keyword search volume (defaults to Italy / Italian; set `country` and `language` for other markets) |
|
|
54
|
+
|
|
55
|
+
Plus 8 **prompts** (conversation starters): GEO page audit, answers to real user questions, competitor comparison, AI access policy, rewriting a passage to be citable, editorial plan, fixing structured data, technical audit. See [docs/geo.md](docs/geo.md) and [docs/schema-validator.md](docs/schema-validator.md) (Italian).
|
|
56
|
+
|
|
57
|
+
## Install
|
|
58
|
+
|
|
59
|
+
Requires **Node.js 22+**. Configure only the sources you use.
|
|
60
|
+
|
|
61
|
+
**Fastest way: guided setup.** Run `npx -y @contentisking/seomcp setup` in a terminal. It asks one question at a time (in Italian), opens the right Google and Bing pages, tests each credential, stores everything in `~/.config/seomcp/config.json` (readable only by you) and adds seomcp to your assistant (Claude Code, Claude Desktop, ChatGPT/Codex, GitHub Copilot, Gemini CLI, Mistral Vibe), backing up any file it changes. No keys end up in the assistant's config.
|
|
62
|
+
|
|
63
|
+
Manual setup:
|
|
64
|
+
|
|
65
|
+
1. **Credentials:** see the setup guides for [Google](docs/google-setup.md), [Google Analytics](docs/google-analytics-setup.md), [PageSpeed/CrUX](docs/pagespeed-setup.md) and [Bing](docs/bing-setup.md). They are in Italian, and the steps are the same in English UIs. The [credentials page](https://seomcp.contentisking.guru/credenziali/) (Italian) has direct links to every console screen, a one-click link that enables all five Google APIs, and a generator that fills in the config for your assistant.
|
|
66
|
+
2. **Claude Code:**
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
claude mcp add seomcp -s user \
|
|
70
|
+
-e GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account.json \
|
|
71
|
+
-e BING_WEBMASTER_API_KEY=your-key \
|
|
72
|
+
-e SEOMCP_GSC_SITE=sc-domain:yoursite.com \
|
|
73
|
+
-e SEOMCP_COUNTRY=us -e SEOMCP_LANGUAGE=en-US \
|
|
74
|
+
-- npx -y @contentisking/seomcp
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
**Other clients:** the same `npx -y @contentisking/seomcp` command works in Claude Desktop, the ChatGPT desktop app and Codex, GitHub Copilot (VS Code and CLI), Gemini CLI and Mistral Vibe CLI. Step-by-step guides for each one (in Italian) are at [seomcp.contentisking.guru/installa](https://seomcp.contentisking.guru/installa/), and ready-to-copy configs are in the [Italian README](README.md#2-collegalo-al-tuo-assistente).
|
|
78
|
+
|
|
79
|
+
> **Web versions are not supported.** claude.ai, chatgpt.com, the Gemini app, Microsoft 365 Copilot and Mistral Vibe on the web only accept remote MCP servers. `seomcp` runs locally so your credentials never leave your machine: use the desktop apps or the CLI.
|
|
80
|
+
|
|
81
|
+
3. **Check:** `npx @contentisking/seomcp doctor`
|
|
82
|
+
|
|
83
|
+
All environment variables are listed in the [Italian README](README.md#configurazione).
|
|
84
|
+
|
|
85
|
+
## Use as a library
|
|
86
|
+
|
|
87
|
+
The clients work without MCP and never read files or environment variables. You can therefore embed them in your own multi-user app:
|
|
88
|
+
|
|
89
|
+
```ts
|
|
90
|
+
import { GscClient, BingClient } from '@contentisking/seomcp';
|
|
91
|
+
const gsc = new GscClient(oauth2ClientWithUserRefreshToken);
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Status
|
|
95
|
+
|
|
96
|
+
Maintained by [Content is King](https://contentisking.guru) **in our spare time**, with no support guarantees. Issues and pull requests are welcome: see [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
97
|
+
|
|
98
|
+
Independent project, not affiliated with Google, Microsoft, Anthropic or OpenAI.
|
package/README.md
CHANGED
|
@@ -1,3 +1,293 @@
|
|
|
1
|
-
#
|
|
1
|
+
# seomcp
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**Search Console, Analytics 4, Bing Webmaster, Core Web Vitals, analisi GEO/AEO, validatore schema.org e controlli tecnici dentro il tuo assistente AI.** Open source, gratuito, in italiano.
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@contentisking/seomcp)
|
|
6
|
+
|
|
7
|
+
[🇬🇧 English version](README.en.md) · [Sito](https://seomcp.contentisking.guru) · [npm](https://www.npmjs.com/package/@contentisking/seomcp) · Licenza [MIT](LICENSE)
|
|
8
|
+
|
|
9
|
+
`seomcp` è un server [MCP](https://modelcontextprotocol.io) che permette al tuo assistente AI (Claude, ChatGPT, GitHub Copilot, Gemini CLI, Mistral Vibe e altri client MCP) di leggere i dati dei tuoi siti da Search Console, Google Analytics 4, Bing Webmaster Tools, PageSpeed Insights e Chrome UX Report, e di analizzare le pagine pubbliche: accesso dei crawler AI, dati strutturati, redirect, canonical, sitemap e link rotti. **25 tool e 8 prompt, tutti in sola lettura.** Così puoi chiedere, in italiano:
|
|
10
|
+
|
|
11
|
+
> Quali query sono in posizione 4-20 negli ultimi 90 giorni, e quali pagine dovrei ottimizzare per prime?
|
|
12
|
+
>
|
|
13
|
+
> Confronta questo mese con lo stesso periodo dell'anno scorso e segnala i cali di clic sopra il 30%.
|
|
14
|
+
>
|
|
15
|
+
> Questa pagina è indicizzata? Quale canonical ha scelto Google?
|
|
16
|
+
>
|
|
17
|
+
> Su Bing come va rispetto a Google la query "scarpe da trekking"?
|
|
18
|
+
|
|
19
|
+
## Perché fidarsi
|
|
20
|
+
|
|
21
|
+
Affidare le credenziali di Search Console a uno strumento è una decisione seria. `seomcp` è costruito per essere facile da verificare:
|
|
22
|
+
|
|
23
|
+
- **Sola lettura.** Chiede a Google solo gli scope `webmasters.readonly` e `analytics.readonly`: non può modificare nulla nelle tue proprietà.
|
|
24
|
+
- **Le credenziali restano sul tuo computer.** Nessun server intermedio, nessun gateway di terzi, nessuna telemetria.
|
|
25
|
+
- **Solo librerie ufficiali:** l'SDK MCP, `@googleapis/searchconsole`, `@googleapis/analyticsdata`, `@googleapis/analyticsadmin`, `@googleapis/pagespeedonline`, `@googleapis/chromeuxreport` e `google-auth-library`. Bing è una semplice chiamata REST. Per leggere l'HTML delle pagine: `htmlparser2`, la libreria usata da cheerio.
|
|
26
|
+
- **Codice piccolo e leggibile.** Circa 4.800 righe di TypeScript in [`src/`](src): leggerlo prima di installarlo è alla portata di chiunque.
|
|
27
|
+
- **Nessun uso improprio della Google Indexing API**, che Google riserva alle offerte di lavoro e alle dirette video.
|
|
28
|
+
|
|
29
|
+
## Tool disponibili (25)
|
|
30
|
+
|
|
31
|
+
| Tool | Cosa fa |
|
|
32
|
+
|---|---|
|
|
33
|
+
| `seomcp_status` | Verifica cosa è configurato e spiega cosa manca |
|
|
34
|
+
| `gsc_list_sites` | Proprietà Search Console accessibili |
|
|
35
|
+
| `gsc_performance` | Clic, impressioni, CTR e posizione per query, pagina, paese, dispositivo, data, con filtri |
|
|
36
|
+
| `gsc_compare_periods` | Confronto con il periodo precedente o con l'anno prima: cali e crescite |
|
|
37
|
+
| `gsc_striking_distance` | Query "a distanza di tiro" (posizione 4-20) ordinate per potenziale |
|
|
38
|
+
| `gsc_inspect_url` | Stato di indicizzazione, canonical, ultima scansione, rich result |
|
|
39
|
+
| `gsc_list_sitemaps` | Sitemap inviate, errori e avvisi |
|
|
40
|
+
| `ga_list_properties` | Proprietà Google Analytics 4 accessibili, con il loro ID |
|
|
41
|
+
| `ga_report` | Report libero: dimensioni, metriche e filtri a scelta |
|
|
42
|
+
| `ga_organic_landing_pages` | Pagine di destinazione della ricerca organica: sessioni, coinvolgimento, conversioni, ricavi |
|
|
43
|
+
| `ga_compare_periods` | Confronto tra periodi su qualsiasi metrica: cali e crescite |
|
|
44
|
+
| `ga_realtime` | Utenti attivi negli ultimi 30 minuti |
|
|
45
|
+
| `crux_query` | Core Web Vitals reali degli utenti Chrome (LCP, INP, CLS): giudizio e distribuzione |
|
|
46
|
+
| `crux_history` | Andamento settimanale dei Core Web Vitals reali, fino a 40 settimane |
|
|
47
|
+
| `psi_analyze` | Test PageSpeed Insights: punteggi, metriche, opportunità e controlli SEO |
|
|
48
|
+
| `geo_ai_access` | GEO: quali crawler AI possono leggere il sito (robots.txt, llms.txt, Content Signals, TDMRep) |
|
|
49
|
+
| `geo_page_metrics` | GEO/AEO: misure della pagina come la vede un crawler AI, più HTTPS ed età del dominio |
|
|
50
|
+
| `geo_page_sections` | GEO/AEO: il testo della pagina diviso in sezioni, con le misure di ciascuna |
|
|
51
|
+
| `schema_validate` | Validatore schema.org: vocabolario ufficiale, requisiti Google per i risultati avanzati, coerenza con la pagina. Anche su JSON-LD incollato |
|
|
52
|
+
| `tech_page_audit` | Controlli tecnici della pagina: redirect, TTFB, indicizzabilità, canonical, hreflang, Open Graph, immagini, titoli, header di sicurezza |
|
|
53
|
+
| `tech_site_check` | Controlli tecnici del sito: sitemap, campione di URL, pagina 404, link interni rotti |
|
|
54
|
+
| `bing_list_sites` | Siti nel tuo account Bing Webmaster |
|
|
55
|
+
| `bing_query_stats` | Performance per query su Bing |
|
|
56
|
+
| `bing_page_stats` | Performance per pagina su Bing |
|
|
57
|
+
| `bing_keyword_stats` | Volumi di ricerca di una keyword (default Italia / italiano) |
|
|
58
|
+
|
|
59
|
+
Le analisi più complesse (cannibalizzazione, content gap, report) le fa l'assistente ragionando sui dati: non serve codificarle nel server.
|
|
60
|
+
|
|
61
|
+
### Prompt (8)
|
|
62
|
+
|
|
63
|
+
Oltre ai tool, seomcp offre otto **prompt**, cioè spunti di conversazione già impostati: audit GEO della pagina, risposte alle domande degli utenti, confronto con i concorrenti, permessi AI del sito, riscrittura di un passaggio citabile, piano editoriale, correzione dei dati strutturati e audit tecnico. Come funzionano: [docs/geo.md](docs/geo.md) e [docs/schema-validator.md](docs/schema-validator.md).
|
|
64
|
+
|
|
65
|
+
## Installazione
|
|
66
|
+
|
|
67
|
+
Serve **Node.js 22 o superiore**. Configura solo le fonti che usi: Google e Bing sono entrambe facoltative.
|
|
68
|
+
|
|
69
|
+
### Il modo più rapido: la configurazione guidata
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
npx -y @contentisking/seomcp setup
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Ti fa le domande una alla volta e apre le pagine giuste di Google e Bing. Prova subito ogni credenziale e ti fa scegliere proprietà e siti predefiniti. Salva tutto in `~/.config/seomcp/config.json`, leggibile solo dal tuo utente. Infine aggiunge seomcp a Claude Code, Claude Desktop, ChatGPT e Codex, GitHub Copilot, Gemini CLI o Mistral Vibe, facendo prima una copia di sicurezza dei file che modifica. Nella configurazione dell'assistente non finisce nessuna chiave.
|
|
76
|
+
|
|
77
|
+
Preferisci fare a mano? Segui i passaggi qui sotto.
|
|
78
|
+
|
|
79
|
+
### 1. Prepara le credenziali
|
|
80
|
+
|
|
81
|
+
La pagina [Credenziali](https://seomcp.contentisking.guru/credenziali/) ha tutti i passaggi con i link diretti e compila la configurazione per il tuo assistente. Le guide qui sotto dicono le stesse cose.
|
|
82
|
+
|
|
83
|
+
- **Google Search Console:** segui la [guida passo passo](docs/google-setup.md). Puoi scegliere tra un service account (comodo per i team) e OAuth con un client tuo (comodo per il singolo professionista).
|
|
84
|
+
- **Google Analytics 4** (facoltativo): stesse credenziali di Search Console, più tre passaggi nella [guida Analytics](docs/google-analytics-setup.md).
|
|
85
|
+
- **PageSpeed e Core Web Vitals** (facoltativo): una API key gratuita, come spiegato nella [guida PageSpeed](docs/pagespeed-setup.md).
|
|
86
|
+
- **Bing Webmaster Tools:** genera una API key in due minuti, come spiegato nella [guida](docs/bing-setup.md).
|
|
87
|
+
|
|
88
|
+
### 2. Collegalo al tuo assistente
|
|
89
|
+
|
|
90
|
+
Il comando è sempre lo stesso, cambia solo dove si scrive. Trovi una guida passo passo per ogni assistente su **[seomcp.contentisking.guru/installa](https://seomcp.contentisking.guru/installa/)**; qui sotto le configurazioni in breve.
|
|
91
|
+
|
|
92
|
+
#### Claude Code
|
|
93
|
+
|
|
94
|
+
Da terminale:
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
claude mcp add seomcp -s user \
|
|
98
|
+
-e GOOGLE_APPLICATION_CREDENTIALS=/percorso/service-account.json \
|
|
99
|
+
-e BING_WEBMASTER_API_KEY=la-tua-chiave \
|
|
100
|
+
-e SEOMCP_GSC_SITE=sc-domain:tuosito.it \
|
|
101
|
+
-e SEOMCP_GA_PROPERTY=123456789 \
|
|
102
|
+
-e SEOMCP_GOOGLE_API_KEY=la-tua-api-key \
|
|
103
|
+
-- npx -y @contentisking/seomcp
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Poi verifica con `/mcp` che `seomcp` risulti connesso.
|
|
107
|
+
|
|
108
|
+
#### Claude Desktop
|
|
109
|
+
|
|
110
|
+
In `claude_desktop_config.json` (Impostazioni → Sviluppatore → Modifica configurazione):
|
|
111
|
+
|
|
112
|
+
```json
|
|
113
|
+
{
|
|
114
|
+
"mcpServers": {
|
|
115
|
+
"seomcp": {
|
|
116
|
+
"command": "npx",
|
|
117
|
+
"args": ["-y", "@contentisking/seomcp"],
|
|
118
|
+
"env": {
|
|
119
|
+
"GOOGLE_APPLICATION_CREDENTIALS": "/percorso/service-account.json",
|
|
120
|
+
"BING_WEBMASTER_API_KEY": "la-tua-chiave",
|
|
121
|
+
"SEOMCP_GSC_SITE": "sc-domain:tuosito.it",
|
|
122
|
+
"SEOMCP_GA_PROPERTY": "123456789",
|
|
123
|
+
"SEOMCP_GOOGLE_API_KEY": "la-tua-api-key"
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
#### ChatGPT (app desktop) e Codex
|
|
131
|
+
|
|
132
|
+
Da *Impostazioni → MCP servers → Add server → STDIO*, oppure in `~/.codex/config.toml`:
|
|
133
|
+
|
|
134
|
+
```toml
|
|
135
|
+
[mcp_servers.seomcp]
|
|
136
|
+
command = "npx"
|
|
137
|
+
args = ["-y", "@contentisking/seomcp"]
|
|
138
|
+
|
|
139
|
+
[mcp_servers.seomcp.env]
|
|
140
|
+
GOOGLE_APPLICATION_CREDENTIALS = "/percorso/service-account.json"
|
|
141
|
+
BING_WEBMASTER_API_KEY = "la-tua-chiave"
|
|
142
|
+
SEOMCP_GSC_SITE = "sc-domain:tuosito.it"
|
|
143
|
+
SEOMCP_GA_PROPERTY = "123456789"
|
|
144
|
+
SEOMCP_GOOGLE_API_KEY = "la-tua-api-key"
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
#### GitHub Copilot in VS Code
|
|
148
|
+
|
|
149
|
+
Comando *MCP: Open User Configuration*, poi nel file `mcp.json`:
|
|
150
|
+
|
|
151
|
+
```json
|
|
152
|
+
{
|
|
153
|
+
"servers": {
|
|
154
|
+
"seomcp": {
|
|
155
|
+
"type": "stdio",
|
|
156
|
+
"command": "npx",
|
|
157
|
+
"args": ["-y", "@contentisking/seomcp"],
|
|
158
|
+
"env": {
|
|
159
|
+
"GOOGLE_APPLICATION_CREDENTIALS": "/percorso/service-account.json",
|
|
160
|
+
"BING_WEBMASTER_API_KEY": "la-tua-chiave",
|
|
161
|
+
"SEOMCP_GSC_SITE": "sc-domain:tuosito.it",
|
|
162
|
+
"SEOMCP_GA_PROPERTY": "123456789",
|
|
163
|
+
"SEOMCP_GOOGLE_API_KEY": "la-tua-api-key"
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
Usa la chat di Copilot in modalità *Agent*.
|
|
171
|
+
|
|
172
|
+
#### GitHub Copilot CLI
|
|
173
|
+
|
|
174
|
+
In `~/.copilot/mcp-config.json`:
|
|
175
|
+
|
|
176
|
+
```json
|
|
177
|
+
{
|
|
178
|
+
"mcpServers": {
|
|
179
|
+
"seomcp": {
|
|
180
|
+
"type": "local",
|
|
181
|
+
"command": "npx",
|
|
182
|
+
"args": ["-y", "@contentisking/seomcp"],
|
|
183
|
+
"env": {
|
|
184
|
+
"GOOGLE_APPLICATION_CREDENTIALS": "/percorso/service-account.json",
|
|
185
|
+
"BING_WEBMASTER_API_KEY": "la-tua-chiave",
|
|
186
|
+
"SEOMCP_GSC_SITE": "sc-domain:tuosito.it",
|
|
187
|
+
"SEOMCP_GA_PROPERTY": "123456789",
|
|
188
|
+
"SEOMCP_GOOGLE_API_KEY": "la-tua-api-key"
|
|
189
|
+
},
|
|
190
|
+
"tools": ["*"]
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
#### Gemini CLI
|
|
197
|
+
|
|
198
|
+
In `~/.gemini/settings.json`:
|
|
199
|
+
|
|
200
|
+
```json
|
|
201
|
+
{
|
|
202
|
+
"mcpServers": {
|
|
203
|
+
"seomcp": {
|
|
204
|
+
"command": "npx",
|
|
205
|
+
"args": ["-y", "@contentisking/seomcp"],
|
|
206
|
+
"env": {
|
|
207
|
+
"GOOGLE_APPLICATION_CREDENTIALS": "/percorso/service-account.json",
|
|
208
|
+
"BING_WEBMASTER_API_KEY": "la-tua-chiave",
|
|
209
|
+
"SEOMCP_GSC_SITE": "sc-domain:tuosito.it",
|
|
210
|
+
"SEOMCP_GA_PROPERTY": "123456789",
|
|
211
|
+
"SEOMCP_GOOGLE_API_KEY": "la-tua-api-key"
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
Dal giugno 2026 Gemini CLI richiede una chiave API Gemini a pagamento o una licenza enterprise.
|
|
219
|
+
|
|
220
|
+
#### Mistral Vibe CLI
|
|
221
|
+
|
|
222
|
+
In `~/.vibe/config.toml`:
|
|
223
|
+
|
|
224
|
+
```toml
|
|
225
|
+
[[mcp_servers]]
|
|
226
|
+
name = "seomcp"
|
|
227
|
+
transport = "stdio"
|
|
228
|
+
command = "npx"
|
|
229
|
+
args = ["-y", "@contentisking/seomcp"]
|
|
230
|
+
env = { "GOOGLE_APPLICATION_CREDENTIALS" = "/percorso/service-account.json", "BING_WEBMASTER_API_KEY" = "la-tua-chiave", "SEOMCP_GSC_SITE" = "sc-domain:tuosito.it", "SEOMCP_GA_PROPERTY" = "123456789", "SEOMCP_GOOGLE_API_KEY" = "la-tua-api-key" }
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
> **Versioni web non supportate.** Le versioni web (claude.ai, chatgpt.com, l'app Gemini, Microsoft 365 Copilot, Mistral Vibe sul web) accettano solo server MCP remoti, raggiungibili su internet. `seomcp` gira in locale per non far uscire le tue credenziali dal computer, quindi servono le app desktop o la riga di comando.
|
|
234
|
+
|
|
235
|
+
### 3. Controlla che funzioni
|
|
236
|
+
|
|
237
|
+
```bash
|
|
238
|
+
npx @contentisking/seomcp doctor
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
Il comando prova ogni fonte e ti dice esattamente cosa manca. Ad esempio: "aggiungi `seomcp@progetto.iam.gserviceaccount.com` come utente della proprietà".
|
|
242
|
+
|
|
243
|
+
## Configurazione
|
|
244
|
+
|
|
245
|
+
| Variabile | Descrizione |
|
|
246
|
+
|---|---|
|
|
247
|
+
| `GOOGLE_APPLICATION_CREDENTIALS` | Percorso del file JSON del service account |
|
|
248
|
+
| `SEOMCP_GOOGLE_CLIENT_ID` / `SEOMCP_GOOGLE_CLIENT_SECRET` | Client OAuth tuo, in alternativa al service account |
|
|
249
|
+
| `BING_WEBMASTER_API_KEY` | API key di Bing Webmaster Tools |
|
|
250
|
+
| `SEOMCP_GSC_SITE` | Proprietà predefinita: `sc-domain:tuosito.it` oppure `https://www.tuosito.it/` |
|
|
251
|
+
| `SEOMCP_GA_PROPERTY` | ID numerico della proprietà GA4 predefinita, es. `123456789` |
|
|
252
|
+
| `SEOMCP_GOOGLE_API_KEY` | API key Google Cloud per PageSpeed Insights e Chrome UX Report |
|
|
253
|
+
| `SEOMCP_BING_SITE` | Sito Bing predefinito, es. `https://www.tuosito.it/` |
|
|
254
|
+
| `SEOMCP_COUNTRY` / `SEOMCP_LANGUAGE` | Mercato per i volumi keyword Bing (default `it` / `it-IT`) |
|
|
255
|
+
| `SEOMCP_ALLOW_PRIVATE` | Solo sviluppo: `1` per analizzare con i tool GEO anche indirizzi locali (es. staging) |
|
|
256
|
+
| `SEOMCP_CONFIG_DIR` | Cartella di configurazione (default `~/.config/seomcp`) |
|
|
257
|
+
|
|
258
|
+
In alternativa alle variabili d'ambiente puoi usare `~/.config/seomcp/config.json`:
|
|
259
|
+
|
|
260
|
+
```json
|
|
261
|
+
{
|
|
262
|
+
"google": { "serviceAccountFile": "/percorso/service-account.json", "apiKey": "la-tua-api-key" },
|
|
263
|
+
"bing": { "apiKey": "la-tua-chiave" },
|
|
264
|
+
"defaults": { "gscSite": "sc-domain:tuosito.it", "gaProperty": "123456789", "bingSite": "https://www.tuosito.it/" }
|
|
265
|
+
}
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
Se il file contiene chiavi, rendilo leggibile solo a te: `chmod 600 ~/.config/seomcp/config.json`.
|
|
269
|
+
|
|
270
|
+
## Usarlo come libreria
|
|
271
|
+
|
|
272
|
+
I client funzionano anche senza MCP e non leggono né file né variabili d'ambiente. Per questo puoi usarli dentro un'applicazione tua, anche multi-utente, passando le credenziali di ciascun utente:
|
|
273
|
+
|
|
274
|
+
```ts
|
|
275
|
+
import { GscClient, BingClient, strikingDistance, lastNDays } from '@contentisking/seomcp';
|
|
276
|
+
import { OAuth2Client } from 'google-auth-library';
|
|
277
|
+
|
|
278
|
+
const auth = new OAuth2Client({ clientId, clientSecret });
|
|
279
|
+
auth.setCredentials({ refresh_token: utente.googleRefreshToken });
|
|
280
|
+
|
|
281
|
+
const gsc = new GscClient(auth);
|
|
282
|
+
const rows = await gsc.query({ siteUrl: 'sc-domain:esempio.it', ...lastNDays(90), dimensions: ['query', 'page'], rowLimit: 5000 });
|
|
283
|
+
const opportunita = strikingDistance(rows);
|
|
284
|
+
|
|
285
|
+
const bing = new BingClient({ apiKey: utente.bingApiKey });
|
|
286
|
+
const stats = await bing.getQueryStats('https://www.esempio.it/');
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
## Stato del progetto e supporto
|
|
290
|
+
|
|
291
|
+
`seomcp` è mantenuto da [Content is King](https://contentisking.guru) **nel tempo libero**, senza garanzie di supporto. Segnalazioni e pull request sono benvenute: leggi [CONTRIBUTING.md](CONTRIBUTING.md). Per le vulnerabilità segui invece [SECURITY.md](SECURITY.md).
|
|
292
|
+
|
|
293
|
+
È un progetto indipendente, non affiliato a Google, Microsoft, Anthropic né OpenAI. Search Console, Bing Webmaster Tools, Claude e ChatGPT sono marchi dei rispettivi proprietari.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type GscAuth } from '../core/gsc.js';
|
|
2
|
+
import type { GoogleConfig } from '../config.js';
|
|
3
|
+
/** Tutti gli scope richiesti a Google: solo lettura, Search Console e Analytics. */
|
|
4
|
+
export declare const GOOGLE_SCOPES: string[];
|
|
5
|
+
/** Crea l'autenticazione Google in base alla configurazione. */
|
|
6
|
+
export declare function createGoogleAuth(config: GoogleConfig): GscAuth;
|
|
7
|
+
/** Legge l'email del service account, utile per dire all'utente chi aggiungere in Search Console. */
|
|
8
|
+
export declare function serviceAccountEmail(keyFile: string): string | undefined;
|
|
9
|
+
/**
|
|
10
|
+
* Flusso OAuth una tantum, da terminale.
|
|
11
|
+
* Usa un client OAuth di tipo "App desktop" creato dall'utente nel proprio
|
|
12
|
+
* progetto Google Cloud, con redirect su loopback (127.0.0.1) e PKCE.
|
|
13
|
+
*/
|
|
14
|
+
export declare function runGoogleOAuthFlow(config: Extract<GoogleConfig, {
|
|
15
|
+
mode: 'oauth';
|
|
16
|
+
}>, log?: (msg: string) => void): Promise<void>;
|
|
17
|
+
/** Apre un indirizzo nel browser predefinito, se c'è. */
|
|
18
|
+
export declare function openBrowser(url: string): void;
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { spawn } from 'node:child_process';
|
|
2
|
+
import { randomBytes } from 'node:crypto';
|
|
3
|
+
import { mkdirSync, readFileSync, writeFileSync, existsSync } from 'node:fs';
|
|
4
|
+
import { createServer } from 'node:http';
|
|
5
|
+
import { dirname } from 'node:path';
|
|
6
|
+
import { CodeChallengeMethod, GoogleAuth, OAuth2Client } from 'google-auth-library';
|
|
7
|
+
import { GA_SCOPES } from '../core/ga.js';
|
|
8
|
+
import { GSC_SCOPES } from '../core/gsc.js';
|
|
9
|
+
import { SeoMcpError } from '../core/errors.js';
|
|
10
|
+
import { DOCS } from '../links.js';
|
|
11
|
+
/** Tutti gli scope richiesti a Google: solo lettura, Search Console e Analytics. */
|
|
12
|
+
export const GOOGLE_SCOPES = [...GSC_SCOPES, ...GA_SCOPES];
|
|
13
|
+
/** Crea l'autenticazione Google in base alla configurazione. */
|
|
14
|
+
export function createGoogleAuth(config) {
|
|
15
|
+
if (config.mode === 'service-account') {
|
|
16
|
+
if (!existsSync(config.keyFile)) {
|
|
17
|
+
throw new SeoMcpError('NOT_CONFIGURED', `File del service account non trovato: ${config.keyFile}`, `Controlla il percorso in GOOGLE_APPLICATION_CREDENTIALS. Guida: ${DOCS.google}`);
|
|
18
|
+
}
|
|
19
|
+
return new GoogleAuth({ keyFile: config.keyFile, scopes: GOOGLE_SCOPES });
|
|
20
|
+
}
|
|
21
|
+
if (config.mode === 'oauth') {
|
|
22
|
+
const token = readToken(config.tokenFile);
|
|
23
|
+
if (!token?.refresh_token) {
|
|
24
|
+
throw new SeoMcpError('NOT_CONFIGURED', 'Accesso Google non ancora autorizzato.', 'Esegui una volta `npx @contentisking/seomcp auth google` da terminale.');
|
|
25
|
+
}
|
|
26
|
+
const client = new OAuth2Client({ clientId: config.clientId, clientSecret: config.clientSecret });
|
|
27
|
+
client.setCredentials(token);
|
|
28
|
+
// Google può emettere un nuovo refresh token: lo salviamo per non perderlo.
|
|
29
|
+
client.on('tokens', (t) => writeToken(config.tokenFile, { ...readToken(config.tokenFile), ...t }));
|
|
30
|
+
return client;
|
|
31
|
+
}
|
|
32
|
+
throw new SeoMcpError('NOT_CONFIGURED', 'Le credenziali Google (Search Console e Analytics) non sono configurate.', `Imposta GOOGLE_APPLICATION_CREDENTIALS (service account) oppure SEOMCP_GOOGLE_CLIENT_ID e SEOMCP_GOOGLE_CLIENT_SECRET (OAuth). Guida: ${DOCS.google}`);
|
|
33
|
+
}
|
|
34
|
+
/** Legge l'email del service account, utile per dire all'utente chi aggiungere in Search Console. */
|
|
35
|
+
export function serviceAccountEmail(keyFile) {
|
|
36
|
+
try {
|
|
37
|
+
const json = JSON.parse(readFileSync(keyFile, 'utf8'));
|
|
38
|
+
return json.client_email;
|
|
39
|
+
}
|
|
40
|
+
catch {
|
|
41
|
+
return undefined;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
function readToken(path) {
|
|
45
|
+
try {
|
|
46
|
+
return JSON.parse(readFileSync(path, 'utf8'));
|
|
47
|
+
}
|
|
48
|
+
catch {
|
|
49
|
+
return undefined;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
function writeToken(path, token) {
|
|
53
|
+
mkdirSync(dirname(path), { recursive: true, mode: 0o700 });
|
|
54
|
+
writeFileSync(path, JSON.stringify(token, null, 2), { mode: 0o600 });
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Flusso OAuth una tantum, da terminale.
|
|
58
|
+
* Usa un client OAuth di tipo "App desktop" creato dall'utente nel proprio
|
|
59
|
+
* progetto Google Cloud, con redirect su loopback (127.0.0.1) e PKCE.
|
|
60
|
+
*/
|
|
61
|
+
export async function runGoogleOAuthFlow(config, log = (m) => process.stderr.write(`${m}\n`)) {
|
|
62
|
+
const state = randomBytes(16).toString('hex');
|
|
63
|
+
const server = createServer();
|
|
64
|
+
await new Promise((resolve) => server.listen(0, '127.0.0.1', resolve));
|
|
65
|
+
const { port } = server.address();
|
|
66
|
+
const redirectUri = `http://127.0.0.1:${port}/callback`;
|
|
67
|
+
const client = new OAuth2Client({ clientId: config.clientId, clientSecret: config.clientSecret, redirectUri });
|
|
68
|
+
const { codeVerifier, codeChallenge } = await client.generateCodeVerifierAsync();
|
|
69
|
+
const authUrl = client.generateAuthUrl({
|
|
70
|
+
access_type: 'offline',
|
|
71
|
+
prompt: 'consent',
|
|
72
|
+
scope: GOOGLE_SCOPES,
|
|
73
|
+
state,
|
|
74
|
+
code_challenge: codeChallenge,
|
|
75
|
+
code_challenge_method: CodeChallengeMethod.S256,
|
|
76
|
+
});
|
|
77
|
+
log('\nApri questo indirizzo nel browser per autorizzare l\'accesso in sola lettura a Search Console:\n');
|
|
78
|
+
log(` ${authUrl}\n`);
|
|
79
|
+
openBrowser(authUrl);
|
|
80
|
+
const code = await new Promise((resolve, reject) => {
|
|
81
|
+
const timer = setTimeout(() => reject(new Error('Tempo scaduto (5 minuti). Riprova.')), 5 * 60_000);
|
|
82
|
+
server.on('request', (req, res) => {
|
|
83
|
+
const url = new URL(req.url ?? '/', redirectUri);
|
|
84
|
+
if (url.pathname !== '/callback') {
|
|
85
|
+
res.writeHead(404).end();
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
const error = url.searchParams.get('error');
|
|
89
|
+
const returnedCode = url.searchParams.get('code');
|
|
90
|
+
const ok = !error && returnedCode && url.searchParams.get('state') === state;
|
|
91
|
+
res.writeHead(ok ? 200 : 400, { 'Content-Type': 'text/html; charset=utf-8' });
|
|
92
|
+
res.end(ok ? '<p>Autorizzazione completata. Puoi chiudere questa scheda.</p>' : '<p>Autorizzazione non riuscita. Torna al terminale.</p>');
|
|
93
|
+
clearTimeout(timer);
|
|
94
|
+
if (ok)
|
|
95
|
+
resolve(returnedCode);
|
|
96
|
+
else
|
|
97
|
+
reject(new Error(error ? `Google ha risposto: ${error}` : 'Parametro state non valido.'));
|
|
98
|
+
});
|
|
99
|
+
}).finally(() => server.close());
|
|
100
|
+
const { tokens } = await client.getToken({ code, codeVerifier, redirect_uri: redirectUri });
|
|
101
|
+
if (!tokens.refresh_token) {
|
|
102
|
+
throw new Error('Google non ha restituito un refresh token. Revoca l\'accesso da myaccount.google.com/linkedapps e riprova.');
|
|
103
|
+
}
|
|
104
|
+
writeToken(config.tokenFile, tokens);
|
|
105
|
+
log(`Token salvato in ${config.tokenFile} (leggibile solo dal tuo utente).`);
|
|
106
|
+
}
|
|
107
|
+
/** Apre un indirizzo nel browser predefinito, se c'è. */
|
|
108
|
+
export function openBrowser(url) {
|
|
109
|
+
const cmd = process.platform === 'darwin' ? 'open' : process.platform === 'win32' ? 'explorer' : 'xdg-open';
|
|
110
|
+
try {
|
|
111
|
+
spawn(cmd, [url], { stdio: 'ignore', detached: true }).on('error', () => { }).unref();
|
|
112
|
+
}
|
|
113
|
+
catch {
|
|
114
|
+
// Nessun browser disponibile (es. server remoto): l'utente usa il link stampato.
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
//# sourceMappingURL=google.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"google.js","sourceRoot":"","sources":["../../src/auth/google.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,mBAAmB,EAAE,UAAU,EAAE,YAAY,EAAoB,MAAM,qBAAqB,CAAC;AACtG,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAgB,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE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AAC,CAAC;IAChI,CAAC;IACD,UAAU,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IACrC,GAAG,CAAC,oBAAoB,MAAM,CAAC,SAAS,mCAAmC,CAAC,CAAC;AAC/E,CAAC;AAED,yDAAyD;AACzD,MAAM,UAAU,WAAW,CAAC,GAAW;IACrC,MAAM,GAAG,GAAG,OAAO,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC;IAC5G,IAAI,CAAC;QACH,KAAK,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC;IACvF,CAAC;IAAC,MAAM,CAAC;QACP,iFAAiF;IACnF,CAAC;AACH,CAAC"}
|
package/dist/cli.d.ts
ADDED
package/dist/cli.js
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
3
|
+
import { runGoogleOAuthFlow } from './auth/google.js';
|
|
4
|
+
import { loadConfig } from './config.js';
|
|
5
|
+
import { formatDiagnostics, runDiagnostics } from './doctor.js';
|
|
6
|
+
import { createServer } from './server.js';
|
|
7
|
+
import { VERSION } from './version.js';
|
|
8
|
+
import { DOCS } from './links.js';
|
|
9
|
+
import { runSetup } from './setup/wizard.js';
|
|
10
|
+
// Con il trasporto stdio, stdout è riservato al protocollo MCP: tutti i messaggi vanno su stderr.
|
|
11
|
+
const log = (msg) => process.stderr.write(`${msg}\n`);
|
|
12
|
+
const HELP = `seomcp ${VERSION} — MCP per SEO, GEO e AEO: Search Console, Analytics 4, Bing, Core Web Vitals
|
|
13
|
+
|
|
14
|
+
Uso:
|
|
15
|
+
seomcp avvia il server MCP (stdio), è ciò che lancia il client (Claude, ChatGPT…)
|
|
16
|
+
seomcp setup configurazione guidata: credenziali, verifica e collegamento all'assistente
|
|
17
|
+
seomcp doctor verifica la configurazione e le credenziali
|
|
18
|
+
seomcp auth google autorizza l'accesso OAuth a Search Console (una tantum)
|
|
19
|
+
seomcp --version
|
|
20
|
+
|
|
21
|
+
Documentazione: ${DOCS.home}`;
|
|
22
|
+
async function main(argv) {
|
|
23
|
+
const [cmd, sub] = argv;
|
|
24
|
+
if (cmd === '--help' || cmd === '-h' || cmd === 'help') {
|
|
25
|
+
log(HELP);
|
|
26
|
+
return 0;
|
|
27
|
+
}
|
|
28
|
+
if (cmd === '--version' || cmd === '-v') {
|
|
29
|
+
log(VERSION);
|
|
30
|
+
return 0;
|
|
31
|
+
}
|
|
32
|
+
const config = loadConfig();
|
|
33
|
+
if (cmd === 'doctor') {
|
|
34
|
+
log(`seomcp ${VERSION}\nConfigurazione: ${config.configFileFound ? config.configFile : '(nessun file, solo variabili d\'ambiente)'}\n`);
|
|
35
|
+
const items = await runDiagnostics(config);
|
|
36
|
+
log(formatDiagnostics(items));
|
|
37
|
+
return items.some((i) => i.status === 'error') ? 1 : 0;
|
|
38
|
+
}
|
|
39
|
+
if (cmd === 'setup') {
|
|
40
|
+
if (!process.stdin.isTTY) {
|
|
41
|
+
log('seomcp setup fa delle domande: lancialo da un terminale, non dalla configurazione di un assistente.');
|
|
42
|
+
return 2;
|
|
43
|
+
}
|
|
44
|
+
return runSetup();
|
|
45
|
+
}
|
|
46
|
+
if (cmd === 'auth') {
|
|
47
|
+
if (sub !== 'google') {
|
|
48
|
+
log('Uso: seomcp auth google');
|
|
49
|
+
return 2;
|
|
50
|
+
}
|
|
51
|
+
if (config.google.mode !== 'oauth') {
|
|
52
|
+
log(config.google.mode === 'service-account'
|
|
53
|
+
? 'Stai usando un service account (GOOGLE_APPLICATION_CREDENTIALS): non serve autorizzare nulla.'
|
|
54
|
+
: `Imposta prima SEOMCP_GOOGLE_CLIENT_ID e SEOMCP_GOOGLE_CLIENT_SECRET. Guida: ${DOCS.google}`);
|
|
55
|
+
return config.google.mode === 'service-account' ? 0 : 2;
|
|
56
|
+
}
|
|
57
|
+
await runGoogleOAuthFlow(config.google, log);
|
|
58
|
+
log('\nFatto. Verifica con: npx @contentisking/seomcp doctor');
|
|
59
|
+
return 0;
|
|
60
|
+
}
|
|
61
|
+
if (cmd) {
|
|
62
|
+
log(`Comando sconosciuto: ${cmd}\n\n${HELP}`);
|
|
63
|
+
return 2;
|
|
64
|
+
}
|
|
65
|
+
const server = createServer(config);
|
|
66
|
+
await server.connect(new StdioServerTransport());
|
|
67
|
+
log(`[seomcp] ${VERSION} avviato (google: ${config.google.mode}, bing: ${config.bingApiKey ? 'on' : 'off'})`);
|
|
68
|
+
return -1; // resta in esecuzione
|
|
69
|
+
}
|
|
70
|
+
main(process.argv.slice(2)).then((code) => {
|
|
71
|
+
if (code >= 0)
|
|
72
|
+
process.exit(code);
|
|
73
|
+
}, (err) => {
|
|
74
|
+
log(`Errore: ${err.message}`);
|
|
75
|
+
process.exit(1);
|
|
76
|
+
});
|
|
77
|
+
//# sourceMappingURL=cli.js.map
|
package/dist/cli.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAA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