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

> ## Agent Instructions
> PostQueen's hosted API is https://api.postqueen.ai. The public API base is https://api.postqueen.ai/public/v1 and takes the raw API key in the Authorization header, with no Bearer prefix.
> The MCP server for posting is https://api.postqueen.ai/mcp/YOUR_API_KEY (or /mcp with Authorization: Bearer YOUR_API_KEY). docs.postqueen.ai/mcp only searches these docs and cannot post.
> The API key is under Connections > API Keys in the app, and only workspace admins can see it.

# VS Code

> Add PostQueen to VS Code as an MCP server, then ask GitHub Copilot in agent mode to write, schedule and check your posts.

export const AgentStatus = ({status, label, children}) => {
  const look = ({
    tested: {
      color: 'green',
      icon: 'badge-check'
    },
    'partly-tested': {
      color: 'green',
      icon: 'badge-check'
    },
    'vendor-docs': {
      color: 'surface',
      icon: 'book-open'
    },
    'not-possible': {
      color: 'gray',
      icon: 'circle-slash'
    }
  })[status] || ({
    color: 'gray',
    icon: 'circle-question-mark'
  });
  const cut = status === 'partly-tested' ? -1 : (label || '').indexOf(', ');
  const rest = cut > 0 ? label.slice(cut + 2) : '';
  const pill = status === 'partly-tested' ? 'Partly tested' : cut > 0 ? label.slice(0, cut) : label;
  const note = status === 'partly-tested' ? label : cut > 0 ? rest.charAt(0).toUpperCase() + rest.slice(1) + '.' : null;
  return <div className="pq-status not-prose" data-status={status}>
      <Badge color={look.color} shape="pill" size="md" icon={look.icon}>{pill}</Badge>
      {note || children ? <span className="pq-status-note">
          {note}
          {note && children ? ' ' : null}
          {children}
        </span> : null}
    </div>;
};

<AgentStatus status="vendor-docs" label="From the vendor's docs, not tested by PostQueen yet" />

VS Code is Microsoft's code editor, and GitHub Copilot's agent mode in it uses MCP servers. Add PostQueen once and Copilot can write posts about your work, schedule them and report how your published posts did.

## Before you start

* **Plans:** you need GitHub Copilot. Copilot Free, Pro, Pro+ and Max are not restricted. On Copilot Business and Enterprise, the **MCP servers in Copilot** policy must be on, and it is off by default.
* **Platforms:** VS Code 1.99 or later on macOS, Windows and Linux.
* **A PostQueen API key.** A workspace admin copies it, or the ready-made address, from **Connections**.

<Info>
  **Where the API key is:** in the app, open **Connections > API Keys**. Only a workspace Admin or Super Admin can reveal or rotate it; other members see it masked. A workspace has one key, and each agent card on **Connections** shows your MCP address with the key already filled in.
</Info>

## Connect VS Code

<Steps>
  <Step title="Add the server">
    Open the Command Palette and run **MCP: Add Server**. Choose **HTTP (HTTP or Server-Sent Events)**, enter your key address as the server URL, enter `postqueen` as the server ID, and pick **Global** or **Workspace**:

    ```text wrap theme={"system"}
    https://api.postqueen.ai/mcp/YOUR_API_KEY
    ```
  </Step>

  <Step title="Start it">
    VS Code asks you to confirm that you trust the server. Confirm, then open Copilot Chat in agent mode.
  </Step>
</Steps>

<Accordion title="Prefer to edit mcp.json yourself?" icon="file-code">
  Open `.vscode/mcp.json` in the project, or run **MCP: Open User Configuration** for every workspace, and add:

  ```json .vscode/mcp.json theme={"system"}
  {
    "servers": {
      "postqueen": {
        "type": "http",
        "url": "https://api.postqueen.ai/mcp/YOUR_API_KEY"
      }
    }
  }
  ```
</Accordion>

## Check that it works

