Connect Cursor to Threadgehog

Cursor can read your Threadgehog projects, draft and edit posts, approve them and send the queue, right from your editor. Connect it once in Settings, Agents, and Threadgehog opens a private server on this Mac that only an agent with your token can reach. Cursor is a separate tool with its own Cursor plan; when it asks Threadgehog to write or generate something, that still runs through the AI and image provider you set up in Threadgehog's own Settings.

How to set up Cursor

  1. Open Settings, Agents

    In Threadgehog, press Cmd+, (or Threadgehog menu, Settings), then click the Agents tab. It sits right after Publishing.

  2. Turn on agents

    Switch on "Allow agents on this Mac to use Threadgehog". This starts a private server on this Mac only, at 127.0.0.1. Agents can read your projects, write and edit drafts, approve posts and send the queue. They use the same AI provider, image provider and scheduler as the buttons in the app; nothing else leaves your Mac. The line under it adds that your agent can also answer questions about Threadgehog, using the help built into this version and your app's live status.

    Settings, Agents tab, with Allow agents on this Mac to use Threadgehog turned on
  3. Copy the address and token

    With agents on, the tab shows Address (http://127.0.0.1:47331/mcp, or another port if 47331 is taken) and a masked Token. You need these only for the optional Direct (HTTP) setup; the snippet in the next step reads them itself. Regenerate issues a new token if you ever need one; a Direct (HTTP) connection will need the new value.

    The Address and the hidden Token, each with a Copy button, and Regenerate
  4. Connect an agent

    Under "Connect an agent", pick Cursor from the list. Threadgehog fills in a ready-made snippet that starts the threadgehog command (no token goes in your config), plus a Copy button and a Setup guide link to this page. Threadgehog must stay open while Cursor uses it.

    Connect an agent with Cursor picked, showing the setup to copy
  5. Save the Cursor config

    Save this as .cursor/mcp.json in a project folder to connect it there, or as ~/.cursor/mcp.json to make it available in every project.

    {
      "mcpServers": {
        "threadgehog": {
          "command": "/usr/local/bin/threadgehog",
          "args": ["mcp-stdio"]
        }
      }
    }
  6. Confirm it's connected

    Open Customize in Cursor's sidebar. threadgehog should be listed there with an on/off toggle. If it fails, open the Output panel (Cmd+Shift+U) and pick MCP Logs from the dropdown.

  7. Optional: install the threadgehog command

    Still in Settings, Agents, click "Install the threadgehog command". It asks for your Mac password once and creates /usr/local/bin/threadgehog. If you'd rather run it yourself, click Copy fallback for the exact command for your Mac. Once installed, threadgehog status checks the connection, threadgehog mcp prints the address, header and the Claude Code, Codex and Cursor snippets, and threadgehog help answers a question from the help built into the app.

    sudo mkdir -p /usr/local/bin && sudo ln -sf "<helper path>" /usr/local/bin/threadgehog
    threadgehog status
    threadgehog mcp
    threadgehog help how do I connect Buffer
    The Install the threadgehog command button with Installed next to it

What you get

  • List your projects and their publishing settings
  • Check your writing plan and how much capacity is left
  • List posts waiting for approval in a project
  • List posts waiting in the publishing queue, for one project or all of them
  • Get one post by ID to see its full text and status
  • Generate new draft post ideas for a project
  • Write post text from a prompt without saving it, so you can review it first
  • Save text you already wrote as a new draft
  • Replace a post's text
  • Revise a post's wording from feedback, keeping its idea
  • Approve a pending draft into the publishing queue
  • Reject a pending or queued post
  • Attach a local image or video file to a post (png, jpg, gif, webp, mp4 or mov)
  • Generate an image for a post
  • Set the order of posts waiting in the queue
  • Send eligible queued posts right now, once Let agents send posts is on in Settings, Agents
  • Check the app's live status: version, plan, AI and image providers, connected schedulers, queue counts and anything that needs attention
  • Answer how-to, setup and troubleshooting questions about Threadgehog from the help built into your version

What it costs

Threadgehog doesn't charge anything extra to connect Cursor. Cursor runs on your own Cursor plan, separate from Threadgehog; see cursor.com for current pricing. Drafts, ideas and images Cursor asks Threadgehog for still use the AI provider and image provider you've set up in Threadgehog's own Settings, and are billed the same way a click in the app would be.

Your key and your data

Threadgehog's agent server only listens on 127.0.0.1, this Mac, on the port shown in Settings, Agents (47331 by default, or another free port if that one is taken). Every request needs the bearer token from that tab, and a request with the wrong Origin header is refused too. Cursor connects to that address directly over HTTP, since it runs on this Mac already. Threadgehog stores the token in the macOS Keychain, and also writes it with the port to ~/Library/Application Support/Threadgehog Public/agent.json (readable only by your Mac user account) so the threadgehog command can find the server. That file stays on disk, even after you quit Threadgehog, until you turn Allow agents off. The copy you paste into mcp.json is what Cursor uses to authenticate, so treat that file like it holds a password. Click Regenerate in Settings, Agents any time to issue a new token, which immediately invalidates the old one everywhere it was used. Agent calls run entirely between Cursor and Threadgehog on your Mac, through the same AI provider, image provider and scheduler you already configured; Threadgehog's own servers never see this traffic, and no keys or tokens are ever returned to an agent.

Limits to know

  • Works only on this Mac: the server listens on 127.0.0.1, so no other device can reach it.
  • Threadgehog must be open with Agents turned on in Settings, Agents, or every call fails.
  • Works with agents that run on your Mac: Claude Code, Codex, Cursor, Claude Desktop and Gemini CLI.
  • approve_post only works on posts still pending, and reject_post only on posts pending or queued; neither can touch a post that already published.
  • Media attachments must already exist under your home folder, as png, jpg, gif, webp, mp4 or mov files.

Troubleshooting

"Threadgehog isn't running with agents enabled. Open Threadgehog, then Settings > Agents, and turn on Allow agents."

Why: The threadgehog command found no running server: either Threadgehog is closed, or the Allow agents toggle in Settings, Agents is off. Only the threadgehog command prints this message; Cursor shows its own connection error for the same problem.

Fix: Open Threadgehog, go to Settings, Agents, and turn on Allow agents. Keep the app open while you use the agent.

Right after someone clicks Regenerate in Settings, Agents, every Threadgehog call from Cursor fails as unauthorized (Threadgehog answers HTTP 401).

Why: Cursor is connected through the optional Direct (HTTP) setup and is still sending the old token. The default snippet is not affected. The threadgehog command is not affected, because it reads the current token from the app each time it runs.

Fix: In Settings, Agents, click Copy next to Token, then update your config or snippet with the new value and reconnect.

No Agents tab in Settings.

Why: This Threadgehog version doesn't have agent support yet.

Fix: Open the Threadgehog menu and choose Check for Updates…, install the update, then reopen Settings.

"Only pending posts can be approved; <id> is published."

Why: approve_post only moves a draft still waiting for approval into the queue. This post already moved past pending, so a repeat approval is refused instead of resending it.

Fix: Check the post's current status with get_post or list_pending before approving it again.

"Unknown tool: <name>"

Why: The agent called a tool name that isn't one of Threadgehog's supported tools, for example a misspelled or made-up name.

Fix: Reconnect the agent, or restart the session, so it reloads the current tool list.

threadgehog doesn't appear in Cursor's Customize page, or shows an error there.

Why: Usually a JSON syntax error in .cursor/mcp.json or ~/.cursor/mcp.json, or a token that no longer matches.

Fix: Check the file's JSON syntax, then open the Output panel and pick MCP Logs from the dropdown to see the exact error Cursor got back.

Questions

Do I need to turn on Agents to use Threadgehog normally?

No. Agents are optional. Everything in Threadgehog still works from its own buttons with Agents off; turning it on adds a way for Cursor, or another MCP client you connect, to drive the same actions.

Can Cursor answer questions about how Threadgehog works?

Yes, in Threadgehog 1.0.4 or later. Ask Cursor something like "how do I connect Buffer" and it looks the answer up in the help built into your copy of Threadgehog. When something isn't working, it also checks your app's live status, such as a scheduler or AI key that stopped working or posts waiting on a setting. That help ships inside the app and is updated with every release. It runs on Cursor, so nothing extra is sent to Threadgehog.

Does connecting Cursor cost anything extra in Threadgehog?

No, Threadgehog doesn't charge anything extra to connect an agent. Cursor is a separate tool with its own plan, though. When it asks Threadgehog to draft text, generate ideas or make an image, that still runs through the AI provider and image provider set up in Threadgehog's own Settings, billed the same way a click in the app would be.

Can Cursor publish to Threads or X directly?

No. Cursor can approve a post into Threadgehog's queue and tell Threadgehog to send the queue now, but Threadgehog only publishes through the scheduler you've connected under Settings, Publishing, or not at all if you use Export only. Cursor never talks to Threads or X directly.

Can Cursor send posts without me clicking anything in Threadgehog?

Yes. approve_post moves a pending draft into the queue without a click, and those posts go out on your send schedule. For an agent to send right away with send_queue_now, turn on Let agents send posts in Settings, Agents (it starts off). Click Regenerate there any time to cut a connected agent off.

Will this work with ChatGPT, Manus or Perplexity's Computer agent?

Threadgehog connects to agents that run on your Mac: Claude Code, Codex, Cursor, Claude Desktop or Gemini CLI.

What happens if I close Threadgehog while Cursor is connected?

Every call fails until you reopen Threadgehog with Agents still turned on. The threadgehog command line shows "Threadgehog isn't running with agents enabled..." in that case, and Cursor will see a similar connection error.

Can I turn threadgehog off for a bit without deleting the config?

Yes. Open Customize in Cursor's sidebar, find threadgehog and use its toggle to turn it off, instead of removing the entry from mcp.json. Disabled servers don't load or appear in chat.

Other guides