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

# VS Code

> Connect VS Code (GitHub Copilot) to the OnePerfectSlice remote MCP server over HTTP with OAuth.

VS Code connects to the hosted OnePerfectSlice server through **GitHub Copilot's** MCP support. Nothing to install beyond Copilot.

<Note>
  MCP servers are used by Copilot's **Agent mode** in the Chat view. Make sure GitHub Copilot is installed and you're signed in.
</Note>

## Connect

<Steps>
  <Step title="Add the server">
    Open the Command Palette (`Cmd/Ctrl+Shift+P`) and run **MCP: Add Server**. Choose **HTTP** and enter:

    * **URL:** `https://mcp.oneperfectslice.ai/mcp`
    * **Name:** `ops`

    This writes an entry to your `mcp.json` (workspace `.vscode/mcp.json` or your user profile):

    ```json theme={null}
    {
      "servers": {
        "ops": {
          "type": "http",
          "url": "https://mcp.oneperfectslice.ai/mcp"
        }
      }
    }
    ```
  </Step>

  <Step title="Authenticate">
    Start the server when prompted (or run **MCP: List Servers → ops → Start**). VS Code opens a browser for OAuth — log in to OnePerfectSlice and **select the team** whose data this connection should access. Approve the authorization back in VS Code if asked.
  </Step>

  <Step title="Verify">
    Run **MCP: List Servers** and confirm `ops` is running with its tools available. In the Chat view, open the tools picker (Agent mode) and check that the `ops` tools appear.
  </Step>
</Steps>

## Test it

In the Chat view (Agent mode), try:

```
Use ops to list available slices
```

You should see a `list_slices` tool call and get back your team's slices.

## Troubleshooting

| Problem                       | Solution                                                                   |
| ----------------------------- | -------------------------------------------------------------------------- |
| `ops` not in tools picker     | Run **MCP: List Servers**, start `ops`, and ensure you're in Agent mode    |
| Authorization didn't complete | Restart `ops` from **MCP: List Servers** and finish login + team selection |
| Wrong team's data             | Remove `ops` from `mcp.json`, re-add it, and select a different team       |
| Server won't start            | Confirm the URL and that `type` is `http` in `mcp.json`                    |

## Switching teams

Each connection is scoped to one team. To switch, remove and re-add the `ops` server, then select the new team during sign-in.
