Skip to content
Guide8 min readTracee team

Manage social media from Cursor, Claude Code and the terminal

Connect Cursor, Claude Code, Codex or Gemini CLI to a social media MCP server, or script posts with a CLI and --json. Real commands, a changelog script, CI.

If you already live in Cursor or a terminal, opening a scheduling app to announce a release feels like a context switch. You can do the same work from where you are: ask your coding agent in plain language, or script it.

There are two ways to manage social media from Cursor, Claude Code, Codex or Gemini CLI. Connect the agent to a remote MCP server such as Tracee and ask for what you want, or run the Tracee CLI, which has a command for every action and prints JSON with --json. Both act under the same approvals and audit log.

Every Tracee command in this guide comes from the Tracee developer docs. Third-party client steps link to each vendor's docs, checked in November 2026.

MCP or CLI: which should you use?

Use MCP when you want the agent to decide the steps, and the CLI when you want the same steps every time.

SituationUseWhy
"Write this week's posts from the notes in this folder"MCPThe agent reads, writes and picks tools
Announce every GitHub releaseCLI in CINo person to sign in, same command each time
A weekly engagement report piped to Slack or a fileCLI with --jsonStructured output, jq-friendly
Ad hoc questions while codingMCPPlain language, no flags to remember
A coding agent that should show its workCLIEvery command is visible in the terminal log

Both reach the same engine. The Tracee MCP server has 16 tools (posts, media, brand, approvals, analytics, inbox, Radar, ads, research and more), and the CLI has a command for each tool action.

How do you connect each coding agent over MCP?

Each client takes the URL https://traceeai.com/mcp and signs in with OAuth the first time. Tracee's server speaks Streamable HTTP and supports OAuth 2.1 with dynamic client registration and PKCE.

Claude Code

claude mcp add --transport http tracee https://traceeai.com/mcp

Then type /mcp, pick tracee and choose Authenticate. The command writes to local scope by default; add --scope project to write it to .mcp.json so your team gets the same server (Claude Code MCP docs). Each teammate still signs in with their own account.

Cursor

Add Tracee to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json in a project:

{
  "mcpServers": {
    "tracee": { "url": "https://traceeai.com/mcp" }
  }
}

Ask Cursor to use Tracee, and it opens the sign-in page the first time. Cursor supports Streamable HTTP servers with OAuth (Cursor MCP docs).

Codex

OpenAI's Codex CLI adds HTTP servers with --url and signs in with a separate command (Codex MCP docs):

codex mcp add tracee --url https://traceeai.com/mcp
codex mcp login tracee            # add --no-browser over SSH

Or set it in ~/.codex/config.toml. To use a Tracee key instead of OAuth, name the environment variable that holds it:

[mcp_servers.tracee]
url = "https://traceeai.com/mcp"
bearer_token_env_var = "TRACEE_API_KEY"

Gemini CLI

gemini mcp add --transport http tracee https://traceeai.com/mcp

Then run /mcp auth tracee inside Gemini CLI and sign in (Gemini CLI MCP docs).

Once connected, test with a read: "Using Tracee, list my connected channels and anything scheduled this week."

How do you install and sign in to the Tracee CLI?

The CLI is one file with no dependencies, served by Tracee, and needs Node.js 18.17 or newer. The quickstart has the full walkthrough.

npm install -g https://traceeai.com/cli/tracee-cli.tgz
tracee login                  # opens your browser; press Allow
tracee whoami                 # who you act as, and in which workspace

Over SSH, use tracee login --no-browser and paste the code the page shows. To run it once without installing: npx https://traceeai.com/cli/tracee-cli.tgz whoami. The key is saved to ~/.config/tracee/config.json, readable only by you.

Commands follow one pattern:

tracee <group> <command> [arguments] [--flags]
  • Flags are the API's field names with - for _, such as --min-strength.
  • --json prints exactly what the API returns.
  • --data @file.json sends a whole JSON body.
  • tracee --help, tracee <group> --help and tracee <group> <command> --help list everything, including allowed values.
  • For anything without its own command, tracee api GET /radar/signals --query min_strength=3 calls any endpoint.

Exit codes are 0 done, 1 Tracee refused or failed, and 2 the command was mistyped, in which case nothing was sent.

Example: draft release notes from a changelog

This is the most common developer use: turn the newest changelog entry into posts. You can do it with a coding agent, or with plain shell.

With Claude Code, Cursor or Codex, ask:

Read the newest section of CHANGELOG.md. Write a LinkedIn post (what changed and why it matters, under 120 words) and an X post. Run tracee channels to find our accounts, then create the post with tracee posts create without --publish, so it stays a draft. Show me the brand issues in the answer.

With shell only, take the newest section and create a draft:

#!/usr/bin/env bash
set -euo pipefail

# The newest entry: from the first "## " heading up to the next one
NOTES=$(awk '/^## /{n++} n==1' CHANGELOG.md)
VERSION=$(printf '%s\n' "$NOTES" | head -n 1 | sed 's/^## //')
SUMMARY=$(printf '%s\n' "$NOTES" | sed -n '2,6p' | tr '\n' ' ')

tracee posts create \
  --body "$VERSION is out. $SUMMARY" \
  --channel linkedin --channel x \
  --link https://example.com/changelog \
  --json > answer.json

Leaving out --publish keeps it a draft. The answer includes brandIssues per channel, and a version with issues can't be published until the copy is fixed. The link gets UTM tags per channel, so CRM contacts trace back to the post.

To schedule instead, pass a time, and add a first comment if you like:

tracee posts create \
  --body "Our new dashboard is live." \
  --channel linkedin --channel x \
  --link https://acme.com/launch \
  --thread "Details in the first comment: https://acme.com/launch" \
  --publish 2026-11-20T09:00

