Skip to content
SocialsForAI
Menu

Post to social media from Cursor

Post to LinkedIn, X and Bluesky from Cursor.

Add four lines to `.cursor/mcp.json`. Cursor's agent drafts from your code, dry runs, and publishes once you approve the tool call.

The short answer · Updated Nov 1, 2026

To post to social media from Cursor, add SocialsForAI's MCP server to .cursor/mcp.json (or ~/.cursor/mcp.json) with "url": "https://socialsforai.vercel.app/api/mcp" and an Authorization: Bearer header. Cursor connects over Streamable HTTP, and its agent gets tools to list accounts, dry run and publish posts, and read each account's result.

What Cursor is

Cursor's docs describe it as "a coding agent for building ambitious software." It supports MCP servers over stdio, SSE and Streamable HTTP, configured per project or globally, and asks for approval before running MCP tools by default.

As with Claude Code, posting from Cursor works best when the post is about the code in front of you: a changelog entry, a release, a demo GIF you already host somewhere.

mcp.json entry

Per Cursor's MCP docs, create .cursor/mcp.json in your project for project-only tools, or ~/.cursor/mcp.json in your home directory for every project. A remote server takes url and headers. Cursor resolves ${env:NAME} inside headers, so the key can come from your environment instead of the file:

If you commit .cursor/mcp.json, the ${env:SOCIALS_API_KEY} form keeps the key out of git; each teammate sets the variable. Cursor has to be started from an environment where the variable is set, or it resolves to nothing and the server returns 401.

json
{
  "mcpServers": {
    "socials": {
      "url": "https://socialsforai.vercel.app/api/mcp",
      "headers": { "Authorization": "Bearer ${env:SOCIALS_API_KEY}" }
    }
  }
}

The tools in Cursor's agent

Once Cursor connects to the server, its agent can choose among the eight socials tools based on your request. When it wants to call one, Cursor shows the call so you can expand it and read the arguments. The agent doesn't need you to name tools, but it helps to know that drafts go through create_post with dry_run: true and results come from get_post. Inputs for each tool are on the hub, under every tool and its inputs.

Three prompts to start with

Run these in Cursor's agent chat. Each lists the tools it will call.

  • "Summarize the changes on this branch as a short launch post for X and a longer one for LinkedIn. Dry run both and show me." Calls list_accounts and create_post with dry_run: true, using platform_options.x.text for the short version.
  • "Post this screenshot to Bluesky with alt text describing it: https://example.com/shot.png." Calls create_post with media: [{"url": "https://example.com/shot.png", "type": "image", "alt": "..."}]. The image must be at a public URL and under 2 MB for Bluesky.
  • "Why did the last post fail?" Calls list_posts with limit: 1, then get_post, and reads you each failed account's error.code and error.fix.

Posting screenshots from a branch

Cursor sessions tend to produce images: screenshots of a new screen, a chart from a test run. They have to be at a public URL first, because we download each one rather than accepting file uploads; a local path or a private host fails with invalid_media_url or media_fetch_failed. Each network then applies its own limits: 4 images on Bluesky (2 MB each) and X (5 MB each), 20 on LinkedIn (20 MB each).

If the agent attaches five screenshots to a Bluesky post, the dry run stops it before anything is uploaded. The fix tells the agent how many to drop. Ask it to pick the four that best show the change and to write alt text for each from what the code does.

text
// Five screenshots, one Bluesky account
create_post({ "accounts": ["acc_Bs2rTq8Lm5Wn1KdP"], "text": "New settings page",
              "media": [ { "url": "https://example.com/1.png", "alt": "..." }, ... 5 items ],
              "dry_run": true })
→ { "object": "preflight", "ok": false,
    "issues": [ { "platform": "bluesky", "severity": "error", "code": "too_many_media", "field": "media",
                  "message": "5 images; Bluesky allows 4.",
                  "fix": "Send at most 4 images to this account." } ], ... }

Tool approval and auto-run in Cursor

Cursor asks for approval before using MCP tools by default, and lets you expand the call to see its arguments. Keep create_post out of any auto-run allowlist. Its docs say allowlisted MCP tools in Auto-review mode run immediately. Read-only tools such as list_accounts and get_post are reasonable to allowlist if the prompts slow you down. What the server enforces regardless of Cursor's settings is listed under keeping a human in the loop.

Fixing Cursor connection problems

Cursor-specific problems are mostly about where the key comes from. Errors returned by a tool call have a code and fix, and every code is described in the troubleshooting reference.

  • The server shows an error in Cursor's MCP settings: usually SOCIALS_API_KEY wasn't set when Cursor started. Set it and restart Cursor, or put the key in ~/.cursor/mcp.json, which isn't committed.
  • It works on your machine but not a teammate's: the project file uses ${env:SOCIALS_API_KEY} and their environment doesn't have it. Each person needs their own variable, or their own key in the global file.
  • The agent posts without asking: create_post is on an allowlist and Auto-review mode ran it. Remove it from the list.

Set up Cursor in four steps

  1. 01

    Set SOCIALS_API_KEY

    Create a workspace at /signup and put the sk_ key in SOCIALS_API_KEY in the environment Cursor starts from.

  2. 02

    Add the server to mcp.json

    In .cursor/mcp.json or ~/.cursor/mcp.json, add a socials entry with url https://socialsforai.vercel.app/api/mcp and headers {"Authorization": "Bearer ${env:SOCIALS_API_KEY}"}.

  3. 03

    Check Cursor's MCP settings

    The socials server should show without an error. If it shows one, the variable probably wasn't set when Cursor launched.

  4. 04

    Connect an account from agent chat

    Ask the agent to connect Bluesky. It returns a link; open it, use an app password, then ask the agent to dry run a first post.

Questions

What developers ask

Should I use .cursor/mcp.json or ~/.cursor/mcp.json?

Use the global file if you post from many projects. Use the project file with ${env:SOCIALS_API_KEY} if your team shares the setup through git.

Does Cursor support remote MCP servers with headers?

Yes. Cursor's docs list Streamable HTTP and show remote servers configured with url and headers.

Can Cursor's agent post without asking me?

Only if you allowlist the tool. By default Cursor asks before each MCP tool call.

Can I post images from Cursor?

Yes, from a public URL: up to 4 on X and Bluesky, up to 20 on LinkedIn. Video isn't supported yet.

Is X live?

Yes. X posting is live on the hosted server, along with Bluesky, LinkedIn, Mastodon and Telegram.

Get an API key and send your first post in five minutes.