# Connect an agent

> Add PromptGale as a remote MCP server with OAuth sign-in, then use its tools to ask AI answer engines, run batches and read results from your agent.

PromptGale is a remote MCP server with OAuth sign-in. Add its URL to your agent, approve in the browser, and the agent can ask ChatGPT, Perplexity, Gemini and Google AI Mode a prompt from the country you pick, run batches and read the answers, citations and brand mentions, as tools.

- **Server URL:** `https://promptgale.com/mcp`
- **Transport:** Streamable HTTP
- **Sign-in:** OAuth 2.1 in the browser. No key to paste.

## Set up your agent

- [Claude Code](https://promptgale.com/docs/connect-claude-code.md)
- [Cursor](https://promptgale.com/docs/connect-cursor.md)
- [Claude](https://promptgale.com/docs/connect-claude.md)
- [ChatGPT](https://promptgale.com/docs/connect-chatgpt.md)
- [Codex](https://promptgale.com/docs/connect-codex.md)
- [Gemini CLI](https://promptgale.com/docs/connect-gemini-cli.md)
- [VS Code](https://promptgale.com/docs/connect-vscode.md)
- [GitHub Copilot](https://promptgale.com/docs/connect-github-copilot.md)
- [OpenClaw](https://promptgale.com/docs/connect-openclaw.md)
- [Hermes Agent](https://promptgale.com/docs/connect-hermes.md)
- [n8n](https://promptgale.com/docs/connect-n8n.md)
- [Grok](https://promptgale.com/docs/connect-grok.md)
- [Grok Bot](https://promptgale.com/docs/connect-grok-bot.md)
- [Rakazo](https://promptgale.com/docs/connect-rakazo.md)
- [OpenBot](https://promptgale.com/docs/connect-openbot.md)
- [Meta Muse](https://promptgale.com/docs/connect-meta-muse.md)
- [Perplexity](https://promptgale.com/docs/connect-perplexity.md)
- [Le Chat](https://promptgale.com/docs/connect-le-chat.md)
- [Lindy](https://promptgale.com/docs/connect-lindy.md)
- [Zapier](https://promptgale.com/docs/connect-zapier.md)
- [Make](https://promptgale.com/docs/connect-make.md)
- [Devin](https://promptgale.com/docs/connect-devin.md)
- [Windsurf](https://promptgale.com/docs/connect-windsurf.md)
- [Zed](https://promptgale.com/docs/connect-zed.md)
- [Cline](https://promptgale.com/docs/connect-cline.md)
- [Kiro](https://promptgale.com/docs/connect-kiro.md)
- [Goose](https://promptgale.com/docs/connect-goose.md)
- [opencode](https://promptgale.com/docs/connect-opencode.md)
- [Mistral Vibe](https://promptgale.com/docs/connect-mistral-vibe.md)

Any other client that supports remote MCP servers works too: [other clients](https://promptgale.com/docs/connect-other.md).

## Let your agent set itself up

Paste this into an agent that can add MCP servers. It adds PromptGale, opens your browser to approve, and checks the connection.

```text
Connect yourself to PromptGale (AI answer engine data) through its MCP server.

1. Add a remote MCP server named "promptgale" with the URL https://promptgale.com/mcp
   Transport: Streamable HTTP. Authentication: OAuth, discovered automatically from the server. No API key needed.
   Use your own MCP settings, CLI or config file. For example:
   - Claude Code: claude mcp add --transport http promptgale https://promptgale.com/mcp
   - Codex: codex mcp add promptgale --url https://promptgale.com/mcp
   - Gemini CLI: gemini mcp add --transport http --scope user promptgale https://promptgale.com/mcp
   - OpenClaw: openclaw mcp set promptgale '{"url":"https://promptgale.com/mcp","transport":"streamable-http","auth":"oauth"}'
   - Hermes Agent: hermes mcp add --url https://promptgale.com/mcp --auth oauth promptgale
2. Start the sign-in for "promptgale" (Claude Code: run /mcp; Codex: codex mcp login promptgale; Gemini CLI: /mcp auth promptgale; OpenClaw: openclaw mcp login promptgale; Hermes Agent: hermes mcp login promptgale). My browser opens a PromptGale page where I log in and click Approve. Wait until the server shows as connected.
3. Check it works: call the whoami tool and tell me which account you are connected to and its available credits. Then call get_capabilities and tell me in a few lines what you can do (engines, countries, prices).

If your client stops tool calls after about a minute, raise its MCP tool timeout to 300 s (Codex: tool_timeout_sec = 300) or pass waitSeconds and poll get_task.
If you cannot add MCP servers yourself, tell me exactly where to paste https://promptgale.com/mcp in your app (for example in Claude: Customize > Connectors > Add custom connector) and wait for me to finish.
If your app does not support OAuth for MCP, ask me for an API key (I create one at https://promptgale.com/dashboard/keys) and send it as the header X-API-Key (Authorization: Bearer works too). Never write the key into a file that is shared or committed.
```

The same instructions are at [`/connect.txt`](https://promptgale.com/connect.txt).

## How sign-in works

1. The client discovers the server from `/.well-known/oauth-protected-resource/mcp`.
2. It registers itself (Client ID Metadata Document or Dynamic Client Registration).
3. You approve it in the browser.

Approved agents are listed in the dashboard under Connected agents, where you can revoke them. API keys also work, as `X-API-Key` or `Authorization: Bearer`: see [API key](https://promptgale.com/docs/connect-api-key.md).

## Tools

Only the tools for engines available now are listed.

- `whoami`: account, user, connection (OAuth client and scopes or API key), credits and links
- `get_capabilities`: engines available now with price, inputs, location support and countries
- `list_countries`: countries served, optionally for one engine
- `list_states`: US states for the state option
- `run_prompt`: ask one AI answer engine and wait for the answer, sources and brand analysis (waitSeconds 0: queue and get a taskId at once)
- `submit_prompt`: queue a prompt and get a taskId at once (deprecated: run_prompt with waitSeconds 0)
- `run_task`: any engine with the full REST payload, waits (dryRun: cost estimate only)
- `submit_task`: any engine with the full REST payload, returns a taskId (deprecated: run_task with waitSeconds 0)
- `get_task`: status and result of a task; waitSeconds polls until it finishes
- `list_tasks`: tasks with engine and status filters and pagination
- `submit_batch`: up to 10,000 tasks: prompts x engines or items (dryRun: cost estimate only)
- `get_batch`: batch progress and credits
- `list_batch_items`: batch items, optionally with results
- `list_batches`: recent batches
- `submit_location_grid`: one prompt or query from every point of a map grid
- `get_location_grid`: grid points with status and short answers
- `list_location_grids`: recent grids
- `get_credits`: credit balance
- `get_usage`: tasks and credits per day and engine
- `get_stats`: counts, success rate and top errors for the last hours
- `get_queue_status`: queued and running tasks, concurrency limit
- `clear_queue`: cancel every queued task and release their credits (destructive)
- `cancel_task`: cancel one queued task and release its credits (destructive)
- `cancel_batch`: cancel the queued work of one batch and release its credits (destructive)
- `get_capacity`: engine status and load
- `list_api_keys`: REST API key names and prefixes (keys are created and revoked in the dashboard)
- `resolve_google_redirect`: the page a Google redirect link leads to

## Costs

Tools that run an engine cost that engine's price in credits, the same as the REST API. Tools that read (status, credits, countries) cost nothing. The MCP server uses the same queue, credits and results as the REST API.

---

Docs index: https://promptgale.com/llms.txt · Full reference: https://promptgale.com/llms-full.txt · OpenAPI: https://promptgale.com/v1/openapi.json
