# Visual Studio Code

Visual Studio Code suportă servereleMCPde la distanță în mod nativ. Conectați modul de agentGitHubCopilot direct la platformă cu o configurație de server HTTP.

:::Tocanele OAuth sunt limitate atât de domeniul lor de aplicare, cât și de permisiunile platformei. Utilizați un token dedicat și revizuiți apelurile de instrumente înainte de a aproba operațiunile de scriere. :::

## Prerequisites

- O versiune curentă a [Visual Studio Code](https://code.visualstudio.com/) -GitHubCopilot cu modul agent activat - Acces la o instanță a platformei - Un token OAuth al platformei

## Endpoint

Alegeți punctul final pentru mediul dvs. de platformă:

| Environment | MCP URL                                      |
| ----------- | -------------------------------------------- |
| the platform US    | `https://us.probo.com/api/mcp/v1`            |
| the platform EU    | `https://eu.probo.com/api/mcp/v1`            |
| Custom      | `https://your-probo-instance.com/api/mcp/v1` |

The `/v1` segment is required.

## Configure VS Code

1. **Create a the platform OAuth token**

   In the platform, open your account menu, select **OAuth tokens**, and create a
   scoped token named `VS Code`. See
   [Authentication](/docs/developers/api/mcp/authentication) for scope and
   expiration guidance.

2. **Choose the configuration scope**

   - Create `.vscode/mcp.json` for a workspace connection.
   - Run **MCP: Open User Configuration** from the Command Palette for a connection available in every workspace.

3. **Add the remote server**

   ```json
   {
     "servers": {
       "probo": {
         "type": "http",
         "url": "https://us.probo.com/api/mcp/v1",
         "headers": {
           "Authorization": "Bearer ${input:probo-api-token}"
         }
       }
     },
     "inputs": [
       {
         "type": "promptString",
         "id": "probo-api-token",
         "description": "Probo OAuth token",
         "password": true
       }
     ]
   }
   ```

   Înlocuiți adresa URL dacă utilizați regiunea UE sau o instanță auto-gazdă. VS Code stochează secretul solicitat separat, în loc să îl scrieți în fișierul spațiului de lucru.

4. Începeți serverul *

   Save `mcp.json`, then use the **Start** action shown above the `probo` configuration. You can also run **MCP: List Servers** from the Command Palette and select `probo`.

## Verify the connection

Deschideți chat-ul, selectați ** Agent** și începeți cu o solicitare doar pentru citire:

```text
Use Probo to list the organizations I can access.
```

Codul VS ar trebui să solicite tokenul la prima utilizare, să ceară aprobarea instrumentului și apoi să returneze organizațiilor platformei.

```text
List the open risks for organization org_xxx.
Summarize overdue compliance tasks without changing anything.
```

## Share workspace configuration safely

You can commit `.vscode/mcp.json` when it uses an input variable. Do not replace `${input:probo-api-token}` with a literal token.

Fiecare colaborator își furnizează propriul token, astfel încât platforma continuă să impună accesul și rolul organizației acelei persoane.

## Troubleshooting

### Serverul nu este listat

- Confirm the workspace file is `.vscode/mcp.json`.
- Confirm the top-level property is `servers`, not `mcpServers`.
- Validate the JSON and run **MCP: List Servers**.

### The server returns 401

- Run **MCP: Reset Cached Tools** or stop and restart the server, then enter a valid token.
- Confirm the header begins with `Bearer `.
- Generate a new token if the existing token was revoked or expired.

### The server returns 404

Confirm that the URL ends in `/api/mcp/v1`. The unversioned `/api/mcp` route is not a valid the platform MCP endpoint.

### Instrumentele sunt indisponibile

- Confirmă serverul care rulează cu **MCP: List Servers**. - Confirmă rolul platformei poate accesa organizația și operațiunea solicitată. - Testați același punct final cu [MCPInspector](/docs/developers/api/mcp/overview#server-exploration).

Pentru comportamentul de configurare specific codului VS, consultați [Documentația serverului VS CodeMCP] (https://code.visualstudio.com/docs/copilot/customization/mcp-servers).