Prompt
Using docs/blog/2025-community-meetup.md, write an Instagram caption announcing the meetup recap: 2 short paragraphs, thank the 3 speakers by name, and end with the link-in-bio line. Upload docs/blog/img/meetup-group.jpg with alt text and create the Instagram draft. How to do it
- Connect Instagram and mint a key In https://app.socialhandoff.com, open Connections, connect an Instagram professional account (Business or Creator). Then create an agent key named VS Code scoped to Instagram with draft and schedule permission.
- Declare the server for Copilot Add .vscode/mcp.json with a servers entry of type http, the URL https://app.socialhandoff.com/mcp, and a password input for the key. Start the server, then switch Copilot Chat to agent mode.
- Attach media from the workspace VS Code calls attach_media for the JPEG image, Reel, or carousel (up to 10 items): a public url, or the file as base64 data (up to 8 MB) with its mime type and alt text. Larger files go to POST https://app.socialhandoff.com/v1/media as multipart. The ids go into draft_post as mediaIds.
- Ask for the draft In Copilot Chat, choose Agent and give it the prompt. Confirm each tool call as Copilot asks for it.
- Review and approve Check the caption, hashtag count, and alt text on the approval card. On approval, the post publishes; if Instagram's daily quota is full, it is deferred by an hour.
Example draft
Thank you to everyone who came to the spring meetup. 60 people, 3 talks, and more questions than we had time for. Special thanks to Priya, Marcus, and Lena for sharing what they built. Slides and recordings are up now. Recap and links in bio. #meetup #developers #community [Image: meetup-group.jpg, group photo of attendees, alt text: "About 60 people smiling in a meetup room"]
Gotchas
- Instagram refuses text-only posts. A draft can be saved as text first, but approving or scheduling it is refused with a clear error until an image or video is attached.
- Copilot only calls MCP tools in agent mode. In ask or edit mode it will describe the post but never call draft_post.
- Images must be JPEG (up to 8 MB). A PNG screenshot is not accepted, so convert it before upload.
- Account type: Professional accounts only (Business or Creator). Personal accounts cannot publish through the API.
- Media: Every post needs an image or video. Text-only posts are not possible on Instagram.
- Image files: JPEG only, up to 8 MB. Convert PNG or WebP before posting.
- Reels: Video posts publish as Reels, from MP4 or MOV files.
Frequently asked questions
Can I post a carousel to Instagram this way?
Yes. Attach 2 to 10 images or videos and the post publishes as a carousel. Single images take alt text; set it when you upload with the alt field.
Why does VS Code use servers instead of mcpServers?
That is the VS Code format. Its mcp.json uses a servers key and supports inputs, so the key is prompted once and stored securely.
What happens if I hit Instagram's daily limit?
The daily publishing quota is checked before each post. If it is full, the post is deferred by an hour instead of failing.