VS Code + PostNinja

Schedule Social Media Posts from VS Code

Use GitHub Copilot's agent mode to announce what you build. Add PostNinja as an MCP server and Copilot can write and schedule posts for every platform you've connected, prompting you for the API key once and storing it securely.

  • Connect once with an API key
  • Draft, schedule and publish by asking
  • 7 platforms: X, Instagram, TikTok, Facebook and more

Setup

How do I connect PostNinja to VS Code?

  1. 1

    Create an API key

    In PostNinja, go to Settings → API and create a key. It starts with pn_ and is shown once, so copy it somewhere safe.

  2. 2

    Add PostNinja to VS Code

    Add this to your workspace's .vscode/mcp.json, or run MCP: Open User Configuration to make it global. VS Code asks for the key the first time.

    .vscode/mcp.json or your user mcp.json

    .vscode/mcp.json
    {
      "inputs": [
        { "type": "promptString", "id": "postninja-key", "description": "PostNinja API key (pn_…)", "password": true }
      ],
      "servers": {
        "postninja": {
          "type": "http",
          "url": "https://postninja.app/api/mcp",
          "headers": { "Authorization": "Bearer ${input:postninja-key}" }
        }
      }
    }

    The top-level key is "servers" in VS Code, not "mcpServers".

  3. 3

    Just ask

    VS Code finds the PostNinja tools on its own. Try:

    • “Write a Facebook post about the bug we just fixed and schedule it for tomorrow morning.”
    • “Schedule a tweet when this PR's version ships: Friday at 10am.”
    • “What's on my posting calendar for the next 7 days?”

Tools

What can VS Code do with PostNinja?

Write and schedule

Drafts posts, gives each platform its own text, and schedules them for any date and time.

Threads and Stories

Builds multi-post X threads and posts photos or videos as Instagram Stories.

Check what's planned

Lists upcoming posts, drafts and what went out, with links to the live posts.

Fix and reschedule

Moves, edits or deletes drafts and scheduled posts when plans change.

Add images

Uploads images to attach to posts. Larger files and video go through the REST API.

Spot failures

Reads each account's status and error, so it can tell you what didn't go out and why.

One connection, seven platforms

Connect your accounts in PostNinja once. From then on VS Code can post to any of them, and PostNinja publishes at the time you set.

FAQ

VS Code and PostNinja questions

Is my key stored in the file?

No. With the input variable, VS Code prompts for the key on first start and keeps it in its secure storage, so mcp.json can be committed safely.

Does VS Code post without asking me?

That depends on VS Code's own settings; most ask before each tool call. If you'd rather review everything, ask it to save posts as drafts, then schedule them from the PostNinja calendar.

Is my API key safe?

PostNinja only stores a hash of each key and shows its first characters so you can tell keys apart. A key works for one workspace, and you can revoke it any time under Settings → API.

Which platforms can VS Code post to?

Every account you've connected: X, Instagram, Threads, Facebook Pages, TikTok, YouTube Shorts and Pinterest.

Do posts scheduled by an AI agent cost extra?

No. They're ordinary posts on your plan. As always, X posts use credits (10 each, 80 with a link) because X charges for every post; other platforms are unlimited.

Works with other AI agents too

Let VS Code run your social media.

Connect VS Code to PostNinja in a couple of minutes. Plans from $15 a month.