Coding agents and editors

Post to social media from VS Code and GitHub Copilot

Setup checked September 22, 2026Microsoft

GitHub Copilot in VS Code can use iHatePosting from a .vscode/mcp.json file that holds no secret: VS Code asks for your key the first time and keeps it in its secure storage, so the file is safe to commit alongside your code.

Set it up

  1. 1. Create an iHatePosting API key

    Sign in, open Settings → Developers and create a key. It starts with pk_live_ and is shown in full only once, so copy it before you leave the page.

  2. 2. Add iHatePosting to VS Code and GitHub Copilot

    Add to .vscode/mcp.json in your project root. VS Code asks for your key once and remembers it. In Chat, set the session target to Local. Your key does not go in this file.

    {
      "servers": {
        "ihateposting": {
          "type": "http",
          "url": "https://ihateposting.com/mcp",
          "headers": {
            "Authorization": "Bearer ${input:ihateposting-key}"
          }
        }
      },
      "inputs": [
        {
          "id": "ihateposting-key",
          "type": "promptString",
          "description": "iHatePosting API key (pk_live_…)",
          "password": true
        }
      ]
    }
  3. 3. Ask it to post

    Tell VS Code and GitHub Copilot what you want to say and where. It saves a draft in iHatePosting unless you ask for the post to go out now or at a set time.

What is different about VS Code and GitHub Copilot

  • VS Code's file uses servers as its top-level key, not mcpServers like most other editors — a block copied from a Cursor setup will not load here.
  • The key is asked for once per project, when the server first starts. Because the input is marked as a password, VS Code stores it encrypted, not as plain text, and never writes it into the file.
  • VS Code starts servers from .vscode/mcp.json only in a trusted folder. If the folder is open in Restricted Mode, VS Code first asks you to trust the workspace.
  • Set Chat's session target to Local. VS Code's own documentation says the Copilot session target can currently reach only local servers that need no authentication — and iHatePosting needs your key.
  • The Command Palette route works too: run MCP: Add Server..., choose HTTP (HTTP or Server-Sent Events), paste https://ihateposting.com/mcp as the URL, name it ihateposting, and pick Workspace. If VS Code first offers Add to Current Agent Session, choose Install Server Locally... instead. That route adds no key, so add the headers and inputs blocks from the snippet above to the file it opens, then restart the server.
  • If you close the key prompt without entering a key, VS Code still starts the server without a working key, and every tool fails with iHatePosting API 401. Run MCP: List Servers, pick ihateposting and choose Restart Server to be asked again.
  • To change a saved key, open .vscode/mcp.json, hover the ********** next to the input's id and choose Edit, or choose Clear and VS Code asks again on the next start.

Limits. Works on Copilot Free, Student, Pro, Pro+ and Max. On Copilot Business and Enterprise an admin must switch on the MCP servers in Copilot policy, which is off by default. An admin can also limit which servers are allowed, or make new chats use the Copilot target instead of Local, where this setup does not work.

Microsoft's own documentation: Add and manage MCP servers in VS Code

Nothing goes out unless you say so

Every post VS Code and GitHub Copilot writes is saved as a draft in iHatePosting unless you ask for it to be published now or at a set time. Publishing, rescheduling, retrying and deleting are marked as actions that change things, so clients that honour those markings ask you before they run them. Deleting a post in iHatePosting never removes one that is already live on a network.

Frequently asked questions

Is it safe to commit .vscode/mcp.json?

Yes. The file holds no key: VS Code asks for it the first time the server starts, stores it encrypted, and never writes it into the file.

Why won't a config copied from Cursor load?

VS Code's file uses servers as its top-level key, not mcpServers like most other editors.

Why can't Copilot use iHatePosting?

Set Chat's session target to Local. VS Code's documentation says the Copilot session target can currently reach only local servers that need no authentication, and iHatePosting needs your key. On Copilot Business and Enterprise an admin must also switch on MCP servers in Copilot policy.

How do I change the saved key?

Open .vscode/mcp.json, hover the ********** next to the input's id and choose Edit, or choose Clear and VS Code asks again the next time the server starts.

Ready to post everywhere from VS Code and GitHub Copilot?

Start your 90-day free trial — no credit card, about a minute to your first post.

Sign Up

Other AI agents

See every AI agent