Loomal

tavily-mcp MCP server in VS Code (GitHub Copilot) search tools for agent mode.

Copilot's agent mode in VS Code consumes MCP servers through mcp.json — with a proper secret-input mechanism so your Tavily key never sits in plaintext. Here's the full setup for tavily-mcp (2.1k stars).

VS Code's native MCP support feeds tools to Copilot's agent mode, and its config format differs from most other clients in two useful ways: the top-level key is servers (not mcpServers), and an inputs array lets VS Code prompt for secrets and store them outside the file. That second part matters here, because tavily-mcp needs a Tavily API key.

You can configure it per project in .vscode/mcp.json or globally via the Command Palette's MCP: Add Server flow, which writes to your user-level configuration. The project file is the better default if your team should share the setup.

Prerequisites

You need a recent VS Code with Copilot and agent mode enabled, Node.js installed (the server runs via npx), and a Tavily API key from tavily.com. If MCP is disabled in your organization's Copilot policy settings, the MCP view won't appear at all — worth checking before you debug config.

Create .vscode/mcp.json

Add this file to your project. The inputs block makes VS Code prompt for the key on first start and keep it in secret storage — so the file itself is safe to commit:

.vscode/mcp.json
{
  "inputs": [
    {
      "type": "promptString",
      "id": "tavily-api-key",
      "description": "Tavily API key (tvly-...)",
      "password": true
    }
  ],
  "servers": {
    "tavily-mcp": {
      "command": "npx",
      "args": ["-y", "tavily-mcp"],
      "env": {
        "TAVILY_API_KEY": "${input:tavily-api-key}"
      }
    }
  }
}

Start the server and pick the tools

VS Code doesn't auto-launch new servers. Open the mcp.json file and click the Start code-lens above the server entry (or use the MCP: List Servers command). The first start triggers the API-key prompt, then npx fetches tavily-mcp and the handshake completes.

In the Copilot Chat panel, switch to agent mode and open the tools picker — Tavily's search tools should be listed and checked. Ask something time-sensitive ("search for this month's VS Code release highlights") and approve the tool call when Copilot proposes it.

Troubleshooting in VS Code

Server won't start: run MCP: List Servers, select tavily-mcp, and choose Show Output — the dedicated output channel carries the server's stderr, which names the real problem (bad JSON, npx not found, npm registry trouble). Remember the top-level key is servers; pasting an mcpServers block from a Cursor or Claude Desktop guide silently does nothing.

Key prompt never appeared or you mistyped it: run MCP: Reset cached tools / clear the stored input and restart the server to be prompted again. Tools missing from the picker usually means agent mode is off or the server is stopped — both visible at a glance in the MCP view. A full window reload (Developer: Reload Window) is the blunt instrument that re-reads everything.

Where to compare alternatives

The server's live listing — tools included — is on Loomal at https://loomal.ai/marketplace/tavily-mcp. tavily-mcp is open source; the Tavily API behind it is metered under your key. Loomal's marketplace indexes the search category broadly, including x402-ready endpoints that charge per call (from $0.01) instead of per subscription, which agents can pay autonomously.

FAQ

How do I install tavily-mcp for GitHub Copilot in VS Code?

Create .vscode/mcp.json with a servers entry running npx -y tavily-mcp, plus an inputs block for the Tavily API key. Then click Start above the entry (or run MCP: List Servers) — VS Code prompts for the key and launches the server.

Why use the inputs block instead of pasting my key in env?

With ${input:...}, VS Code prompts once and stores the key in its secret storage, so .vscode/mcp.json contains no secret and can be committed for your team. A literal key in the file works but leaks the moment the file is shared.

Why does my mcpServers config do nothing in VS Code?

VS Code's format uses a top-level servers key, not mcpServers. Configs copied from Claude Desktop or Cursor guides fail silently. Rename the key and start the server from the MCP view.

Where are the logs when the server fails?

Run MCP: List Servers, select the server, and choose Show Output. That channel shows the spawn command and the server's stderr — npx errors, JSON problems, and API failures all land there.

More MCP servers for VS Code.

Every Loomal listing shows the live tool list before you add it to mcp.json.

Browse the marketplace