In Copilot Chat, in agent mode, ask: "List my PostQueen channels." Copilot calls PostQueen and answers with the channels you connected.

## Good to know

* **VS Code uses `"servers"`, not `"mcpServers"`,** and `"type"` must be `"http"`. A block copied from Cursor does not work here.
* **The file holds your key** when you use the key address. Keep a workspace `.vscode/mcp.json` out of version control, or use an input variable below.
* **Copilot can add the entry for you** in agent mode, if you allow it to edit `.vscode/mcp.json`.
* **Ask for drafts when you want to check first.** A draft waits on your PostQueen calendar, and nothing publishes until you schedule it.
* **What it cannot do over MCP:** delete a post, or change a post's text or time. Do that on the calendar in the app. [The MCP tools](/mcp/tools) lists what it can do.

## Other ways to connect

| Way                                      | Address                                      | Status                                 |
| ---------------------------------------- | -------------------------------------------- | -------------------------------------- |
| The key in the address                   | `https://api.postqueen.ai/mcp/YOUR_API_KEY`  | From Microsoft's docs. The route above |
| The Bearer header from an input variable | `https://api.postqueen.ai/mcp`               | From Microsoft's docs                  |
| Sign in with PostQueen                   | `https://api.postqueen.ai/mcp-oauth-dynamic` | Not tested yet                         |

<Tabs>
  <Tab title="Input variable">
    VS Code recommends input variables for secrets. It prompts you for the key instead of reading it from the file, so the file holds no secret:

    ```json .vscode/mcp.json theme={"system"}
    {
      "inputs": [
        {
          "type": "promptString",
          "id": "postqueen-key",
          "description": "PostQueen API key",
          "password": true
        }
      ],
      "servers": {
        "postqueen": {
          "type": "http",
          "url": "https://api.postqueen.ai/mcp",
          "headers": {
            "Authorization": "Bearer ${input:postqueen-key}"
          }
        }
      }
    }
    ```
  </Tab>

  <Tab title="Sign in (not tested yet)">
    Use `https://api.postqueen.ai/mcp-oauth-dynamic` as the URL, with no headers. VS Code registers itself and opens the PostQueen sign-in, which a workspace admin approves.

    The sign-in address has 20 tools, all but `ask_postqueen`. Revoke access in PostQueen under **Connections > Approved Apps**.
  </Tab>
</Tabs>

## Try this first

```text wrap theme={"system"}
List my PostQueen channels. Then write a short Bluesky post about the feature in this branch and save it as a draft for tomorrow at 9am.
```

The draft appears on your PostQueen calendar, ready for you to check and schedule. [Prompts to try](/mcp/examples) has more.

## Troubleshooting

| Symptom                                         | Fix                                                                                                 |
| ----------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| Copilot does not list PostQueen                 | Run **MCP: List Servers** and check that PostQueen is running. Make sure you are in agent mode.     |
| The server does not start                       | Check that the file uses `"servers"` and `"type": "http"`, not `"mcpServers"`.                      |
| On Business or Enterprise, MCP is not available | Ask your GitHub admin to turn on the **MCP servers in Copilot** policy.                             |
| The key is refused                              | Copy it again from **Connections > API Keys**. Only a workspace Admin or Super Admin can reveal it. |

More fixes are on [Troubleshooting agents](/agents/troubleshooting).

## Next steps

<CardGroup cols={2}>
  <Card title="Every agent" icon="bot" href="/agents/overview">
    Which agents can post to PostQueen, how each one connects, and what PostQueen has tested.
  </Card>

  <Card title="The MCP tools" icon="wrench" href="/mcp/tools">
    What each of the 21 tools does, and what an agent cannot do.
  </Card>

  <Card title="Prompts and tool calls" icon="messages-square" href="/mcp/examples">
    The order an agent calls the tools in, with prompts that work.
  </Card>

  <Card title="Troubleshooting agents" icon="life-buoy" href="/agents/troubleshooting">
    What to do when a connection or a command fails.
  </Card>
</CardGroup>
