# MCP Server

Connect your AI client - Cursor, Claude, ChatGPT, or n8n - to Webz.io News Search. The client gets a `news_search_by_webz` tool and can search global news by itself.

```
https://news-search-mcp.webz.io/mcp
```

## Step 1: Get your API token

Don't have an account? [Sign up for free](https://app.webz.io/login/signup) to get your API token.

Log in at [webz.io](https://webz.io) and copy the API token from your dashboard. It is the same token you use for the News Search API.

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

### Claude Desktop

Merge the same `webz-news-search` 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-news-search https://news-search-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://news-search-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. For the community node, standalone workflows, and ready-made templates, see the [n8n integration](news-search-api-n8n).

### Claude.ai and ChatGPT (web)

Add `https://news-search-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. Full step-by-step walkthroughs: [news-search-mcp.webz.io](https://news-search-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.

## Step 3: Try it

Ask your AI client naturally - mentioning "news" or "Webz" helps it pick the tool:

- "Search Webz news for recent developments on EU AI regulation and summarize with sources."
- "Use the Webz news tool to find coverage of trade agreements between Israel and Greece from the past week."
- "Call news_search_by_webz for 'renewable energy investments' with k=10 and days=30, then summarize."

## Tool reference

`news_search_by_webz`

| Parameter | Default | Description |
| --- | --- | --- |
| query | required | Natural-language topic or question |
| k | 10 | Articles to return (1-50) |
| days | 7 | How many days back to search |
| allow_all_dates | false | Search the full coverage window instead of `days` |
| score_gte | 4 | Minimum match score, 0-10 (set 0 to disable the floor) |
| score_lte | - | Maximum match score, 0-10 |
| domain | - | Only these source domains, e.g. cnn.com, yahoo.com |
| exclude_domain | - | Skip these source domains; a domain cannot be in both lists |
| language, country, sentiment, category | - | Same values as [Filters](news-search-api-filters); country codes are ISO-2 uppercase (US, GB) |
| topic | - | Topic tags (case-insensitive) |
| person, organization, location | - | Entity names (case-insensitive) |
| ticker | - | Stock ticker symbols, e.g. AAPL (case-insensitive) |
| political_bias | - | Source political bias: left, center, right |
| domain_rank_gte, domain_rank_lte | - | Source domain rank range (integers) |
| allow_multiple_chunks_per_article | false | When true, return more than one relevant chunk from the same article |

Each result returns the article title, URL, publish date, matching text excerpt, and metadata (`topic`, `person`, `organization`, `location`, `ticker`, `political_bias`, `domain_rank`).

Every tool call runs a regular News Search request with your token - the same credits and rate limits apply. See [Errors, Rate Limits & Credits](news-search-api-errors-limits).

## Keep your token safe

> [!WARNING]
> Never commit your token to git or put it in a URL.

Set it once as an environment variable and reference it from the config:

```json
"Authorization": "Bearer ${env:WEBZ_API_TOKEN}"
```

## Next steps

- Use [Framework SDKs](news-search-api-framework-sdks): [LangChain](news-search-api-langchain), [LlamaIndex](news-search-api-llamaindex), or n8n.
- Add the [Agent Skill](news-search-api-skill) so your agent knows when and how to search
- Review [Filters](news-search-api-filters) for all filter values

