> ## Documentation Index
> Fetch the complete documentation index at: https://docs.octen.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Octen MCP Server

> Connect Octen to Claude, Cursor, and other MCP-compatible clients.

<p style={{ fontSize: "0.8rem", opacity: 0.6 }}>For AI agents: <a href="https://docs.octen.ai/integrations/octen-mcp-server.md">docs.octen.ai/integrations/octen-mcp-server.md</a></p>

Lets MCP-compatible assistants use Octen directly inside their workflow:

* `broad_search` — decompose one question into concurrent sub-queries for broad, multi-angle coverage
* `search` — search live web data with ranked results, highlights, filters, and optional full content
* `news_search` — search news results for current events, announcements, and timely reporting
* `image_search` — search the web for images by text or reference image (beta)
* `video_search` — search the web for videos by text query (beta)
* `extract` — fetch URLs as clean markdown or text

<CardGroup cols={3}>
  <Card title="Get API Key" icon="key" href="https://octen.ai/platform/api-keys">
    Create a key from the API Platform.
  </Card>

  <Card title="GitHub" icon="github" href="https://github.com/Octen-Team/octen-mcp">
    View source and contribute.
  </Card>

  <Card title="npm" icon="npm" href="https://www.npmjs.com/package/octen-mcp">
    Install the `octen-mcp` package.
  </Card>
</CardGroup>

## Why Octen MCP

<CardGroup cols={2}>
  <Card title="Fast" icon="bolt">
    Web search averages 62ms. Fast enough for multi-step MCP workflows.
  </Card>

  <Card title="Accurate" icon="bullseye">
    Powered by SOTA text and VL embedding models. Better sources, fewer hallucinations.
  </Card>

  <Card title="Fresh" icon="clock-rotate-left">
    Live web data with minute-level updates. Useful for news, prices, and fast-moving pages.
  </Card>

  <Card title="Efficient" icon="filter">
    Clean highlights, optional full\_content, and page labels keep model context relevant.
  </Card>
</CardGroup>

## Installation

<Note>
  You'll need an Octen API key first. Create one from the [API Platform](https://octen.ai/platform/api-keys).
</Note>

