MCP server for Google Search Console — analyze search performance, inspect URL indexing and manage sitemaps from an AI app
接入配置
选择客户端,复制配置,再按项目文档补齐环境变量。
claude mcp add google-search-console-a1-x-tech --env GOOGLE_SEARCH_CONSOLE_CLIENT_SECRET='<GOOGLE_SEARCH_CONSOLE_CLIENT_SECRET>' --env GOOGLE_SEARCH_CONSOLE_REFRESH_TOKEN='<GOOGLE_SEARCH_CONSOLE_REFRESH_TOKEN>' --env GOOGLE_SEARCH_CONSOLE_ACCESS_TOKEN='<GOOGLE_SEARCH_CONSOLE_ACCESS_TOKEN>' -- npx -y mcp-google-search-console~/.codex/config.toml
[mcp_servers.google-search-console-a1-x-tech]
command = "npx"
args = ["-y", "mcp-google-search-console"]
env = { GOOGLE_SEARCH_CONSOLE_CLIENT_SECRET = "<GOOGLE_SEARCH_CONSOLE_CLIENT_SECRET>", GOOGLE_SEARCH_CONSOLE_REFRESH_TOKEN = "<GOOGLE_SEARCH_CONSOLE_REFRESH_TOKEN>", GOOGLE_SEARCH_CONSOLE_ACCESS_TOKEN = "<GOOGLE_SEARCH_CONSOLE_ACCESS_TOKEN>" }
# codex mcp add google-search-console-a1-x-tech --env GOOGLE_SEARCH_CONSOLE_CLIENT_SECRET='<GOOGLE_SEARCH_CONSOLE_CLIENT_SECRET>' --env GOOGLE_SEARCH_CONSOLE_REFRESH_TOKEN='<GOOGLE_SEARCH_CONSOLE_REFRESH_TOKEN>' --env GOOGLE_SEARCH_CONSOLE_ACCESS_TOKEN='<GOOGLE_SEARCH_CONSOLE_ACCESS_TOKEN>' -- npx -y mcp-google-search-console~/.cursor/mcp.json
{
"mcpServers": {
"google-search-console-a1-x-tech": {
"command": "npx",
"args": [
"-y",
"mcp-google-search-console"
],
"env": {
"GOOGLE_SEARCH_CONSOLE_CLIENT_SECRET": "<GOOGLE_SEARCH_CONSOLE_CLIENT_SECRET>",
"GOOGLE_SEARCH_CONSOLE_REFRESH_TOKEN": "<GOOGLE_SEARCH_CONSOLE_REFRESH_TOKEN>",
"GOOGLE_SEARCH_CONSOLE_ACCESS_TOKEN": "<GOOGLE_SEARCH_CONSOLE_ACCESS_TOKEN>"
}
}
}
}.vscode/mcp.json
{
"servers": {
"google-search-console-a1-x-tech": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"mcp-google-search-console"
],
"env": {
"GOOGLE_SEARCH_CONSOLE_CLIENT_SECRET": "<GOOGLE_SEARCH_CONSOLE_CLIENT_SECRET>",
"GOOGLE_SEARCH_CONSOLE_REFRESH_TOKEN": "<GOOGLE_SEARCH_CONSOLE_REFRESH_TOKEN>",
"GOOGLE_SEARCH_CONSOLE_ACCESS_TOKEN": "<GOOGLE_SEARCH_CONSOLE_ACCESS_TOKEN>"
}
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"google-search-console-a1-x-tech": {
"command": "npx",
"args": [
"-y",
"mcp-google-search-console"
],
"env": {
"GOOGLE_SEARCH_CONSOLE_CLIENT_SECRET": "<GOOGLE_SEARCH_CONSOLE_CLIENT_SECRET>",
"GOOGLE_SEARCH_CONSOLE_REFRESH_TOKEN": "<GOOGLE_SEARCH_CONSOLE_REFRESH_TOKEN>",
"GOOGLE_SEARCH_CONSOLE_ACCESS_TOKEN": "<GOOGLE_SEARCH_CONSOLE_ACCESS_TOKEN>"
}
}
}
}claude_desktop_config.json
{
"mcpServers": {
"google-search-console-a1-x-tech": {
"command": "npx",
"args": [
"-y",
"mcp-google-search-console"
],
"env": {
"GOOGLE_SEARCH_CONSOLE_CLIENT_SECRET": "<GOOGLE_SEARCH_CONSOLE_CLIENT_SECRET>",
"GOOGLE_SEARCH_CONSOLE_REFRESH_TOKEN": "<GOOGLE_SEARCH_CONSOLE_REFRESH_TOKEN>",
"GOOGLE_SEARCH_CONSOLE_ACCESS_TOKEN": "<GOOGLE_SEARCH_CONSOLE_ACCESS_TOKEN>"
}
}
}
}.trae/mcp.json
{
"mcpServers": {
"google-search-console-a1-x-tech": {
"command": "npx",
"args": [
"-y",
"mcp-google-search-console"
],
"env": {
"GOOGLE_SEARCH_CONSOLE_CLIENT_SECRET": "<GOOGLE_SEARCH_CONSOLE_CLIENT_SECRET>",
"GOOGLE_SEARCH_CONSOLE_REFRESH_TOKEN": "<GOOGLE_SEARCH_CONSOLE_REFRESH_TOKEN>",
"GOOGLE_SEARCH_CONSOLE_ACCESS_TOKEN": "<GOOGLE_SEARCH_CONSOLE_ACCESS_TOKEN>"
}
}
}
}需要的环境变量
GOOGLE_SEARCH_CONSOLE_CLIENT_SECRETGOOGLE_SEARCH_CONSOLE_REFRESH_TOKENGOOGLE_SEARCH_CONSOLE_ACCESS_TOKEN
把占位值换成你自己的密钥;不要把密钥提交到代码仓库。