@disruptorganic/mcp-google-search-console 2.0.0 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +27 -15
- package/README.md +36 -85
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/index.js +5 -14
- package/dist/config/index.js.map +1 -1
- package/dist/tools/health-check.js +1 -1
- package/package.json +1 -1
package/.env.example
CHANGED
|
@@ -1,18 +1,30 @@
|
|
|
1
|
-
# Google
|
|
2
|
-
#
|
|
3
|
-
#
|
|
4
|
-
|
|
5
|
-
#
|
|
6
|
-
#
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
#
|
|
10
|
-
#
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
#
|
|
15
|
-
#
|
|
1
|
+
# Google Search Console MCP Server Configuration
|
|
2
|
+
#
|
|
3
|
+
# QUICK START:
|
|
4
|
+
# This .env file is OPTIONAL. The server works out-of-the-box with no configuration.
|
|
5
|
+
# You only need to set these variables if you want to customize the server.
|
|
6
|
+
#
|
|
7
|
+
# To get started:
|
|
8
|
+
# 1. npm install
|
|
9
|
+
# 2. npm start
|
|
10
|
+
# 3. Authenticate via Claude Code's /mcp menu
|
|
11
|
+
#
|
|
12
|
+
# See README.md for detailed instructions.
|
|
13
|
+
|
|
14
|
+
# =============================================================================
|
|
15
|
+
# Advanced: Custom OAuth Configuration (Optional)
|
|
16
|
+
# =============================================================================
|
|
17
|
+
# By default, the server uses the built-in OAuth app.
|
|
18
|
+
# Only set these if you want to use your own Google Cloud Project.
|
|
19
|
+
# See documentation for instructions on creating your own OAuth app.
|
|
20
|
+
|
|
21
|
+
# OPTIONAL: Custom OAuth 2.0 Client ID
|
|
22
|
+
# GOOGLE_CLIENT_ID=your-custom-client-id.apps.googleusercontent.com
|
|
23
|
+
|
|
24
|
+
# OPTIONAL: Custom OAuth 2.0 Client Secret
|
|
25
|
+
# GOOGLE_CLIENT_SECRET=GOCSPX-your-custom-client-secret
|
|
26
|
+
|
|
27
|
+
# OPTIONAL: Custom OAuth 2.0 Redirect URI
|
|
16
28
|
# GOOGLE_REDIRECT_URI=http://localhost:3456/oauth/callback
|
|
17
29
|
|
|
18
30
|
# MCP Server Configuration
|
package/README.md
CHANGED
|
@@ -21,76 +21,52 @@ This version introduces a major architectural upgrade to HTTP transport with OAu
|
|
|
21
21
|
|
|
22
22
|
## Quick Start
|
|
23
23
|
|
|
24
|
-
###
|
|
25
|
-
|
|
26
|
-
**Option 1: Install from npm (Recommended)**
|
|
24
|
+
### 1. Install
|
|
27
25
|
|
|
28
26
|
```bash
|
|
29
27
|
npm install -g @disruptorganic/mcp-google-search-console
|
|
30
28
|
```
|
|
31
29
|
|
|
32
|
-
|
|
30
|
+
### 2. Start the Server
|
|
33
31
|
|
|
34
32
|
```bash
|
|
35
|
-
|
|
36
|
-
cd mcp-google-search-console
|
|
37
|
-
npm install
|
|
38
|
-
npm run build
|
|
33
|
+
mcp-google-search-console
|
|
39
34
|
```
|
|
40
35
|
|
|
41
|
-
|
|
36
|
+
The server starts on http://localhost:3456 with built-in OAuth credentials.
|
|
42
37
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
"google-search-console": {
|
|
76
|
-
"url": "http://localhost:3456",
|
|
77
|
-
"description": "Google Search Console data analysis"
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
5. **Authenticate**:
|
|
83
|
-
- Type `/mcp` in Claude Code
|
|
84
|
-
- Select "google-search-console"
|
|
85
|
-
- Click "Login" and complete OAuth flow
|
|
86
|
-
- Server locks to your account for security
|
|
87
|
-
|
|
88
|
-
6. **Start querying**:
|
|
89
|
-
```
|
|
90
|
-
List my Google Search Console properties
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
For detailed setup instructions, see [Claude Code Setup Guide](./docs/CLAUDE_CODE_SETUP.md).
|
|
38
|
+
### 3. Add to Claude Code
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
claude mcp add --transport http google-search-console http://localhost:3456
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### 4. Authenticate
|
|
45
|
+
|
|
46
|
+
1. Type `/mcp` in Claude Code
|
|
47
|
+
2. Select "google-search-console"
|
|
48
|
+
3. Click "Login"
|
|
49
|
+
4. Sign in with your Google account
|
|
50
|
+
5. Grant Search Console access
|
|
51
|
+
6. Done!
|
|
52
|
+
|
|
53
|
+
### 5. Use the Tools
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
List my Google Search Console properties
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Configuration (Optional)
|
|
60
|
+
|
|
61
|
+
The server works out-of-the-box with no configuration.
|
|
62
|
+
|
|
63
|
+
**Optional customization**:
|
|
64
|
+
```bash
|
|
65
|
+
export MCP_PORT=3457 # Use different port
|
|
66
|
+
export LOG_LEVEL=debug # Enable debug logging
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
For advanced configuration options, see [Configuration Guide](./docs/CONFIGURATION.md).
|
|
94
70
|
|
|
95
71
|
## Available Tools (9)
|
|
96
72
|
|
|
@@ -225,31 +201,11 @@ See [User Guide](./docs/USER_GUIDE.md) for more examples and usage patterns.
|
|
|
225
201
|
- **Rate Limit**: 1,200 queries/minute (server uses 1,080/minute for safety)
|
|
226
202
|
- **No OR Queries**: Requires sequential calls per keyword
|
|
227
203
|
|
|
228
|
-
## Configuration
|
|
229
|
-
|
|
230
|
-
Environment variables (set in `.env` file or export):
|
|
231
|
-
|
|
232
|
-
```bash
|
|
233
|
-
# Required: Google OAuth 2.0 Credentials
|
|
234
|
-
GOOGLE_CLIENT_ID=your-client-id.apps.googleusercontent.com
|
|
235
|
-
GOOGLE_CLIENT_SECRET=your-client-secret
|
|
236
|
-
|
|
237
|
-
# Optional: Server Configuration
|
|
238
|
-
MCP_PORT=3456 # Default: 3456
|
|
239
|
-
MCP_HOST=localhost # Default: localhost
|
|
240
|
-
|
|
241
|
-
# Optional: Logging
|
|
242
|
-
LOG_LEVEL=info # Default: info (options: debug, info, warn, error)
|
|
243
|
-
```
|
|
244
|
-
|
|
245
|
-
See [Configuration Reference](./docs/CONFIGURATION.md) for advanced options.
|
|
246
204
|
|
|
247
205
|
## Documentation
|
|
248
206
|
|
|
249
207
|
### Getting Started
|
|
250
208
|
- **[Claude Code Setup Guide](./docs/CLAUDE_CODE_SETUP.md)** - Step-by-step integration with Claude Code
|
|
251
|
-
- **[Google OAuth Setup](./docs/GOOGLE_OAUTH_SETUP.md)** - Google Cloud Console configuration
|
|
252
|
-
- **[Quick Start](./QUICK_START.md)** - Fast setup reference
|
|
253
209
|
- **[Migration Guide](./MIGRATION.md)** - Upgrading from v1.x to v2.0
|
|
254
210
|
|
|
255
211
|
### Usage
|
|
@@ -306,7 +262,6 @@ For production deployments:
|
|
|
306
262
|
### Prerequisites
|
|
307
263
|
- Node.js >= 18.0.0
|
|
308
264
|
- npm >= 8.0.0
|
|
309
|
-
- Google Account with access to Search Console
|
|
310
265
|
|
|
311
266
|
### Setup
|
|
312
267
|
|
|
@@ -318,10 +273,6 @@ cd mcp-google-search-console
|
|
|
318
273
|
# Install dependencies
|
|
319
274
|
npm install
|
|
320
275
|
|
|
321
|
-
# Create .env file (see Configuration section above)
|
|
322
|
-
cp .env.example .env
|
|
323
|
-
# Edit .env with your credentials
|
|
324
|
-
|
|
325
276
|
# Build
|
|
326
277
|
npm run build
|
|
327
278
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AA0BA,MAAM,WAAW,SAAS;IAExB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IAGpB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IAGb,QAAQ,EAAE,MAAM,CAAC;IAGjB,SAAS,EAAE,MAAM,CAAC;IAGlB,YAAY,EAAE,MAAM,CAAC;IAGrB,uBAAuB,EAAE,MAAM,CAAC;IAChC,gBAAgB,EAAE,MAAM,CAAC;IAGzB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,OAAO,CAAC;IACvB,YAAY,EAAE,OAAO,CAAC;CACvB;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AA0BA,MAAM,WAAW,SAAS;IAExB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IAGpB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IAGb,QAAQ,EAAE,MAAM,CAAC;IAGjB,SAAS,EAAE,MAAM,CAAC;IAGlB,YAAY,EAAE,MAAM,CAAC;IAGrB,uBAAuB,EAAE,MAAM,CAAC;IAChC,gBAAgB,EAAE,MAAM,CAAC;IAGzB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,OAAO,CAAC;IACvB,YAAY,EAAE,OAAO,CAAC;CACvB;AAuGD,eAAO,MAAM,MAAM,EAAE,SAAwB,CAAC;AAS9C,wBAAgB,cAAc,IAAI,MAAM,CAEvC;AAKD,wBAAgB,iBAAiB,IAAI,MAAM,CAE1C;AAKD,wBAAgB,aAAa,IAAI,OAAO,CAEvC;AAKD,wBAAgB,YAAY,IAAI,OAAO,CAEtC;AASD,wBAAgB,gBAAgB,IAAI,IAAI,CAsBvC;AAMD,wBAAgB,gBAAgB,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAczD"}
|
package/dist/config/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import * as path from 'path';
|
|
|
2
2
|
import * as os from 'os';
|
|
3
3
|
import { logger } from '../utils/logger.js';
|
|
4
4
|
function validateRequiredEnvVars() {
|
|
5
|
-
const required = [
|
|
5
|
+
const required = [];
|
|
6
6
|
const missing = [];
|
|
7
7
|
for (const varName of required) {
|
|
8
8
|
if (!process.env[varName]) {
|
|
@@ -18,17 +18,7 @@ function validateRequiredEnvVars() {
|
|
|
18
18
|
The following required environment variables are not set:
|
|
19
19
|
${missing.map(v => ` - ${v}`).join('\n')}
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
1. Create a .env file in the project root
|
|
24
|
-
2. Copy .env.example to .env: cp .env.example .env
|
|
25
|
-
3. Add your Google OAuth credentials:
|
|
26
|
-
- Get them from: https://console.cloud.google.com
|
|
27
|
-
- See docs/GOOGLE_OAUTH_SETUP.md for instructions
|
|
28
|
-
|
|
29
|
-
Example .env file:
|
|
30
|
-
GOOGLE_CLIENT_ID=123456789-abc...apps.googleusercontent.com
|
|
31
|
-
GOOGLE_CLIENT_SECRET=GOCSPX-abc...xyz
|
|
21
|
+
Please set these variables in a .env file or export them.
|
|
32
22
|
|
|
33
23
|
Then restart the server.
|
|
34
24
|
`.trim();
|
|
@@ -40,8 +30,9 @@ function loadConfig() {
|
|
|
40
30
|
validateRequiredEnvVars();
|
|
41
31
|
const nodeEnv = process.env.NODE_ENV || 'production';
|
|
42
32
|
return {
|
|
43
|
-
clientId: process.env.GOOGLE_CLIENT_ID
|
|
44
|
-
|
|
33
|
+
clientId: process.env.GOOGLE_CLIENT_ID ||
|
|
34
|
+
'34697290414-f3416jghvqmstm167lklfo1lbddnlsf4.apps.googleusercontent.com',
|
|
35
|
+
clientSecret: process.env.GOOGLE_CLIENT_SECRET || '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',
|
|
45
36
|
redirectUri: process.env.GOOGLE_REDIRECT_URI ||
|
|
46
37
|
'http://localhost:3456/oauth/callback',
|
|
47
38
|
port: parseInt(process.env.MCP_PORT || '3456', 10),
|
package/dist/config/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AA8C5C,SAAS,uBAAuB;IAC9B,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AA8C5C,SAAS,uBAAuB;IAC9B,MAAM,QAAQ,GAAa,EAAE,CAAC;IAC9B,MAAM,OAAO,GAAa,EAAE,CAAC;IAE7B,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAC/B,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC;YAC1B,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACxB,CAAC;IACH,CAAC;IAED,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACvB,MAAM,YAAY,GAAG;;;;;;EAMvB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;;;;;KAKp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IAAI,CAAC,QAAQ,EAAE;QAC5B,IAAI,EAAE,MAAM,CAAC,IAAI;QACjB,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,WAAW,EAAE,MAAM,CAAC,OAAO;QAC3B,YAAY,EAAE,MAAM,CAAC,YAAY,CAAC,QAAQ,EAAE;QAC5C,uBAAuB,EAAE,MAAM,CAAC,uBAAuB,CAAC,QAAQ,EAAE;QAClE,gBAAgB,EAAE,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE;KACrD,CAAC;AACJ,CAAC"}
|
|
@@ -39,7 +39,7 @@ export async function handleHealthCheck(_params, client) {
|
|
|
39
39
|
timestamp: new Date().toISOString(),
|
|
40
40
|
server: {
|
|
41
41
|
name: 'google-search-console-mcp',
|
|
42
|
-
version: '
|
|
42
|
+
version: '2.0.1',
|
|
43
43
|
uptime: process.uptime(),
|
|
44
44
|
nodeVersion: process.version,
|
|
45
45
|
platform: process.platform,
|
package/package.json
CHANGED