<Tabs>
  <Tab title="Claude Desktop">
    Add to `claude_desktop_config.json`:

    ```json theme={null}
    {
      "mcpServers": {
        "octen": {
          "command": "npx",
          "args": ["-y", "octen-mcp"],
          "env": {
            "OCTEN_API_KEY": "your-key-here"
          }
        }
      }
    }
    ```
  </Tab>

  <Tab title="Cursor">
    Add to `~/.cursor/mcp.json`:

    ```json theme={null}
    {
      "mcpServers": {
        "octen": {
          "command": "npx",
          "args": ["-y", "octen-mcp"],
          "env": {
            "OCTEN_API_KEY": "your-key-here"
          }
        }
      }
    }
    ```
  </Tab>

  <Tab title="VS Code">
    Install at the user level:

    [![Install in VS Code](https://img.shields.io/badge/Install%20in-VS%20Code-007ACC?logo=visualstudiocode\&logoColor=white)](https://vscode.dev/redirect/mcp/install?name=octen\&inputs=%5B%7B%22type%22%3A%22promptString%22%2C%22id%22%3A%22apiKey%22%2C%22description%22%3A%22Octen%20API%20Key%22%2C%22password%22%3Atrue%7D%5D\&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22octen-mcp%22%5D%2C%22env%22%3A%7B%22OCTEN_API_KEY%22%3A%22%24%7Binput%3AapiKey%7D%22%7D%7D)

    Or add to `.vscode/mcp.json`:

    ```json theme={null}
    {
      "servers": {
        "octen": {
          "command": "npx",
          "args": ["-y", "octen-mcp"],
          "env": {
            "OCTEN_API_KEY": "your-key-here"
          }
        }
      }
    }
    ```
  </Tab>

  <Tab title="Claude Code">
    ```bash theme={null}
    claude mcp add --scope user octen \
      -e OCTEN_API_KEY=your-key-here \
      -- npx -y octen-mcp
    ```
  </Tab>

  <Tab title="Other clients">
    Use the same `npx -y octen-mcp` command with `OCTEN_API_KEY` in your MCP client config.
  </Tab>
</Tabs>

## Tools

| Tool                  | Use for                                             | Returns                                                                  |
| --------------------- | --------------------------------------------------- | ------------------------------------------------------------------------ |
| `broad_search`        | Comparisons, surveys, multi-angle search            | Ranked results grouped per generated sub-query                           |
| `search`              | Search bars, answer engines, news and source lookup | Ranked pages with relevant `highlight` and optional `full_content`       |
| `news_search`         | Current events and timely reporting                 | Same as `search`, with `topic` fixed to `news`                           |
| `image_search` (beta) | Image lookup, visual references, design references  | Ranked images; `design` adds a style `summary` and `html_snippet`        |
| `video_search` (beta) | Video lookup, clip discovery, media previews        | Ranked videos with duration and cover                                    |
| `extract`             | Reading pages, cleaning articles                    | Clean content with optional highlights, `category`, and `page_structure` |

### Broad Search

Use `broad_search` for comparisons, surveys, and multi-angle research. It decomposes a query into related sub-queries from multiple angles, searches them concurrently. It supports:

* `max_queries`: 1-30 sub-queries (default 5) — raise for broader coverage
* all `search` options applied to every sub-query

```json theme={null}
{
  "query": "compare cloud GPU pricing across major providers",
  "max_queries": 5,
  "count": 10
}
```

### Web Search

Use `search` for live web retrieval. It supports:

* `topic`: `general` or `news`
* `count`: 1-100 results
* `include_domains` / `exclude_domains`
* `include_text` / `exclude_text`
* `time_basis`, `time_range`, `start_time`, and `end_time`
* `highlight` snippets or `full_content`
* `include_images`
* `format` (`text` or `markdown`) and `safesearch`

```json theme={null}
{
  "query": "latest AI agent benchmark results",
  "count": 5,
  "time_range": "week"
}
```

### News Search

Use `news_search` for current events, headlines, announcements, and time-sensitive reporting. It uses Octen Web Search with `topic` set to `news`.

Equivalent Search API request:

```json theme={null}
{
  "query": "Fed rate decision",
  "topic": "news",
  "count": 10,
  "time_range": "day"
}
```

### Image Search

*In beta — contact us for beta access.* Use `image_search` for image lookup, visual references, and design assets. It supports:

* `query` and optional `image_url` (reference image)
* `topic`: `general`, or `design` for UI design references
* `count`: 1-10 results
* `include_domains` / `exclude_domains`
* `time_range`, `start_time`, and `end_time`
* `safesearch` and `html_snippet`

```json theme={null}
{
  "query": "pricing comparison table, dark theme, SaaS",
  "topic": "design",
  "count": 5
}
```

### Video Search

*In beta — contact us for beta access.* Use `video_search` for video lookup, clip discovery, and media previews. It supports:

* `query`
* `count`: 1-10 results
* `time_range`, `start_time`, and `end_time`
* `safesearch`

```json theme={null}
{
  "query": "how to make espresso",
  "count": 5
}
```

### Extract

Use `extract` when the input is one or more URLs. It supports:

* `urls`: 1-20 URLs
* `query`: return ranked highlights from each page instead of the full body
* `max_age_seconds`: cache freshness control
* `format`: `markdown` or `text`
* `include_images`, `include_videos`, and `include_audio`

```json theme={null}
{
  "urls": [
    "https://docs.octen.ai/api-reference/search",
    "https://docs.octen.ai/api-reference/extract"
  ],
  "format": "markdown"
}
```

## Response shapes

Search returns a query and ranked result list:

```json theme={null}
{
  "code": 0,
  "msg": "success",
  "request_id": "req_abc123def456",
  "data": {
    "query": "latest AI agent benchmark results",
    "results": [
      {
        "title": "Example result",
        "url": "https://example.com/article",
        "highlight": "Query-relevant snippet...",
        "time_published": "2026-06-20T00:00:00Z",
        "time_last_crawled": "2026-06-23T08:30:05Z"
      }
    ]
  },
  "meta": {
    "usage": { "num_search_queries": 1, "full_content_tokens": 0 },
    "latency": 237
  }
}
```

Extract returns one result per URL:

```json theme={null}
{
  "code": 0,
  "msg": "success",
  "request_id": "req_abc123def456",
  "data": {
    "results": [
      {
        "url": "https://docs.octen.ai/api-reference/search",
        "status": "success",
        "title": "Search - Octen",
        "full_content": "Clean markdown or text content...",
        "time_last_crawled": "2026-04-21T08:30:05Z",
        "page_structure": { "primary": "Content Page", "secondary": "Article" },
        "category": { "primary": "Computers, Electronics & Technology", "secondary": "Artificial Intelligence" }
      }
    ]
  },
  "meta": {
    "usage": { "total_urls": 1, "successful_urls": 1 },
    "latency": 1832
  }
}
```

With `extract.query`, each successful URL returns `highlights` instead of `full_content`. Failed URLs return `status: "failed"` and an `error_message`; failed URLs are not billed.

## Configuration

| Variable        | Required | Default                |
| --------------- | -------- | ---------------------- |
| `OCTEN_API_KEY` | Yes      | -                      |
| `OCTEN_API_URL` | No       | `https://api.octen.ai` |
