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

# VS Code

> Connect TryPost to VS Code's native MCP support in Copilot Chat

Visual Studio Code supports MCP servers natively (Copilot Chat in agent mode, plus any MCP-compatible extension). You can connect TryPost in a few clicks.

## Prerequisites

* VS Code 1.101 or later (earlier versions don't support OAuth for remote MCP servers)
* GitHub Copilot extension (or another MCP-compatible extension)
* A TryPost Cloud account with an active trial or subscription ([start a 7-day free trial](/knowledge-base/plans-and-billing))

## Setup

<Steps>
  <Step title="Create the MCP configuration file">
    In your project root, create or edit `.vscode/mcp.json`:

    ```json theme={null}
    {
      "servers": {
        "trypost": {
          "type": "http",
          "url": "https://app.trypost.it/mcp/trypost"
        }
      }
    }
    ```

    No `Authorization` header — VS Code discovers OAuth from the URL.
  </Step>

  <Step title="Reload VS Code">
    Reload the window so VS Code picks up the new configuration.
  </Step>

  <Step title="Sign in through your browser">
    Open the **Accounts** menu (bottom-left gear) or the Copilot Chat panel — VS Code prompts you to sign in to TryPost. Approve in the browser and the server flips to **Connected**.
  </Step>

  <Step title="Verify the connection">
    Open Copilot Chat in agent mode and ask:

    ```
    List all my TryPost social accounts
    ```
  </Step>
</Steps>

<Tip>
  VS Code uses `"servers"` as the top-level key (not `"mcpServers"`). This is different from most other MCP clients.
</Tip>

## Global configuration

To make TryPost available across all projects, open the command palette and run **MCP: Open User Configuration** to add the server to your user-level settings.

<Accordion title="Bearer token fallback">
  For sandboxed or remote workspaces where the OAuth callback can't return to VS Code, set a Personal Access Token explicitly:

  ```json theme={null}
  {
    "servers": {
      "trypost": {
        "type": "http",
        "url": "https://app.trypost.it/mcp/trypost",
        "headers": {
          "Authorization": "Bearer YOUR_API_KEY"
        }
      }
    }
  }
  ```

  Create the key from **Settings > API Keys** on the [TryPost dashboard](https://app.trypost.it).
</Accordion>
