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

# MCP Server

> Connect AI assistants like Claude, Cursor, and VS Code to manage your Partnero program using natural language.

Partnero's MCP (Model Context Protocol) server lets you manage your affiliate or referral program directly from AI assistants. Instead of navigating the dashboard, you can use natural language commands to manage partners, customers, transactions, and more.

<Note>
  MCP is an open standard that enables AI assistants to securely interact with external tools and data sources. Learn more at [modelcontextprotocol.io](https://modelcontextprotocol.io).
</Note>

## Supported AI Tools

* **Claude Desktop** — Anthropic's desktop application
* **Cursor** — AI-powered code editor
* **VS Code** — With MCP extension
* **Claude Code CLI** — Command-line interface

## What You Can Do

Once connected, your AI assistant can manage your entire Partnero program:

<CardGroup cols={2}>
  <Card title="Partners" icon="users">
    List, search, create, update, archive, and restore partners
  </Card>

  <Card title="Customers" icon="user">
    Manage customers, view transactions and stats
  </Card>

  <Card title="Transactions" icon="credit-card">
    List, create, and manage transactions (triggers commissions)
  </Card>

  <Card title="Leads" icon="bullseye">
    List, manage, convert, or reject leads
  </Card>

  <Card title="Rewards" icon="gift">
    View rewards and balances
  </Card>

  <Card title="Program" icon="chart-line">
    Access program overview and settings
  </Card>
</CardGroup>

## Setup

<Steps>
  <Step title="Get Your API Key">
    1. Log in to [Partnero](https://app.partnero.com)
    2. Go to **Integration** → **MCP**
    3. Generate and copy your API key

    <Warning>
      Keep your API key secure—it provides full access to your program data.
    </Warning>
  </Step>

  <Step title="Configure Your AI Tool">
    Choose your AI tool and add the configuration below. Replace `YOUR_API_KEY` with your actual API key.

    <Tabs>
      <Tab title="Claude Desktop">
        Add to your Claude Desktop configuration file:

        **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
        **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`

        ```json theme={null}
        {
          "mcpServers": {
            "partnero": {
              "command": "npx",
              "args": [
                "mcp-remote",
                "https://api.partnero.com/mcp",
                "--header",
                "Authorization: Bearer YOUR_API_KEY"
              ]
            }
          }
        }
        ```
      </Tab>

      <Tab title="Cursor">
        Add to your Cursor MCP settings (`.cursor/mcp.json` in your project or global settings):

        ```json theme={null}
        {
          "mcpServers": {
            "partnero": {
              "command": "npx",
              "args": [
                "mcp-remote",
                "https://api.partnero.com/mcp",
                "--header",
                "Authorization: Bearer YOUR_API_KEY"
              ]
            }
          }
        }
        ```
      </Tab>

      <Tab title="VS Code">
        Add to your VS Code MCP settings:

        ```json theme={null}
        {
          "mcpServers": {
            "partnero": {
              "command": "npx",
              "args": [
                "mcp-remote",
                "https://api.partnero.com/mcp",
                "--header",
                "Authorization: Bearer YOUR_API_KEY"
              ]
            }
          }
        }
        ```
      </Tab>

      <Tab title="Claude Code CLI">
        Run the following command:

        ```bash theme={null}
        claude mcp add partnero -- npx mcp-remote https://api.partnero.com/mcp --header "Authorization: Bearer YOUR_API_KEY"
        ```
      </Tab>
    </Tabs>
  </Step>

  <Step title="Restart Your AI Tool">
    Close and reopen your AI application for the changes to take effect.
  </Step>
</Steps>

## Example Prompts

Once connected, you can interact with Partnero using natural language:

<AccordionGroup>
  <Accordion title="Partner Management">
    * "Show me my top 10 partners by performance"
    * "Create a new partner with email [jane@example.com](mailto:jane@example.com)"
    * "Search for partners named John"
    * "Archive partner partner\_abc"
  </Accordion>

  <Accordion title="Customer Management">
    * "How many customers were referred this month?"
    * "Create a customer for [user@example.com](mailto:user@example.com) and link them to partner partner\_abc"
    * "Get details for customer cust\_123"
  </Accordion>

  <Accordion title="Transactions">
    * "Get transaction history for customer cust\_123"
    * "What's the total pending commission amount?"
    * "Show me all transactions from last week"
  </Accordion>

  <Accordion title="Program Overview">
    * "Give me an overview of my program"
    * "What are my current commission rates?"
    * "Show me program statistics"
  </Accordion>
</AccordionGroup>

## Rate Limits

| Resource        | Limit               |
| --------------- | ------------------- |
| Tool calls      | 360 requests/minute |
| SSE connections | 5 per IP/minute     |

If you hit rate limits, wait a minute before retrying or batch your requests.

## Troubleshooting

<AccordionGroup>
  <Accordion title="401 Unauthorized">
    * Verify your API key is correct
    * Check that the Authorization header is properly formatted: `Bearer YOUR_API_KEY`
    * Regenerate your API key from the Partnero dashboard
  </Accordion>

  <Accordion title="Tool Not Appearing">
    * Restart your AI application completely
    * Verify the MCP configuration file is in the correct location
    * Check for JSON syntax errors in your configuration
  </Accordion>

  <Accordion title="429 Too Many Requests">
    * Wait 60 seconds before making more requests
    * Reduce request frequency
    * Batch multiple operations into single requests when possible
  </Accordion>

  <Accordion title="Connection Issues">
    * Ensure Node.js 18+ is installed: `node --version`
    * Check your internet connection
    * Verify the MCP endpoint URL is correct: `https://api.partnero.com/mcp`
  </Accordion>
</AccordionGroup>

## Next Steps

<CardGroup cols={2}>
  <Card title="API Reference" icon="code" href="/api-reference/introduction">
    Explore the full REST API for programmatic access
  </Card>

  <Card title="AI Prompts" icon="robot" href="/guides/ai-integration">
    Copy-paste prompts for AI coding assistants
  </Card>
</CardGroup>
