Integration · Direct HTTP (curl, custom agents)
Call the Google Search Console MCP server over HTTP
4 steps · about 5 minutes
By the GSC PAP team · Updated
If your AI client does not support MCP yet, or you are building your own agent, you can call GSC PAP directly over HTTP. MCP's Streamable HTTP transport is JSON-RPC sent in POST requests, so curl or any HTTP library can speak it.
This guide shows the raw requests: the initialize handshake, listing tools, and calling a tool. Use it for testing, scripting, or as the starting point for a custom integration.
How to call the GSC PAP MCP server over HTTP
- 1
Sign in to GSC PAP and copy your token
Go to gscpap.com and click "Sign in with Google." Approve the read-only access it asks for. The connect page then shows your bearer token once, so copy it now. If you lose it, create a new one at app.gscpap.com/account/tokens; your other tokens keep working.
- 2
Send the initialize request
POST a JSON-RPC initialize request with your token in the Authorization header, and send the Accept header exactly as shown. The server replies with HTTP 200 and a text/event-stream body: an event: message line, then a data: line holding the JSON-RPC result with the server's name, protocol version and capabilities. It does not return an Mcp-Session-Id header.
shellcurl -X POST https://mcp.gscpap.com/mcp \ -H "Authorization: Bearer YOUR_TOKEN" \ -H "Content-Type: application/json" \ -H "Accept: application/json, text/event-stream" \ -d '{ "jsonrpc": "2.0", "id": 1, "method": "initialize", "params": { "protocolVersion": "2025-06-18", "capabilities": {}, "clientInfo": {"name": "curl", "version": "1.0"} } }' - 3
List the tools
Call tools/list to get every tool with its description and input schema. The server runs in stateless mode, so this request needs no session ID and nothing from the initialize response. The sed and jq part strips the event-stream framing and prints only the tool names; drop it to see the full response.
shellcurl -s -X POST https://mcp.gscpap.com/mcp \ -H "Authorization: Bearer YOUR_TOKEN" \ -H "Content-Type: application/json" \ -H "Accept: application/json, text/event-stream" \ -d '{"jsonrpc": "2.0", "id": 2, "method": "tools/list"}' \ | sed -n 's/^data: //p' | jq -r '.result.tools[].name' - 4
Call a tool
Use tools/call with the tool's name and an arguments object that matches its input schema. list_sites takes no arguments and returns your verified Search Console properties as JSON text in result.content. Swap in any other tool name from tools/list.
shellcurl -X POST https://mcp.gscpap.com/mcp \ -H "Authorization: Bearer YOUR_TOKEN" \ -H "Content-Type: application/json" \ -H "Accept: application/json, text/event-stream" \ -d '{ "jsonrpc": "2.0", "id": 3, "method": "tools/call", "params": { "name": "list_sites", "arguments": {} } }'
Calling the server directly: common issues
- ·Send Accept: application/json, text/event-stream. If you accept only application/json, the server rejects the request with "Not Acceptable: Client must accept both application/json and text/event-stream".
- ·Responses use event-stream framing even for a single result, so read the JSON from the data: line instead of parsing the whole body as JSON.
- ·A missing, wrong or revoked token gets HTTP 401 before the request reaches the MCP layer, with a WWW-Authenticate header that points at the server's OAuth metadata. Check the status code first.
- ·Every authenticated MCP call counts toward the rate limits, tools/list included: 30 per minute and 500 per hour for each token, and 60 per minute and 1,000 per hour for your account across all its tokens. Over a limit, the server returns a JSON-RPC error that says how many seconds to wait.
- ·For Python agents, the official mcp package (pip install mcp) handles the handshake and the event-stream parsing for you. Prefer it over raw curl unless you are writing a one-off shell script.
- ·curl -v prints your Authorization header. Remove that line from any output you share for support.
Frequently asked questions
Do I need an MCP client or SDK to call GSC PAP?
No. MCP over Streamable HTTP is JSON-RPC over HTTP, so curl or any HTTP library can call it. For Python agents, the official mcp package (pip install mcp) handles the handshake and tool calls for you.
Do I need to keep a session ID between requests?
No. GSC PAP runs in stateless mode and does not return an Mcp-Session-Id header. Each request stands on its own, so send the bearer token in the Authorization header every time.
Why does the response start with event: message?
GSC PAP answers in the Streamable HTTP transport's event-stream format, even when there is only one message. The JSON-RPC response is on the line that starts with data:. MCP SDKs parse this for you.
Do I need a Google Cloud project or a Search Console API key?
No. Your GSC PAP bearer token is the only credential you send. GSC PAP calls Google's APIs for you, using the read-only Search Console and Analytics access you granted when you signed in with Google.
Other integrations
All integrationsClaude Desktop
Connect Claude Desktop to Google Search Console without creating a Google Cloud project. Sign in with Google, paste one config block, restart Claude.
Cursor
Connect Google Search Console to Cursor through a hosted MCP server. Sign in with Google, paste one token into mcp.json, and skip the Google Cloud project.
Claude Code
Add Google Search Console to Claude Code with one claude mcp add command. Hosted and read-only: no Google Cloud project, no OAuth credentials, no Python.
Codex CLI (OpenAI)
Add Google Search Console, GA4 and PageSpeed data to OpenAI's Codex CLI with one TOML block and a bearer token. You never create a Google Cloud project.
VS Code (GitHub Copilot)
Connect Google Search Console to GitHub Copilot in VS Code with one .vscode/mcp.json entry, then ask agent mode about GSC. You skip Google Cloud setup.
Gemini CLI (Google)
Query Google Search Console (GSC) from your terminal with Gemini CLI. Register GSC PAP as an MCP server in settings.json, with no Google Cloud project.
Windsurf (Devin Desktop)
Give Windsurf, now Devin Desktop, your Google Search Console data. Add GSC PAP as a remote MCP server with one bearer token and no Google Cloud project.
Zed Editor
Bring Google Search Console into Zed's AI assistant as an MCP context server. You add one settings.json block and a token, with no Google Cloud setup.
JetBrains IDEs
Connect Google Search Console to IntelliJ, PyCharm, WebStorm and other JetBrains IDEs via AI Assistant's MCP settings, without a Google Cloud project.
Continue (extension)
Continue MCP setup for Google Search Console: add one mcpServers entry with a bearer token in VS Code or JetBrains. You do not need a Google Cloud project.
Claude.ai (browser)
Add Google Search Console to Claude.ai as a custom connector. Paste one URL and approve access. No token to copy, no config file, no Google Cloud project.
opencode
Add Google Search Console to opencode as a remote MCP server. One config block with your token, no Google Cloud project, no local server to run.
Cline
Add Google Search Console to Cline in VS Code or the Cline CLI as a remote MCP server. One token, no Google Cloud project, read-only access.
Warp
Add Google Search Console to Warp's agent as a remote MCP server. Paste one JSON block with your token, press Start, and ask about your traffic in the terminal.
LM Studio
Give a local model your Search Console data. Add GSC PAP to LM Studio's mcp.json as a remote server, with one token and no Google Cloud project.
ChatGPT
Add Google Search Console to ChatGPT as a custom MCP server. What the setup looks like, and the plan requirement that decides whether you can do it at all.
Goose
Add Google Search Console to Goose as a streamable_http extension. One block in config.yaml with your token, no Google Cloud project, read-only access.
Google Antigravity
Add Search Console to Google Antigravity as a custom MCP server. It handles dynamic client registration, so the setup is a URL and a sign-in, with no token.
Roo Code
Add Google Search Console to Roo Code in VS Code as a streamable-http MCP server. One block with your token, no Google Cloud project, read-only.
Kilo Code
Add Google Search Console to Kilo Code as a remote MCP server. It can negotiate OAuth for you, or take a bearer token. No Google Cloud project either way.
Amp
Add Google Search Console to Amp as a remote MCP server, in settings or with one CLI command. No Google Cloud project, read-only scopes.
Kiro
Add Google Search Console to Kiro as a remote MCP server. One entry in mcp.json, the token read from an approved environment variable, read-only access.
Raycast
Add Google Search Console to Raycast AI as an HTTP MCP server. Dynamic OAuth means no token to paste, and HTTP servers work on Raycast for iOS too.
GitHub Copilot CLI
Add Google Search Console to GitHub Copilot CLI with one command or one JSON entry. Remote HTTP transport, your token in a header, read-only access.
n8n
Give an n8n AI Agent your Search Console data through the MCP Client Tool node, and schedule the SEO report you keep meaning to write.
LibreChat
Add GSC PAP to librechat.yaml as a streamable-http MCP server, and give every user on your install their own Search Console access rather than a shared one.