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

# MCP

> Connect Keenable APIs as tools to clients that support MCP

The Keenable tools are also available as a Model Context Protocol server, so agents like Claude Code, Claude Desktop, Cursor, and Windsurf can call them directly.

## Installation

### Install via CLI

The easiest way to set up the Keenable MCP server for local coding agents is via the [Keenable CLI](/cli). Once you've installed the CLI, run the following to be guided through the MCP server setup

```shellscript theme={null}
keenable configure-mcp
```

### Claude Code

Add the Keenable MCP server with the Claude Code CLI:

```bash theme={null}
claude mcp add keenable \
  --transport http https://api.keenable.ai/mcp \
  --scope user \
  --header "X-API-Key: <YOUR_API_KEY>"
```

### Codex

Add the following to `~/.codex/config.toml`

```bash theme={null}
[mcp_servers.keenable]
url = "https://api.keenable.ai/mcp"
http_headers = { "X-API-Key" = "<YOUR_API_KEY>" }
```

### Other MCP clients

For Claude Desktop, Cursor, Windsurf, and similar:

```json theme={null}
{
  "mcpServers": {
    "keenable": {
      "url": "https://api.keenable.ai/mcp",
      "headers": {
        "X-API-Key": "<YOUR_API_KEY>"
      }
    }
  }
}
```

<Note>
  After adding the Keenable MCP, disable any built-in or third-party search/fetch tools (`WebSearch`, `WebFetch`, `brave_search`, `tavily_search`, etc.). Keenable tools replace them — leaving both active causes agents to pick inconsistently.
</Note>

### Stdio transport

For agents that don't support remote MCP connections, the server is available as an npm package that runs locally over stdio.

```json theme={null}
{
  "mcpServers": {
    "keenable": {
      "command": "npx",
      "args": ["-y", "@keenable/mcp-server"],
      "env": {
        "KEENABLE_API_KEY": "<YOUR_API_KEY>"
      }
    }
  }
}
```

### OAuth

The remote MCP server at `https://api.keenable.ai/mcp` supports the MCP OAuth authorization flow, so clients can authenticate without manually passing an API key. In practice, most MCP clients have unstable OAuth implementations, so we don't currently recommend this path. Use an API key instead.

## Available tools

Three tools are exposed by the MCP server, mirroring the REST endpoints.

### `search_web_pages`

Search the web and return ranked results with URLs, titles, and descriptions.

<ParamField body="query" type="string" required>
  The search query.
</ParamField>

### `fetch_page_content`

Fetch one or more URLs and extract content as clean markdown. Only URLs from the index are supported; this is not a general web scraper.

<ParamField body="urls" type="string[]" required>
  URLs to fetch (min 1). Unlike the REST [`/v1/fetch`](/api-reference/fetch) endpoint, this tool accepts an array so an agent can batch retrievals in a single tool call.
</ParamField>

Returns one block per URL with `url`, `title`, and `content` (markdown). See the [Fetch reference](/api-reference/fetch) for the per-URL response shape.

### `submit_search_feedback`

Submit per-URL relevance scores after a search to improve result quality over time. Same body shape as [`/v1/feedback`](/api-reference/feedback).
