Skip to main content
Glama
yanjin734-ltsm

tavily-pool-mcp

README.md
# tavily-pool-mcp

A local Model Context Protocol server that exposes a Tavily search tool and rotates across multiple Tavily API keys.

## Features

- Exposes `tavily_search` as an MCP tool
- Rotates across multiple Tavily API keys
- Retries with another key on `401`, `403`, or `429`
- Works with OpenCode and other MCP-compatible clients

## Requirements

- Node.js 18+
- Tavily API keys

## Install

```bash
npm install
```

## Configuration

Set `TAVILY_API_KEYS` as a space, comma, or semicolon separated list:

```bash
export TAVILY_API_KEYS="tvly-dev-key-1 tvly-dev-key-2 tvly-dev-key-3"
```

On Windows PowerShell:

```powershell
$env:TAVILY_API_KEYS="tvly-dev-key-1 tvly-dev-key-2 tvly-dev-key-3"
```

## Run

```bash
npm start
```

`npm start` starts a stdio MCP server, so the terminal will wait for MCP input. This is expected.

## OpenCode Config

Add this to your OpenCode `opencode.json`:

```json
{
  "mcp": {
    "tavily-pool": {
      "type": "local",
      "enabled": true,
      "command": ["node", "C:/path/to/tavily-pool-mcp/src/index.mjs"],
      "environment": {
        "TAVILY_API_KEYS": "{env:TAVILY_API_KEYS}"
      }
    }
  }
}
```

## Tool

### `tavily_search`

Arguments:

- `query`: search query
- `max_results`: 1-20, default 5
- `search_depth`: `basic` or `advanced`, default `basic`
- `include_answer`: boolean, default false
- `include_raw_content`: boolean, default false

## Security

Do not commit real API keys. Use environment variables or a secret manager.

## License

MIT

TDQS

B3.4/5.0

Scored across 1 tool

Disambiguation5/5

Only one tool exists, so there is no possibility of confusion or overlap.

Naming Consistency5/5

The single tool follows a clear verb_noun pattern (tavily_search), which is consistent and predictable.

Tool Count3/5

One tool is on the low end but reasonable for a focused search service; it is borderline but not inappropriate.

Completeness5/5

The search tool fully covers the server's purpose of web search; no obvious missing operations.

Maintenance

ActivityInactive
ResponsivenessNo issues