> For the complete documentation index, see [llms.txt](https://docs.webz.io/llms.txt). Any docs page is also available as markdown at `https://docs.webz.io/markdown/<environment>/<slug>`.

# Forums Segmentation MCP

**Count** forum posts by forum, board, author, and more. One tool: `aggregate_webz_forums`.

## MCP endpoint

```text
https://seg-forums-mcp.webz.io/mcp
```

## How it works

Ask which forums or boards discuss a topic the most. The assistant calls `GET /seg_api/forums`. The MCP adds `site_type:discussions` to `q`.

## Connect your client

Replace `YOUR_WEBZ_TOKEN` with your token.

### Cursor

Add this to `~/.cursor/mcp.json` (`%USERPROFILE%\.cursor\mcp.json` on Windows) and restart Cursor:

```json
{
  "mcpServers": {
    "webz-seg-forums": {
      "url": "https://seg-forums-mcp.webz.io/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_WEBZ_TOKEN"
      }
    }
  }
}
```

Setup: `https://seg-forums-mcp.webz.io/`.

### Claude Desktop

Merge the same `webz-seg-forums` entry into your Claude Desktop config file - do not replace the whole file - then restart Claude Desktop:

| OS | Config file |
| --- | --- |
| macOS | `~/Library/Application Support/Claude/claude_desktop_config.json` |
| Linux | `~/.config/Claude/claude_desktop_config.json` |
| Windows | `%APPDATA%\Claude\claude_desktop_config.json` |

### Claude Code

Run in your project root:

```bash
claude mcp add --transport http webz-seg-forums https://seg-forums-mcp.webz.io/mcp --header "Authorization: Bearer YOUR_WEBZ_TOKEN"
```

### n8n

Add an **MCP Client Tool** node and connect it to an **AI Agent** node's **Tool** input:

| Field | Value |
| --- | --- |
| Endpoint | `https://seg-forums-mcp.webz.io/mcp` |
| Server Transport | `HTTP Streamable` |
| Authentication | `Bearer Auth` |
| Tools to Include | `All` |

Create a **Bearer Auth** credential and paste your Webz.io API token as the bearer token. The agent receives a `aggregate_webz_forums` tool.

### Claude.ai and ChatGPT (web)

Add `https://seg-forums-mcp.webz.io/mcp` as a custom connector (Claude.ai: Settings > Connectors; ChatGPT: Settings > Apps & Connectors with Developer mode on). Both use OAuth: leave Client ID and Secret empty, then paste your Webz token on the authorize page. Setup instructions for every client are at [seg-forums-mcp.webz.io](https://seg-forums-mcp.webz.io/).

> [!NOTE]
> Opening the `/mcp` endpoint in a browser returns `401 Unauthorized` by design - browsers do not send your token. Use an MCP client.

## End-to-end example

### 1. What you ask

> Which forums and boards talked the most about a product recall this week?

### 2. What the assistant calls

Tool: `aggregate_webz_forums`

| Argument | Value |
|----------|--------|
| `days` | `7` |
| `q` | `"product recall"` |
| `field` | `thread.site,thread.site_section` (default when omitted) |

### 3. What the MCP tool returns

```text
Query: product recall
Field: thread.site
Buckets: 45
- bitcointalk.org: 352
- reddit.com: 218
- mastodon.social: 117
- example-forum.net: 89

Query: product recall
Field: thread.site_section
Buckets: 100
- https://bitcointalk.org/index.php?board=1.0: 271
- https://www.reddit.com/r/technology: 144
- https://www.reddit.com/r/BuyItForLife: 62
```

### 4. What you see from the assistant

> In the past 7 days, **product recall** shows the highest discussion volume on bitcointalk.org and Reddit overall; board-level counts highlight specific subforums and subreddits (technology, BuyItForLife, etc.). These numbers are **post counts**, not thread text. I can fetch sample threads with the Forums search MCP if you want quotes and URLs.

## Tool parameters (simple view)

| Parameter | You usually say… | What the tool does |
|-----------|------------------|-------------------|
| `q` | topic, language | discussions query |
| `field` | "by forum", "by board" | aggregation field |
| `days` | "past week" | lookback, default 7 |
| `include_syndicated` | include wire copies | default false |
| `webz_reporter` | include Webz Reporter posts | default false. A tool argument, not part of `q` |

Person and company entity fields are not available on forums. Wait **0.4 seconds** between calls. Webz allows 3 requests per second per endpoint on your token through this server.

## Agent skill

A skill is a short instruction file your AI agent reads so it knows when to call this tool, how to fill its arguments and how to read the results, without being told each time. [Install the `webz-seg-forums` skill](https://docs.webz.io/docs/webz/skill-webz-seg-forums), or read what it tells the agent:

### When to use

- The user asks which forums, boards, authors, or countries discuss a topic the most.
- For the threads themselves, use `search_webz_discussions`.

### How to call

- `q`: required Boolean query. A space means AND. `AND`, `OR`, and `NOT` are uppercase. Quote phrases (`"product recall"`).
- `field`: what to count. Default `thread.site,thread.site_section` runs both, as two requests. One field is one credit.
- `days`: lookback. Default 7. Maximum 31.
- `from_offset`: next page of buckets. A response has at most 10 buckets, up to 100 total.
- `include_syndicated`: default false.
- `webz_reporter`: default false. Its own argument. A `webz_reporter:` clause inside `q` does not include those posts.

### Fields

- Forum and board: `thread.site` (the forum), `thread.site_section` (the board), `author`, `thread.country`, `language`, `rating`.

Forums have no person, company, location, or ticker extraction. `persons`, `organizations`, `topic`, `sentiment`, `category`, and `trust.*` are rejected here.

"Which forums and boards talked the most about a product recall this week" -> `q`: `"product recall"`, `field`: `thread.site,thread.site_section`, `days`: `7`.

### Using results

- Report the bucket name and its count. Say these are post counts, and name the query and the day window.
- Each comma-separated field is a separate call and costs 1 credit. Wait at least 0.4 seconds between calls. Do not call this tool in parallel.
- Ask for another page with the same `q`, `field`, and `days` plus the returned `from_offset` when the user wants more than the first 10 buckets.
- Zero buckets is a successful empty count. Retry once with a broader `q` or a different `field` before reporting that the topic has no counts.

## More detail

- [Segmentation API](https://docs.webz.io/docs/webz/news-blogs-forums-segmentation)
- [Forum filters](https://docs.webz.io/docs/webz/forums-api-filters)

