How to do it
- 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.
- 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.
- 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.
- Start the server Click Start above the server entry in mcp.json, or run MCP: List Servers. Enter the key when prompted.
- 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.