> For the complete documentation index, see [llms.txt](https://docs.fuul.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fuul.xyz/fuul-mcp-server/quickstart.md).

# Quickstart

The Fuul MCP (Model Context Protocol) server lets you manage your Fuul programs directly from AI coding assistants like Claude Code. Once connected, your AI agent can query affiliate analytics, inspect incentive programs, manage payouts, and send conversion events.

{% hint style="info" %}
MCP is an open standard that lets AI assistants connect to external tools and APIs. The Fuul MCP server implements this protocol so any MCP-compatible client can interact with your Fuul account.
{% endhint %}

## What you can do

| Capability                  | Description                                                         |
| --------------------------- | ------------------------------------------------------------------- |
| Query projects & incentives | List programs, view and edit triggers, and review conversion setups |
| Affiliate analytics         | Get stats breakdowns by audience, tier, region, or status           |
| Manage payouts              | Review pending payouts and approve or reject in bulk                |
| Send events                 | Trigger custom conversion events for testing or automation          |
| Managed affiliates          | Create and update affiliate records programmatically                |

## Quickstart

This guide walks you through connecting the Fuul MCP server to Claude Code in three steps.

{% hint style="info" %}
These steps require [Claude Code](https://claude.ai/code) installed and running. The Fuul MCP server works with any MCP-compatible AI client, but the installation commands below are specific to Claude Code.
{% endhint %}

### 1. Add the marketplace

In Claude Code, add the Kuyen Labs marketplace — this is the registry that hosts the Fuul MCP plugin:

```
/plugin marketplace add kuyen-labs/mcp_server
```

### 2. Install the Fuul MCP plugin

Once the marketplace is added, install the plugin:

```
/plugin install fuul-mcp@fuul-mcp
```

### 3. Log in to your Fuul account

Run the login command from your terminal:

```bash
npx -y --package=@fuul/mcp-server@latest fuul-mcp login
```

When prompted for the API URL, enter:

```
https://api.fuul.xyz/
```

A browser window will open for OAuth authentication. Sign in with your Fuul account — the same credentials you use at [app.fuul.xyz](https://app.fuul.xyz).

{% hint style="success" %}
Once authenticated, your session token is stored at `~/.fuul/tokens.json` (Windows: `%USERPROFILE%\.fuul\tokens.json`). The MCP server reads this file automatically on every request — you only need to log in once.
{% endhint %}

### Verify the connection

Back in Claude Code, ask it to find your project:

> "Find my project called \[your project name]"

If the connection is working, Claude will return your project details directly from the Fuul API.

{% hint style="warning" %}
If you get a 401 error, your session may have expired. Re-run the login command from step 3 to refresh your token.
{% endhint %}
