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

# VS Code

## Quick Install

```bash theme={null}
zenable install vscode
```

<Note>See the [CLI command reference](/integrations/zenable/commands#install) for more options.</Note>

**That's it! You're all set.** Restart VS Code and start using Zenable's conformance checking in your AI coding assistant.

This installs both the MCP server and VS Code Copilot agent hooks for real-time code checking. Hooks rely on VS Code's [Preview hooks API](https://code.visualstudio.com/docs/copilot/customization/hooks?utm_source=zenable_docs\&utm_medium=web), so the format may change in future releases.

***

<Accordion title="Advanced: Manual Configuration" icon="wrench">
  <Note>The below is a minimal example which may need to be merged with your existing configuration. Consider using the quick install command to handle this automatically.</Note>

  Place the following configuration:

  ```json theme={null}
  {
    "servers": {
      "zenable": {
        "type": "http",
        "url": "https://mcp.zenable.app/"
      }
    },
    "inputs": []
  }
  ```

  In one of these file locations:

  <CodeGroup>
    ```bash Project theme={null}
    .vscode/mcp.json
    ```

    ```bash Windows theme={null}
    %APPDATA%\Code\User\mcp.json
    ```

    ```bash Linux theme={null}
    ~/.config/Code/User/mcp.json
    ```

    ```bash macOS theme={null}
    ~/Library/Application Support/Code/User/mcp.json
    ```
  </CodeGroup>

  <Warning>We only recommend this manual approach if you can't use `zenable install`. Otherwise, `zenable install` is much safer and can handle configuration upgrades over time, handles merges with existing configs, performs backups and logging in case of issues, and more.</Warning>
</Accordion>

<Accordion title="Advanced: Manual Hook Configuration" icon="bolt">
  <Note>Hooks run automatically at session boundaries to check for conformance issues. The quick install command sets this up for you.</Note>

  VS Code's Copilot agent hooks are project-level only. Place the following in `.github/hooks/zenable.json`:

  ```json theme={null}
  {
    "hooks": {
      "UserPromptSubmit": [
        { "type": "command", "command": "zenable hook" }
      ],
      "Stop": [
        { "type": "command", "command": "zenable hook" }
      ],
      "PostToolUse": [
        { "type": "command", "command": "zenable hook" }
      ],
      "PreToolUse": [
        { "type": "command", "command": "zenable hook || true" }
      ]
    }
  }
  ```

  This uses [VS Code's Copilot agent hooks](https://code.visualstudio.com/docs/copilot/customization/hooks?utm_source=zenable_docs\&utm_medium=web) to run conformance checks. The `|| true` on `PreToolUse` keeps it non-blocking — Zenable hooks never deny tool calls.
</Accordion>
