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

# Scalekit

> Connect AI agents to Tavily's MCP server through Scalekit AgentKit.

## Overview

[Scalekit's Tavily MCP connector](https://docs.scalekit.com/agentkit/connectors/tavilymcp/) gives agents access to Tavily through AgentKit. Users authorize their Tavily accounts with OAuth, and Scalekit manages token storage and refresh for subsequent tool calls.

## Prerequisites

* A [Scalekit account](https://app.scalekit.com/).
* A [Tavily account](https://app.tavily.com/) to authorize access.

## Set up the connection

In the Scalekit dashboard, open **AgentKit > Connections**, click **Add connection**, and select **Tavily MCP**. Use Scalekit's provided OAuth credentials to get started without registering your own OAuth app.

Name the connection `tavilymcp` and save it. If you choose another name, use that value for `connection_name` in the example below. See [Scalekit's connection setup guide](https://docs.scalekit.com/agentkit/connections/) for configuration details.

## Install and configure the SDK

```bash theme={null}
pip install scalekit-sdk-python python-dotenv
```

Copy your Scalekit credentials from **Developers > API Credentials** into a local `.env` file:

```bash .env theme={null}
SCALEKIT_ENVIRONMENT_URL=your-environment-url
SCALEKIT_CLIENT_ID=your-client-id
SCALEKIT_CLIENT_SECRET=your-client-secret
```

## Authorize a user and search

Save this example as `quickstart.py`. Replace `user_123` with your application's user identifier. Run the script, open the printed link, and complete Tavily authorization before returning to the terminal.

```python quickstart.py theme={null}
import os

from dotenv import load_dotenv
from scalekit import ScalekitClient

load_dotenv()

client = ScalekitClient(
    env_url=os.environ["SCALEKIT_ENVIRONMENT_URL"],
    client_id=os.environ["SCALEKIT_CLIENT_ID"],
    client_secret=os.environ["SCALEKIT_CLIENT_SECRET"],
)
actions = client.actions
connection_name = "tavilymcp"
identifier = "user_123"

account = actions.get_or_create_connected_account(
    connection_name=connection_name,
    identifier=identifier,
).connected_account

if account.status != "ACTIVE":
    authorization = actions.get_authorization_link(
        connection_name=connection_name,
        identifier=identifier,
    )
    print("Open this link to connect Tavily:", authorization.link)
    input("Press Enter when authorization is complete: ")

    account = actions.get_or_create_connected_account(
        connection_name=connection_name,
        identifier=identifier,
    ).connected_account
    if account.status != "ACTIVE":
        raise SystemExit("Tavily authorization is incomplete. Finish it and rerun.")

result = actions.execute_tool(
    connection_name=connection_name,
    identifier=identifier,
    tool_name="tavilymcp_tavily_search",
    tool_input={"query": "What is retrieval-augmented generation?"},
)
print(result.data)
```

```bash theme={null}
python quickstart.py
```

This example checks that the connected account is `ACTIVE` before calling Tavily. For application redirects, account statuses, and production user verification, follow [Scalekit's user authorization guide](https://docs.scalekit.com/agentkit/tools/authorize/).

## Available tools

Use these names with `execute_tool`:

| Tool | Purpose |
| - | - |
| `tavilymcp_tavily_search` | Find web results with source URLs. |
| `tavilymcp_tavily_extract` | Retrieve content from specific URLs. |
| `tavilymcp_tavily_crawl` | Collect content across a website. |
| `tavilymcp_tavily_map` | Discover a website's URLs. |
| `tavilymcp_tavily_research` | Research a topic across sources. |

## Resources

* [Scalekit Tavily MCP connector documentation](https://docs.scalekit.com/agentkit/connectors/tavilymcp/): Tool parameters and Python and Node.js examples.
* [Tavily MCP documentation](/documentation/mcp)