--thread parts become replies on X and Threads and comments on LinkedIn, Facebook, Instagram, YouTube and Reddit. tracee posts next-slot --channel-ids <channel_id> finds the next free posting time.

Example: post every GitHub release from CI

Create a workspace key in Tracee under Settings > Workspace keys, name it "GitHub Actions", and store it as a repository secret named TRACEE_API_KEY (GitHub secrets docs). Then add a workflow:

on:
  release:
    types: [published]

jobs:
  announce:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/setup-node@v4
        with:
          node-version: 22
      - run: npm install -g https://traceeai.com/cli/tracee-cli.tgz
      - run: |
          tracee posts create \
            --body "${{ github.event.release.name }} is out: ${{ github.event.release.html_url }}" \
            --channel linkedin --channel x \
            --publish now
        env:
          TRACEE_API_KEY: ${{ secrets.TRACEE_API_KEY }}

The post appears in Tracee under the key's name. If the workspace requires approval, it waits for a person, and the step still succeeds. That is usually what you want for release posts: automation writes and files them, a person checks the wording.

Example: scripted reports and inbox triage

--json makes the CLI easy to pipe. A few patterns from the docs:

# Views, likes, comments and clicks for the last 7 days
tracee analytics engagement --days 7 --json

# The strongest buying signals of the week, as "person: gist"
tracee radar signals --min-strength 3 --days 7 --json | jq -r '.[] | "\(.person): \(.gist)"'

# Draft a reply for every conversation that needs one (nothing is sent)
for id in $(tracee inbox list --view needs_reply --json | jq -r '.threads[].id'); do
  tracee inbox draft "$id" --instruction "Thank them and offer a demo"
done

# What is waiting for a person
tracee approvals

tracee inbox draft writes replies and saves one as a draft for a person to send. Sending replies on their own can only be turned on by a person in the app.

Which key should a script or agent use?

Pick the key by who should own the action. From Tracee's authentication docs:

Personal keyWorkspace keyOAuth token
Belongs toYouThe workspaceYou, through an MCP client
ReachesEvery workspace you're inThat workspace onlyEvery workspace you're in
Made bytracee login, or Settings > Personal keysSettings > Workspace keysThe client's sign-in
When someone leavesStops working in workspaces they leftKeeps workingStops working
Best forYour own CLI and scriptsServers, CI, automationsAI assistants

With a personal key in several workspaces, pass --workspace <id> or run tracee workspaces select <id> once.

What guardrails apply to scripts and coding agents?

Every CLI, API and MCP call acts as an agent, under the rules a person sets in Tracee. That means:

  • Approval: with approval on, publishing, scheduling and inbox replies become approval requests. The CLI prints Sent for approval.
  • Allowed channels: agents can only post to the channels a person allowed.
  • Brand rules: drafts with brand issues can be saved but not published.
  • Always a person: tracee posts delete, tracee posts unpublish and write actions in connected apps wait for a person, whatever the approval setting.
  • Audit log: every change is recorded with the agent's name, what it did and the result.
  • Rate limit: 120 requests a minute per key. The CLI waits out a Retry-After of up to 60 seconds and retries on its own.

We explain how to set these up for a team in our guide to an approval workflow for AI agents.

Tips for working with coding agents

  • Tell the agent to run tracee --help first. Each command's help names its flags and allowed values, so the agent doesn't guess.
  • Ask for drafts by default. Have the agent leave out --publish unless you say otherwise.
  • Keep keys out of the repository. Use environment variables locally and your CI's secret store.
  • Make one workspace key per automation, so you can turn one off without breaking the others.
  • Non-developers on your team can do the same work in a chat app; our guide to scheduling posts with Claude covers that side.

Next step

Install the CLI, run tracee whoami, and create one draft from your latest changelog entry. If the copy needs no edits, move the command into CI with a workspace key and keep approval on. For background on the protocol, see our explainer on what a social media MCP server is.

Frequently asked questions

Can Cursor post to LinkedIn?

Yes, through an MCP server that publishes to LinkedIn. Add the server's URL to Cursor's mcp.json, sign in when Cursor opens the page, and ask Cursor to draft or schedule a post. The server does the publishing. With Tracee, agent posts wait for a person's approval by default, so Cursor's request lands in the Approvals queue first.

Does OpenAI Codex work with a social media MCP server?

Yes. Codex supports Streamable HTTP MCP servers. Run codex mcp add tracee --url https://traceeai.com/mcp, then codex mcp login tracee to sign in, or set the server in ~/.codex/config.toml with a bearer token from an environment variable. Codex can also run the Tracee CLI in its terminal, which suits scripted work.

Should I use MCP or a CLI in CI?

Use the CLI. CI jobs have no person to complete a browser sign-in and no model to choose tools, so a fixed command with a workspace key is simpler and repeatable. The Tracee CLI reads the key from TRACEE_API_KEY, exits with 0, 1 or 2, and follows the same approval rules as an AI agent.

How do I keep a social media API key safe in GitHub Actions?

Create a workspace key just for CI, named after the job, and store it as an encrypted repository secret, never in the code. Pass it to the step as an environment variable. If it leaks, turn that one key off in Tracee under Settings > Workspace keys without touching anyone's personal access, then create a new one.

What happens if a post from CI needs approval?

The CLI answers Sent for approval, and the step still succeeds. The post waits in Tracee's Approvals queue until a person approves it, then goes out at the time the command asked for. This lets you automate release announcements while a person still checks the copy before it reaches your followers.

Keep reading

7-day trial. No credit card.

Let your AI run your social media.

Connect ChatGPT, Claude or any agent to Tracee. It plans, writes and schedules your posts across 13 networks, and you approve everything in one calendar.