Skip to content
Connect an agent

Documentation

The social media API for apps and agents

Flung connects the social accounts of the people using your app and publishes their posts to X, LinkedIn, Instagram, Bluesky and more. Call it over REST, from TypeScript with the SDK, or let an agent use it through the hosted MCP server.

  • 28MCP tools
  • 67API operations across 48 paths

Connect your agent

Add the hosted server to your client once. You approve the agent in your browser and pick the workspace it may use, so there is nothing to install and no key to paste.

Run this once, then run /mcp in Claude Code, pick flung, and sign in when the browser opens.

sh
claude mcp add --transport http flung https://mcp.flung.dev/mcp-oauth

Any other client that speaks MCP over HTTP connects to the same address. A client that cannot sign in sends an API key to https://mcp.flung.dev/mcp instead.

Install the SDK

@flung.dev/sdk is the typed API client for your server, and @flung.dev/connect is the panel where people connect their accounts from your page. Your API key stays on your server.

sh
npm install @flung.dev/sdk @flung.dev/connect

Copy a prompt

Paste one into a connected agent and change the details to yours. Say what you want done, in plain words, and the agent chooses the tools.

  • Accounts that need you

    Which connected accounts must be reconnected now or soon, and a link to approve each one.

    Prompt
    Use Flung to find which of my social accounts need reconnecting this week, and give me the link to reconnect each one.
    Connect an AI agent
  • A post on several networks

    One post scheduled to several accounts at once, with the result on each.

    Prompt
    Use Flung to post "We're live" to X and Bluesky tomorrow at 9am my time, and tell me when it has published on both.
    Publish and schedule posts
  • The next good time to post

    When an audience usually reads, and the post scheduled for that slot.

    Prompt
    Use Flung to find when people on Instagram usually read my posts, and schedule this caption for the next good slot.
  • Replies to new comments

    The new comments and mentions, and a public reply to the ones you choose.

    Prompt
    Use Flung to show me the new comments on my posts since yesterday, and reply with a short thank you to the kind ones.

Read the docs as an agent

An agent can read these docs without a browser. Every page is also served as Markdown, and one index lists them all.

  • llms.txtAn index of every page, with a line on what it holds and its size in tokens. Start here.
  • /quick-start.mdOne page as plain Markdown. Add .md to the address of any page.
  • llms-full.txtThe text of every page in one file, for a search index.
How an agent reads these docs