# MCP server

Read tools for AI assistants, with the same key and limits as the API.

## Connection

`POST /v1/mcp`

Stateless Streamable HTTP, with an `Authorization: Bearer` header. Keys, scopes, and limits are the same as the API. Only tool calls count toward the daily quota. Setup steps are in [AI assistants](https://docs.wefluence.app/en/guides/ai-assistants/).

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "list_content",
    "arguments": { "campaign_id": "abc123", "status": "approved", "limit": 20 }
  }
}
```
## Tools

Every tool only reads data. Tools outside the key's scopes are not listed.

| Tool | Scope | Contents |
| --- | --- | --- |
| `get_account` | Any | Account name, key scopes, and today's usage |
| `list_campaigns` | `campaigns:read` | Campaign list |
| `get_campaign` | `campaigns:read` | Campaign details |
| `get_campaign_stats` | `campaigns:read` | Content, views, and engagement summary |
| `get_top_content` | `content:read` | Content with the most views |
| `create_campaign_report` | `content:read` | Excel or CSV file, the assistant only receives a link |
| `list_content` | `content:read` | One campaign's content, page by page |
| `list_creators` | `content:read` | One campaign's creators |
| `list_invoices` | `finance:read` | Invoices |

## Keep conversations lean

An AI assistant pays for every row it reads. For large campaigns, `get_campaign_stats` and `get_top_content` are enough to answer questions, and `create_campaign_report` covers the full data. `list_content` fits best when you only need a few rows. `create_campaign_report` returns a [download link](https://docs.wefluence.app/en/reference/reports/) that anyone holding it can open, so don't paste it anywhere public.
