> 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>`.

# Blogs Segmentation MCP

**Count** blog posts by site, author, and more. One tool: `aggregate_webz_blogs`.

## MCP endpoint

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

## How it works

Ask which blogs dominate a topic. The assistant calls `GET /seg_api/blogs`. The MCP adds `site_type:blogs` to `q` automatically.

## 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-blogs": {
      "url": "https://seg-blogs-mcp.webz.io/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_WEBZ_TOKEN"
      }
    }
  }
}
```

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

### Claude Desktop

Merge the same `webz-seg-blogs` 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-blogs https://seg-blogs-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-blogs-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_blogs` tool.

### Claude.ai and ChatGPT (web)

Add `https://seg-blogs-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-blogs-mcp.webz.io](https://seg-blogs-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 blogs wrote the most about bitcoin in the last week?

### 2. What the assistant calls

Tool: `aggregate_webz_blogs`

| Argument | Value |
|----------|--------|
| `days` | `7` |
| `q` | `bitcoin` |
| `field` | `thread.site` (default with `organizations` if `field` is empty) |

### 3. What the MCP tool returns

```text
Query: bitcoin
Field: thread.site
Buckets: 100
- biltehqeeq.com: 493
- panahon.tv: 398
- anmaraviation.com.au: 315
- alfa-pages.co.uk: 280
- example-crypto-blog.net: 201
Next page: call again with from_offset=10
```

### 4. What you see from the assistant

> Over the last 7 days, Webz counted blog posts mentioning **bitcoin**. The busiest sites in the top bucket list include biltehqeeq.com (493 posts in this window), panahon.tv (398), and several others. These are **post counts per blog**, not article text. Say if you want the actual posts from one site; I can use the Blogs search MCP with `site:domain`.

## Tool parameters (simple view)

| Parameter | You usually say… | What the tool does |
|-----------|------------------|-------------------|
| `q` | topic, language | blogs boolean query |
| `field` | "by blog", "by author" | aggregation field |
| `days` | time window | lookback days |
| `include_syndicated` | include wire copies | default false |
| `webz_reporter` | include Webz Reporter posts | default false. A tool argument, not part of `q` |

Wait **0.4 seconds** between tool calls on this server. 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-blogs` skill](https://docs.webz.io/docs/webz/skill-webz-seg-blogs), or read what it tells the agent:

### When to use

- The user asks which blogs, authors, or companies dominate a topic on blogs.
- For the posts themselves, use `search_webz_blogs`.

### How to call

- `q`: required Boolean query. A space means AND. `AND`, `OR`, and `NOT` are uppercase. Quote phrases.
- `field`: what to count. Default `thread.site,organizations` 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

- Blog and writer: `thread.site` (the blog), `author`, `thread.site_section`, `thread.country`, `language`.
- Entities: `persons`, `organizations`, `locations`, `trading_symbol.ticker`, `trading_symbol.exchange`. Sentiment splits use the `.positive`, `.negative`, and `.neutral` suffixes on `person` and `organization`.

`topic`, `sentiment`, `category`, `rating`, and `trust.*` exist on news only and are rejected here.

"Which blogs wrote the most about bitcoin this week" -> `q`: `bitcoin`, `field`: `thread.site`, `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)
- [Blog filters](https://docs.webz.io/docs/webz/blogs-api-filters)

