VS Code + Knowi MCP Setup

Connect Visual Studio Code to Knowi's MCP server using GitHub Copilot's MCP support. Once connected, you can query data, manage dashboards, and interact with Knowi from VS Code's Copilot chat.

Prerequisites

  • VS Code 1.99+ with GitHub Copilot extension
  • Knowi account with AI Agents enabled

Option A: OAuth Browser Auth (Recommended)

The easiest way to connect ? no token copy/paste needed.

User Settings (available in all projects)

  1. Open the Command Palette (Cmd+Shift+P / Ctrl+Shift+P).
  2. Search for MCP: Add Server.
  3. Select HTTP as the server type.
  4. Enter the URL: https://www.knowi.com/api/2.0/mcp
  5. Enter a name: knowi
  6. Save. The first time Copilot uses the connection, VS Code will open your browser to sign in and authorize access.

Or add directly to your settings.json:

"mcp": {
  "servers": {
    "knowi": {
      "type": "http",
      "url": "https://www.knowi.com/api/2.0/mcp"
    }
  }
}

Workspace Settings (per project)

Create or edit .vscode/mcp.json in your project root:

{
  "servers": {
    "knowi": {
      "type": "http",
      "url": "https://www.knowi.com/api/2.0/mcp"
    }
  }
}

Instance URL: Use the URL that matches your Knowi deployment:

  • Knowi Cloud (default): https://www.knowi.com
  • EU Cloud: https://eu.knowi.com
  • On-Premise: Your on-premise Knowi URL (e.g. https://knowi.yourcompany.com)

Option B: Manual Token

If you prefer to manage the token manually:

  1. Log into Knowi. Navigate to Settings > AI Settings.
  2. Under MCP Token, select a token expiry and click Generate Token. Copy the token.
  3. Add to your VS Code settings.json:

    "mcp": {
      "servers": {
        "knowi": {
          "type": "http",
          "url": "https://www.knowi.com/api/2.0/mcp",
          "headers": {
            "Authorization": "Bearer YOUR_MCP_TOKEN"
          }
        }
      }
    }
    

    Or in .vscode/mcp.json:

    {
      "servers": {
        "knowi": {
          "type": "http",
          "url": "https://www.knowi.com/api/2.0/mcp",
          "headers": {
            "Authorization": "Bearer YOUR_MCP_TOKEN"
          }
        }
      }
    }
    

Verify

  1. Open the Command Palette and search for MCP: List Servers.
  2. Confirm knowi shows as connected.
  3. Open Copilot Chat (Cmd+Shift+I / Ctrl+Shift+I) and switch to Agent mode.
  4. Ask: "What Knowi tools are available?"

Usage

In Copilot Agent mode, interact with Knowi using natural language:

"Show me my Knowi dashboards"
"Ask Knowi: what is the average order value this quarter?"
"Get data from Knowi widget 12345"

VS Code will prompt you to approve tool calls before they execute.

Troubleshooting

Server not showing as connected

  1. Reload the window (Cmd+Shift+P > Developer: Reload Window).
  2. Check that the Knowi instance is reachable: curl https://www.knowi.com/api/2.0/mcp/health
  3. Verify your token: curl -H "Authorization: Bearer YOUR_MCP_TOKEN" https://www.knowi.com/api/2.0/mcp/tools

Tools not appearing in Copilot

Make sure you are in Agent mode (not Ask or Edit mode). MCP tools only work in Agent mode.

Token expired

Generate a new token from Settings > AI Settings > MCP Token, then update the token in your settings and reload the window.

For full tool documentation, see MCP Server.