# Connect other AI tools to Onsite

> Set up Onsite in VS Code, Windsurf, Zed, JetBrains, Gemini CLI, OpenCode or any tool that supports remote MCP servers.

Onsite works with any AI tool that can add a remote MCP server. Pick your tool below. If it isn't listed, use **Any other tool**.

## Before you start

- An Onsite account on a team with an active plan.
- The server URL: `https://onsite.so/mcp`

Most tools sign in to Onsite in your browser. Windsurf and JetBrains use a token instead: create one in [**Settings › MCP**](https://onsite.so/settings/mcp) under **Connected apps and tokens**, or pick the tool there and select **Copy config with key**, which creates a token and puts it in the config for you.

## Set up your tool

<Tabs>
  <Tab title="VS Code">
    <Steps>
      <Step title="Install Onsite">
        In Onsite, open [**Settings › MCP**](https://onsite.so/settings/mcp), choose **VS Code**, and select **Add to VS Code**. VS Code opens and asks you to confirm.

        Or add this to `.vscode/mcp.json` in your project:

        ```json
        {
          "servers": {
            "onsite": {
              "type": "http",
              "url": "https://onsite.so/mcp"
            }
          }
        }
        ```
      </Step>
      <Step title="Sign in">
        When VS Code asks, sign in to Onsite, pick your team and select **Allow**.
      </Step>
    </Steps>
  </Tab>
  <Tab title="Windsurf">
    <Steps>
      <Step title="Open the MCP config file">
        In Cascade, select **⋯ › MCPs › Open MCP config file**.
      </Step>
      <Step title="Paste the config">
        Add Onsite to `mcp_config.json`, with your token in place of `<your-onsite-token>`:

        ```json
        {
          "mcpServers": {
            "onsite": {
              "serverUrl": "https://onsite.so/mcp",
              "headers": { "Authorization": "Bearer <your-onsite-token>" }
            }
          }
        }
        ```
      </Step>
      <Step title="Reload">
        Save the file, then refresh Windsurf's MCP servers.
      </Step>
    </Steps>
  </Tab>
  <Tab title="Zed">
    <Steps>
      <Step title="Add Onsite to your settings">
        Open `~/.config/zed/settings.json` and add:

        ```json
        {
          "context_servers": {
            "onsite": {
              "url": "https://onsite.so/mcp"
            }
          }
        }
        ```
      </Step>
      <Step title="Sign in">
        When Zed asks, sign in to Onsite, pick your team and select **Allow**.
      </Step>
    </Steps>
  </Tab>
  <Tab title="JetBrains">
    <Steps>
      <Step title="Open the MCP settings">
        In your JetBrains IDE, go to **Settings › Tools › AI Assistant › Model Context Protocol (MCP)** and select **Add**.
      </Step>
      <Step title="Paste the config">
        Choose JSON and paste this, with your token in place of `<your-onsite-token>`:

        ```json
        {
          "mcpServers": {
            "onsite": {
              "url": "https://onsite.so/mcp",
              "headers": { "Authorization": "Bearer <your-onsite-token>" }
            }
          }
        }
        ```
      </Step>
      <Step title="Apply">
        Save the settings. AI Assistant picks up Onsite in new chats.
      </Step>
    </Steps>
  </Tab>
  <Tab title="Gemini CLI">
    <Steps>
      <Step title="Add the server">
        In a terminal, run:

        ```bash
        gemini mcp add --transport http onsite https://onsite.so/mcp
        ```
      </Step>
      <Step title="Sign in">
        Start Gemini CLI and run `/mcp auth onsite`. Sign in to Onsite, pick your team and select **Allow**.
      </Step>
    </Steps>
  </Tab>
  <Tab title="OpenCode">
    <Steps>
      <Step title="Add Onsite to your config">
        Open `~/.config/opencode/opencode.json` and add:

        ```json
        {
          "mcp": {
            "onsite": {
              "type": "remote",
              "url": "https://onsite.so/mcp",
              "enabled": true
            }
          }
        }
        ```
      </Step>
      <Step title="Sign in">
        In a terminal, run `opencode mcp auth onsite`. Sign in to Onsite, pick your team and select **Allow**.
      </Step>
    </Steps>
  </Tab>
  <Tab title="Any other tool">
    Add a remote MCP server with these settings:

    | Setting | Value |
    | --- | --- |
    | Server URL | `https://onsite.so/mcp` |
    | Transport | Streamable HTTP |
    | Sign-in | OAuth |

    Your tool opens Onsite to sign in. If it can't sign in with OAuth, send a token in a header instead:

    ```text
    Authorization: Bearer <your-onsite-token>
    ```
  </Tab>
</Tabs>

## Check it worked

Open a new chat in your tool and ask:

<Prompt>
  Using Onsite, show me the sites I can access.
</Prompt>

## Keep your token safe

A token lasts 90 days and works like a password for your Onsite data on that team.

- Don't share it or commit it to a shared repository. Prefer a config file in your home folder over one inside a project.
- Give each tool its own token, named after the tool, so you can revoke one without affecting the others.
- Revoke it in **Settings › MCP** when you stop using the tool.

## If something goes wrong

<AccordionGroup>
  <Accordion title="The tool says it isn't authorized">
    Sign in again from the tool. If you use a token, check that it's copied in full after `Bearer `, and that it isn't expired or revoked in **Settings › MCP**.
  </Accordion>
  <Accordion title="The tool only offers commands or STDIO servers">
    Your tool can't add remote servers yet. Check for an update, or use one of the tools above.
  </Accordion>
  <Accordion title="Onsite's tools don't appear">
    Most tools load servers when they start or when a new chat opens. Reload the tool's MCP servers or start a new chat.
  </Accordion>
</AccordionGroup>

## Related

<CardGroup cols={2}>
  <Card title="What you can ask" icon="lightbulb" href="/mcp/ask">
    Example questions to try next.
  </Card>
  <Card title="Troubleshooting" icon="wrench" href="/mcp/troubleshooting">
    Fixes for the most common connection problems.
  </Card>
</CardGroup>
