SocialNeuronSocialNeuronSocialNeuron
  • Docs
  • REST API
  • MCP Tools API
Product
  • Dashboard
  • Pricing
  • What's New
Developers
  • REST API
  • MCP Tools API
  • CLI Reference
  • npm Package
  • GitHub
Support
  • Help & Support
  • FAQ
  • Email Support
Community
  • X / Twitter
  • GitHub
  • Privacy Policy
  • Terms of Service
Getting Started
Features
Platforms
Templates & Recipes
Billing
Developer
    Developer APICLI ReferenceCode ExamplesMCP QuickstartAuthenticationCredit SystemWorkflow RecipesError ReferenceChangelog
Help & Support
Developer

​CLI Reference

The Social Neuron CLI gives you direct access to publishing, analytics, account management, and automation from your terminal. Every command is deterministic -- no AI model calls, no LLM latency. Ideal for scripts, CI/CD pipelines, and quick checks.

​Installation

Run directly (no install):

npx -y @socialneuron/mcp-server sn <command>
bash

Global install (recommended for frequent use):

npm install -g @socialneuron/mcp-server
socialneuron-mcp sn <command>
bash

After a global install, you can use socialneuron-mcp directly instead of the npx prefix. All examples below use the short form.

​Authentication

Before using any command, authenticate with your Social Neuron account. Three methods are available:

MethodCommandBest For
Device Flowsocialneuron-mcp login --deviceInteractive terminals -- opens a browser for secure login
Browsersocialneuron-mcp loginDefault -- same browser flow without the device code step
API Key Pastesocialneuron-mcp login --pasteHeadless servers and CI -- paste an API key from your dashboard
# Authenticate (opens browser)
socialneuron-mcp login --device

# Verify your session
socialneuron-mcp sn info

# Sign out
socialneuron-mcp logout
bash

Credentials are stored securely in your system keychain (macOS Keychain, Linux secret-tool) or a local file fallback.

​Command Reference

All commands support the --json flag for machine-readable output.

​Discovery

CommandDescription
sn toolsList all available MCP tools
sn tools --module <module>Filter tools by module (e.g., ideation, analytics)
sn tools --scope <scope>Filter tools by required scope (e.g., mcp:write)
sn infoShow version, auth status, credit balance, and tool count

​Content

CommandDescription
sn publish --media-url <url> --caption <text> --platforms <list> --confirmPublish content to one or more platforms
sn quality-check --caption <text>Run a quality score check on your caption
sn e2e --media-url <url> --caption <text> --platforms <list> --confirmEnd-to-end publish with quality gate
sn plan listList your content plans
sn plan view --plan-id <id>View a specific content plan
sn plan approve --plan-id <id>Approve a content plan for publishing
sn preset listList platform presets (6 built-in)
sn preset show --name <name>Show details of a preset
sn preset save --name <name> --platform <name> --max-length <n> --aspect-ratio <ratio>Save a custom preset
sn preset delete --name <name>Delete a custom preset

​Account

CommandDescription
sn preflightPre-publish checklist -- verify accounts and permissions are ready
sn preflight --check-urlsInclude URL validation (privacy policy, terms)
sn oauth-healthCheck token health for all connected accounts
sn oauth-health --warn-days 7Warn if tokens expire within N days
sn oauth-refresh --platforms <list>Refresh OAuth tokens for specific platforms
sn oauth-refresh --allRefresh all connected platform tokens

​Analytics

CommandDescription
sn posts --days <1-90>List your recent posts
sn posts --platform youtube --status publishedFilter posts by platform and status
sn refresh-analyticsTrigger an analytics refresh across all platforms
sn loopGet a closed-loop performance summary with actionable insights

​System

CommandDescription
sn status --job-id <id>Check the status of an async job (video renders, scheduled posts)
sn autopilotView your autopilot configuration and schedule
sn usageShow current usage statistics
sn creditsCheck your credit balance and spending

​Command Details

​publish

Publish content to one or more social platforms.

socialneuron-mcp sn publish \
  --media-url "https://example.com/video.mp4" \
  --caption "Check out our new product launch" \
  --platforms "youtube,instagram,tiktok" \
  --title "Product Launch Video" \
  --schedule-at "2026-04-15T09:00:00Z" \
  --confirm
bash
FlagRequiredDescription
--media-url <url>YesURL of the media file to publish
--caption <text>YesPost caption or description
--platforms <list>YesComma-separated platform names
--confirmYesSafety flag to confirm publishing
--title <text>NoPost title (for platforms that support it)
--schedule-at <iso8601>NoSchedule for later instead of publishing immediately
--idempotency-key <key>NoPrevent duplicate publishes in retry scenarios

​quality-check

Run a quality analysis on your content before publishing.

socialneuron-mcp sn quality-check \
  --caption "5 tips for better engagement on Instagram" \
  --platforms "instagram,linkedin" \
  --threshold 25
bash
FlagRequiredDescription
--caption <text>YesThe caption text to check
--title <text>NoOptional title to include in the check
--platforms <list>NoTarget platforms for platform-specific scoring
--threshold <0-35>NoMinimum quality score to pass (default: auto)

​e2e (End-to-End)

Combines quality check and publish in a single command. Content is only published if it passes the quality gate.

socialneuron-mcp sn e2e \
  --media-url "https://example.com/video.mp4" \
  --caption "Our best tips for creators" \
  --platforms "youtube,tiktok" \
  --threshold 20 \
  --dry-run \
  --confirm
bash
FlagRequiredDescription
--dry-runNoSimulate the full flow without publishing
--forceNoPublish even if quality check fails
--check-urlsNoValidate media URLs before publishing

All publish flags are also supported.

​JSON Output

Add --json to any command for structured output. Every JSON response includes:

{
  "schema_version": "1",
  "ok": true,
  "command": "credits",
  "data": { ... }
}
json

On errors:

{
  "schema_version": "1",
  "ok": false,
  "command": "publish",
  "error": "Insufficient credits",
  "errorType": "CREDITS",
  "retryable": false,
  "hint": "Purchase credits or upgrade your plan"
}
json

​Piping to Other Tools

# Get credit balance as a number
socialneuron-mcp sn credits --json | jq '.data.balance'

# List posts and filter by engagement
socialneuron-mcp sn posts --days 30 --json | jq '.data.posts | sort_by(.engagement) | reverse'

# Check if quality passes before publishing in a script
RESULT=$(socialneuron-mcp sn quality-check --caption "my post" --json)
if echo "$RESULT" | jq -e '.data.passed' > /dev/null; then
  echo "Quality check passed"
fi
bash

​Interactive REPL

For exploratory sessions, launch the interactive REPL with tab completion:

socialneuron-mcp repl
bash

The REPL supports all sn subcommands and persists your authentication session.

​Environment Variables

VariablePurpose
SOCIALNEURON_API_KEYAPI key for non-interactive auth (CI/CD)
DO_NOT_TRACK=1Disable anonymous usage telemetry

Ready to try this? Sign up free and get 100 credits to start.


Developer APICode Examples
On this page
  • Installation
  • Authentication
  • Command Reference
    • Discovery
    • Content
    • Account
    • Analytics
    • System
  • Command Details
    • publish
    • quality-check
    • e2e (End-to-End)
  • JSON Output
    • Piping to Other Tools
  • Interactive REPL
  • Environment Variables