MCP (streamable HTTP)

Draft social posts from Copilot agent mode in VS Code

VS Code supports MCP servers in GitHub Copilot's agent mode. Add SocialHandoff in .vscode/mcp.json, let VS Code prompt for your agent key, and Copilot can draft posts that wait in your approval inbox.

How to do it

  1. Create an agent key In https://app.socialhandoff.com, open Connections, create an agent called VS Code, and grant draft on the networks you want.
  2. Add .vscode/mcp.json Create the file in your workspace, or run MCP: Add Server from the Command Palette and choose HTTP. Note that VS Code uses a servers key, not mcpServers.
  3. Use an input for the key The snippet below declares a password input, so VS Code asks for the key once and stores it securely instead of saving it in the file.
  4. Start the server Click Start above the server entry in mcp.json, or run MCP: List Servers. Enter the key when prompted.
  5. Switch Copilot Chat to agent mode Open Copilot Chat, choose Agent, and check the tools picker lists the SocialHandoff tools. Then ask for a draft.
{
  "inputs": [
    {
      "type": "promptString",
      "id": "social-agent-key",
      "description": "Agent key",
      "password": true
    }
  ],
  "servers": {
    "social": {
      "type": "http",
      "url": "https://app.socialhandoff.com/mcp",
      "headers": {
        "Authorization": "Bearer ${input:social-agent-key}"
      }
    }
  }
}

Why the input variable matters

.vscode/mcp.json is meant to be committed so your whole team gets the same servers. The inputs block keeps that safe: the file holds only a reference, and each person enters their own agent key the first time the server starts. VS Code stores the value in its secret storage. Each teammate has a separate key, so the audit log shows who drafted each post.

What you can ask Copilot

In agent mode Copilot picks tools on its own, and asks before running ones that change data. Examples:

  • "Read the release notes in docs/releases/2.1.md and draft a LinkedIn post and an X thread. Draft only."
  • "Use the social tools to list pending posts and tell me which ones mention features not in this branch."
  • "Plan next week's posts for Bluesky and Mastodon from the open milestones, then show the calendar."
  • "Get brand memory and rewrite my pending X draft to match the voice rules."

You can also type # in the chat to reference a specific tool, which helps when several MCP servers are enabled at once.

Permissions

Copilot asks for confirmation before each tool call unless you allow it for the session or workspace. Keep confirmation on for schedule_post. On the SocialHandoff side, the key starts draft-only; promotion to auto-publish is per network and recorded in the audit log.

Settings to know

  • chat.mcp.access (or the matching setting in your VS Code version) can be restricted by an organization policy. If servers do not start, ask your admin.
  • A user-level MCP configuration is available through the MCP: Open User Configuration command if you want the server outside one workspace.
  • VS Code can discover servers from other tools' configs; turn that off if you see duplicates.

Troubleshooting

  • Server fails to start: open the Output panel, choose the MCP server log, and read the error.
  • 401: the input was entered wrong. Run MCP: Reset Cached Inputs and try again.
  • No agent mode: update VS Code and the GitHub Copilot Chat extension.
  • Draft rejected with 422: a guardrail such as per-network length matched.

Network guides: VS Code for X, VS Code for LinkedIn, VS Code for Bluesky, VS Code for Mastodon, and VS Code for Threads.

Frequently asked questions

Why does VS Code use servers instead of mcpServers?
It is VS Code's own format for .vscode/mcp.json. The rest of the entry, a type of http, a url, and headers, works the same way as in other clients.
Do I need GitHub Copilot to use SocialHandoff in VS Code?
MCP tools in VS Code are used through Copilot Chat in agent mode, so you need access to Copilot. Other extensions, such as Cline, bring their own MCP support.
Is it safe to commit .vscode/mcp.json?
Yes, when the key comes from a promptString input as in the snippet. Never paste a raw key into a committed file.

Let your agents post. Keep the final say.

Connect your first agent in minutes. Every draft waits in your inbox until you approve it.

14 days free. No card required.

The hosted version is opening soon

Leave your email and we will send one message when hosted accounts open, with your 14-day trial ready. Want it today? Self-host it free from the repo.

Start free trial