<!-- The markdown copy of https://oppalerts.com/docs/mcp . All pages: https://oppalerts.com/docs/llms.txt -->

[Documentation](https://oppalerts.com/docs/) / [MCP](https://oppalerts.com/docs/mcp/) / Connect an AI Agent

# Connect an AI Agent

`POST https://mcp.oppalerts.com/mcp`

Connect Claude Code, Codex, or another AI agent to the OppAlerts MCP server.

## What the MCP server is

The OppAlerts MCP server lets an AI agent, such as Claude Code or Codex, call OppAlerts tools. Every tool uses the same URL: `https://mcp.oppalerts.com/mcp`. The request includes the tool name.

## Connect Claude Code

```bash
claude mcp add --transport http oppalerts https://mcp.oppalerts.com/mcp
```

The first call opens a browser window for the OppAlerts login. The server uses OAuth 2.0 with PKCE from `https://auth.oppalerts.com`.

## How a call looks

An MCP call is a JSON-RPC request to `POST https://mcp.oppalerts.com/mcp` with the token in the `Authorization: Bearer` header.

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "account_calls_left",
    "arguments": {}
  }
}
```

## Rules for every call

- **Authentication.** Every call needs a token in the `Authorization: Bearer` header: a personal token or an OAuth access token. The MCP server needs the scope `mcp:use`. A tool that changes data also needs `api:write`. A missing or invalid token returns HTTP 401 `unauthorized`. See [Authentication](https://oppalerts.com/docs/getting-started/authentication).
- **Daily limits.** The 14 `news_` and `prospects_` tools are index searches. All index searches for an account share one daily count. Every other tool has a daily count of its own. Team members use the account’s counts. The counts reset every day at 04:00 New York time. [`account_calls_left`](https://oppalerts.com/docs/mcp/account_calls_left) shows the calls left today. A call over a count is refused with `daily_limit` (HTTP 429 in the API).
- **What counts.** Each tool call through the API or MCP uses one call from its daily count. A refused call with an HTTP status from 400 to 499 uses no daily call. Two responses are not refusals and use one call: a search stopped by the index (HTTP 422), and a server error (HTTP 500 to 599). The MCP messages `initialize`, `tools/list`, and `ping` are not tool calls and use no daily call. Calls from web app pages use the same counts, except when one of these 12 tools reads data from your own account: `campaigns_list`, `campaigns_settings`, `campaigns_organizations`, `campaigns_saved_opportunities`, `campaigns_dashboard`, `account_usage`, `account_team_members`, `account_calls_left`, `llm_answers_content_phrases`, `llm_answers_search_keywords`, `llm_answers_top_sites`, and `taxonomy_taxonomies`.
- **One search at a time.** Only one index search runs at a time for each account. A call to a `news_` or `prospects_` tool made while another index search runs is refused with `one_at_a_time` (HTTP 429 in the API) and uses no daily call. Wait a few seconds and send it again.
- **One change at a time.** Only one change runs at a time for each account. A call to one of the 16 tools that change data, made while another change is running for the account, is refused with `one_at_a_time` (HTTP 429 in the API) and uses no daily call. Send it again after a few seconds. The 16 tools: `campaigns_create`, `campaigns_update`, `campaigns_finalize`, `campaigns_archive`, `campaigns_activate`, `campaigns_rerun_research`, `campaigns_rebuild_counts`, `campaigns_set_taxonomy_presets`, `campaigns_set_daily_opportunities_email`, `campaigns_organization_add`, `campaigns_organization_update`, `campaigns_organization_delete`, `campaigns_saved_opportunity_add`, `campaigns_saved_opportunity_update`, `campaigns_saved_opportunity_archive`, and `campaigns_saved_opportunity_activate`.
- **Request log.** Each tool call with a valid token is written to the account’s request log: the time, the source, the token, the tool, the HTTP status, and whether it used a daily call. Refused calls are also logged. The MCP messages `initialize`, `tools/list`, and `ping` are in the log with `counted` false. A call of `account_calls_left` through the API or MCP is never logged. [`account_usage`](https://oppalerts.com/docs/mcp/account_usage) and the Usage page of the web app show the log for the last 14 days.

[The API page](https://oppalerts.com/docs/api/#limits) lists the daily counts of each plan.

## Errors

A refused tool call returns a normal JSON-RPC response with `"isError": true`. Its text starts with the error code, the same code that the API returns, then a colon and one sentence:

```json
{
  "content": [
    {"type": "text", "text": "no_campaign: That campaign is not in this account."}
  ],
  "isError": true
}
```

The [API page](https://oppalerts.com/docs/api/#errors) lists the error codes that many tools share. Each tool’s page lists its error codes.

One type of refusal is not a tool result. When the token does not have a scope that the call needs, the server returns HTTP status 403, as the MCP standard requires. The response has a `WWW-Authenticate` header with `error="insufficient_scope"` and the scopes that the call needs. An MCP app that reads this header asks you for those permissions. An example: a tool that changes a campaign, called by an app that can only read. The response body has the error code `forbidden` and one sentence.

## All tools

The server has 50 tools, in 10 groups. Each tool has an MCP page and an API page.

### Account (3)

- [`account_calls_left`](https://oppalerts.com/docs/mcp/account_calls_left): Calls Left Today
- [`account_team_members`](https://oppalerts.com/docs/mcp/account_team_members): Team Members
- [`account_usage`](https://oppalerts.com/docs/mcp/account_usage): Account Usage

### Backlinks (2)

- [`backlinks`](https://oppalerts.com/docs/mcp/backlinks): Backlinks of One or More Sites
- [`backlinks_link_gap`](https://oppalerts.com/docs/mcp/backlinks_link_gap): Backlink Gap

### Campaigns (21)

- [`campaigns_activate`](https://oppalerts.com/docs/mcp/campaigns_activate): Activate a Campaign
- [`campaigns_archive`](https://oppalerts.com/docs/mcp/campaigns_archive): Archive a Campaign
- [`campaigns_create`](https://oppalerts.com/docs/mcp/campaigns_create): Create a Campaign
- [`campaigns_dashboard`](https://oppalerts.com/docs/mcp/campaigns_dashboard): Campaign Dashboard
- [`campaigns_finalize`](https://oppalerts.com/docs/mcp/campaigns_finalize): Finalize a Campaign
- [`campaigns_list`](https://oppalerts.com/docs/mcp/campaigns_list): Campaign List
- [`campaigns_organization_add`](https://oppalerts.com/docs/mcp/campaigns_organization_add): Add an Organization
- [`campaigns_organization_delete`](https://oppalerts.com/docs/mcp/campaigns_organization_delete): Delete an Organization
- [`campaigns_organization_update`](https://oppalerts.com/docs/mcp/campaigns_organization_update): Update an Organization
- [`campaigns_organizations`](https://oppalerts.com/docs/mcp/campaigns_organizations): Campaign Organizations
- [`campaigns_rebuild_counts`](https://oppalerts.com/docs/mcp/campaigns_rebuild_counts): Rebuild the Daily Counts
- [`campaigns_rerun_research`](https://oppalerts.com/docs/mcp/campaigns_rerun_research): Run Stopped Research Again
- [`campaigns_saved_opportunities`](https://oppalerts.com/docs/mcp/campaigns_saved_opportunities): Saved Opportunities
- [`campaigns_saved_opportunity_activate`](https://oppalerts.com/docs/mcp/campaigns_saved_opportunity_activate): Activate a Saved Opportunity
- [`campaigns_saved_opportunity_add`](https://oppalerts.com/docs/mcp/campaigns_saved_opportunity_add): Add a Saved Opportunity
- [`campaigns_saved_opportunity_archive`](https://oppalerts.com/docs/mcp/campaigns_saved_opportunity_archive): Archive a Saved Opportunity
- [`campaigns_saved_opportunity_update`](https://oppalerts.com/docs/mcp/campaigns_saved_opportunity_update): Update a Saved Opportunity
- [`campaigns_set_daily_opportunities_email`](https://oppalerts.com/docs/mcp/campaigns_set_daily_opportunities_email): Set the Daily Opportunities Email
- [`campaigns_set_taxonomy_presets`](https://oppalerts.com/docs/mcp/campaigns_set_taxonomy_presets): Set Taxonomy Presets
- [`campaigns_settings`](https://oppalerts.com/docs/mcp/campaigns_settings): Campaign Settings
- [`campaigns_update`](https://oppalerts.com/docs/mcp/campaigns_update): Update a Campaign

### Link Graph (1)

- [`linkgraph_history`](https://oppalerts.com/docs/mcp/linkgraph_history): PageRank History

### LLM Answers (3)

- [`llm_answers_content_phrases`](https://oppalerts.com/docs/mcp/llm_answers_content_phrases): AI Content Phrases
- [`llm_answers_search_keywords`](https://oppalerts.com/docs/mcp/llm_answers_search_keywords): AI Search Keywords
- [`llm_answers_top_sites`](https://oppalerts.com/docs/mcp/llm_answers_top_sites): Top Sites Named by AI

### News Index (7)

- [`news_brand_link_gap`](https://oppalerts.com/docs/mcp/news_brand_link_gap): News Link Gap
- [`news_brand_links`](https://oppalerts.com/docs/mcp/news_brand_links): News Pages Linking to Brands
- [`news_brand_mentions`](https://oppalerts.com/docs/mcp/news_brand_mentions): News Brand Mentions
- [`news_opportunities`](https://oppalerts.com/docs/mcp/news_opportunities): News Opportunities
- [`news_search`](https://oppalerts.com/docs/mcp/news_search): News Search
- [`news_similar_to_id`](https://oppalerts.com/docs/mcp/news_similar_to_id): Similar News Pages
- [`news_unlinked_brand_mentions`](https://oppalerts.com/docs/mcp/news_unlinked_brand_mentions): News Unlinked Brand Mentions

### Prospect Index (7)

- [`prospects_brand_link_gap`](https://oppalerts.com/docs/mcp/prospects_brand_link_gap): Prospect Link Gap
- [`prospects_brand_links`](https://oppalerts.com/docs/mcp/prospects_brand_links): Prospect Pages Linking to Brands
- [`prospects_brand_mentions`](https://oppalerts.com/docs/mcp/prospects_brand_mentions): Prospect Brand Mentions
- [`prospects_opportunities`](https://oppalerts.com/docs/mcp/prospects_opportunities): Prospect Opportunities
- [`prospects_search`](https://oppalerts.com/docs/mcp/prospects_search): Prospect Search
- [`prospects_similar_to_id`](https://oppalerts.com/docs/mcp/prospects_similar_to_id): Similar Prospect Pages
- [`prospects_unlinked_brand_mentions`](https://oppalerts.com/docs/mcp/prospects_unlinked_brand_mentions): Prospect Unlinked Brand Mentions

### Site Info (1)

- [`siteinfo_site`](https://oppalerts.com/docs/mcp/siteinfo_site): Site Contact Details

### Taxonomies (3)

- [`taxonomy_categories`](https://oppalerts.com/docs/mcp/taxonomy_categories): Taxonomy Categories
- [`taxonomy_semantic_content_analyzer`](https://oppalerts.com/docs/mcp/taxonomy_semantic_content_analyzer): Semantic Content Analyzer
- [`taxonomy_taxonomies`](https://oppalerts.com/docs/mcp/taxonomy_taxonomies): Available Taxonomies

### Types (2)

- [`types_content_types`](https://oppalerts.com/docs/mcp/types_content_types): Content Types
- [`types_opportunity_types`](https://oppalerts.com/docs/mcp/types_opportunity_types): Opportunity Types

## Related pages

- [Authentication and Limits (API)](https://oppalerts.com/docs/api/)
- [Authentication](https://oppalerts.com/docs/getting-started/authentication)
- [Is API and MCP access available?](https://oppalerts.com/docs/faq/is-api-and-mcp-access-available)
