> ## Documentation Index
> Fetch the complete documentation index at: https://docs.serptag.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Authentication

I would keep this page clean and focused, similar to Stripe or Anthropic's authentication pages. Here's a polished version.

***

```md theme={null}
---
title: Authentication
description: Learn how to authenticate with the SERPtag MCP Server using your API key.
icon: shield
---
```

# Authentication

The **SERPtag MCP Server** uses **API key authentication** for every request.

Before your AI assistant can access your projects and keyword rankings, you'll need to create an API key from your SERPtag dashboard.

> **MCP Server**
>
> `https://mcp.serptag.com/mcp`

***

## Create an API Key

If you haven't already created an API key, follow the guide below.

👉 **Getting Started → Create an API Key**

Your API key will look similar to:

```text theme={null}
sk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
```

Requirements:

* Agency or Enterprise plan (2,500+ keywords)
* One active API key per account

***

# Authentication Methods

The SERPtag MCP Server supports three authentication methods depending on your AI application.

## Bearer Authentication (Recommended)

This is the preferred method for applications that support remote HTTP MCP, including **Cursor** and **VS Code**.

### HTTP Header

```http theme={null}
Authorization: Bearer sk_live_your_key_here
```

### Cursor Example

```json theme={null}
{
  "mcpServers": {
    "serptag": {
      "url": "https://mcp.serptag.com/mcp",
      "headers": {
        "Authorization": "Bearer sk_live_your_key_here"
      }
    }
  }
}
```

***

## X-API-Key Header

The SERPtag MCP Server also accepts an **X-API-Key** header.

```http theme={null}
X-API-Key: sk_live_your_key_here
```

This method is also supported by the SERPtag REST API.

***

## Environment Variable

Applications that use the **npm bridge**, such as **Claude Desktop**, should store the API key as an environment variable.

```json theme={null}
{
  "env": {
    "SERPTAG_API_KEY": "sk_live_your_key_here"
  }
}
```

The local bridge automatically sends your API key as a Bearer token when communicating with the hosted SERPtag MCP Server.

***

# Authentication Requirements

Every request is validated before data is returned.

| Requirement  | Details                                 |
| :----------- | :-------------------------------------- |
| API Key      | Must be valid and active                |
| Subscription | Active Agency or Enterprise plan        |
| Plan Size    | Supports 2,500 or more tracked keywords |

***

# Rate Limits

Each API key includes generous usage limits.

| Limit    | Value                       |
| :------- | :-------------------------- |
| Requests | **1,000 requests per hour** |

The rate limit is shared across both the **SERPtag MCP Server** and the **SERPtag REST API**.

***

# Security Best Practices

## ✅ Recommended

* Store API keys in environment variables
* Use a password manager to save your key
* Revoke and regenerate keys if they're ever exposed
* Only share keys with trusted team members

## ❌ Avoid

* Committing API keys to Git
* Posting keys in public repositories
* Sharing keys in emails or chat messages
* Embedding keys directly into websites or frontend applications

***

# Common Authentication Errors

| Error                                    | Solution                                                                               |
| :--------------------------------------- | :------------------------------------------------------------------------------------- |
| Missing API key                          | Add your API key using the Bearer header or `SERPTAG_API_KEY` environment variable.    |
| Invalid or inactive API key              | Generate a new API key from **Settings → API Keys** and update your MCP configuration. |
| MCP access requires Agency or Enterprise | Upgrade to a plan that includes 2,500 or more tracked keywords.                        |
| Subscription expired                     | Renew your SERPtag subscription before attempting to connect again.                    |

***

# OAuth Support

SERPtag currently authenticates using **API keys only**.

OAuth authentication is planned for a future release but is **not available today**.
