# Zed

[Zed](https://zed.dev/) is a fast, collaborative code editor with native MCP support.

## Prerequisites

- Zed editor installed
- Scoped Probo OAuth token (see [Authentication](/docs/developers/api/mcp/authentication))
- Your Probo instance URL

## Endpoint

Choose the endpoint for your Probo environment:

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

The `/v1` segment is required.

## Configuration

### 1. Open Zed Settings

Open Zed settings by pressing `Cmd+,` (Mac) or `Ctrl+,` (Linux/Windows), or go to **Zed → Settings**.

### 2. Edit Configuration

Add the Probo MCP Server to your settings:

```json
{
  "context_servers": {
    "probo": {
      "settings": {
        "url": "https://your-probo-instance.com/api/mcp/v1",
        "headers": {
          "Authorization": "Bearer your_api_token_here"
        }
      }
    }
  }
}
```

### 3. Replace Placeholders

Update these values:

- `your-probo-instance.com` → Your Probo instance URL
- `your_api_token_here` → Your OAuth token from Probo

### 4. Restart Zed

Restart Zed to load the configuration.

## Usage

Once configured, you can use Probo tools through Zed's AI assistant:

**Example queries:**

```
"List all high-priority risks in my organization"
"Add a new third party called CloudBackup Inc"
"Show me all open nonconformities"
```

The assistant will automatically use the appropriate Probo MCP tools to fulfill your requests.

## Environment Variables

For security, use an environment variable for your OAuth token:

```json
{
  "context_servers": {
    "probo": {
      "settings": {
        "url": "https://your-probo-instance.com/api/mcp/v1",
        "headers": {
          "Authorization": "Bearer ${PROBO_API_TOKEN}"
        }
      }
    }
  }
}
```

Set the environment variable before launching Zed:

```bash
export PROBO_API_TOKEN="your_api_token_here"
zed
```

## Multiple Environments

Configure different Probo instances for development and production:

```json
{
  "context_servers": {
    "probo-dev": {
      "settings": {
        "url": "http://localhost:8080/api/mcp/v1",
        "headers": {
          "Authorization": "Bearer ${PROBO_DEV_TOKEN}"
        }
      }
    },
    "probo-prod": {
      "settings": {
        "url": "https://probo.company.com/api/mcp/v1",
        "headers": {
          "Authorization": "Bearer ${PROBO_PROD_TOKEN}"
        }
      }
    }
  }
}
```

## Troubleshooting

### Authentication Errors

**Problem:** 401 Unauthorized errors

**Solutions:**

1. Create a replacement OAuth token in Probo
2. Verify the token is correctly formatted as `Bearer your_token`
3. Check for extra spaces or newlines in the token
4. Ensure the token hasn't been revoked

### Connection Issues

**Problem:** Cannot connect to Probo server

**Solutions:**

1. Verify your Probo instance URL is correct
2. Check network connectivity
3. Ensure HTTPS is used for production instances
4. Verify firewall rules allow outbound connections

## Best Practices

- Use environment variables for OAuth tokens
- Create separate tokens for each environment
- Rotate tokens every 90 days
- Use HTTPS for production connections
- Monitor token usage in Probo settings

## Features

Zed with Probo MCP provides:

- Fast, responsive AI assistance
- Real-time compliance context during coding
- Collaborative editing with compliance awareness
- Native MCP integration without plugins
- Low-latency tool execution

## Learn More

- [Zed Documentation](https://zed.dev/docs)
- [Zed Context Servers](https://zed.dev/docs/assistant/context-servers)
- [Available Tools](/docs/developers/api/mcp/tools)
- [Pagination](/docs/developers/api/mcp/pagination)
