Connect Tavily to Vercel apps and agents with managed OAuth or API keys, then search through MCP, REST, or Eve.
Vercel Connect manages credentials for apps and agents that call Tavily’s MCP server or REST API. Use OAuth when each user connects their own Tavily account, or an API key for shared application access.Connect handles credentials; Eve runs agents; AI Gateway routes model requests. You can use Connect without either. For Tavily tools used directly in the AI SDK, see Vercel AI SDK.
Open Tavily on Vercel Connect, select Create Connector, and choose your team. Select MCP for agent tools or API for direct REST calls.
2
Configure authentication
For MCP OAuth, keep Managed, enter a name, and continue. Vercel manages the OAuth client. For the API connection, enter your key from the Tavily dashboard.
3
Create the connector
Leave the optional icon and colors as they are, or customize them. Select Create Connector, then Continue. Copy the connector’s UID for your code; the examples use tavily/your-connector-name as a placeholder.
Customization and completion screens
4
Link a project
In the connector’s Projects section, select Connect Project, choose your project, and enable Development for local testing. If it is already linked, check the enabled environments. A deployment is not required.
The Projects section of a Tavily connector; your connector name and UID will differ.
Select the same project you linked to the connector. vercel env pull creates .env.local with a development VERCEL_OIDC_TOKEN. Keep this file out of Git and refresh it with the same command if the token expires. See Vercel’s authentication guide.
Find three sources about a company’s product announcements, then use the results in a news feed, account brief, or research agent. Choose the example that matches your connector.
MCP with OAuth
REST with an API key
Eve agent
Save this as search.mjs. The first run prints an authorization link. Open it, sign in to Tavily, approve access, and rerun the script.
The response contains search results with titles, URLs, and content snippets. Creating a connector does not authorize a user: the grant belongs to the same user ID used in both calls. In an application, replace local-user with the signed-in user’s ID from your server-side session.To let a model choose and call tools, follow Vercel’s AI SDK and MCP guide.
Use the UID of an API connector configured with a Tavily key. Save this as search-rest.mjs:
Connect supplies the stored key at runtime. This app-scoped call uses the shared credential and does not prompt each user to authorize Tavily.
Eve is Vercel’s agent framework. Create an agent with Node.js 24 or newer, then connect a model through Eve’s /login flow:
npx eve@latest init tavily-agent
Exit the terminal UI and run these commands inside tavily-agent. Select a Vercel project when prompted. For this example, create an MCP API-key connector and enter your Tavily key at the CLI prompt:
Use Tavily to find three recent Stripe product announcements. Give each title, a one-sentence summary, the publication date if verified, and a source link.
This example shares one Tavily credential across the agent. For individual OAuth accounts, use an MCP OAuth connector and principalType: 'user' with an authenticated user principal. See Eve authorization with Connect.