# Jackpost — AI Marketing Employee

Jackpost is an autonomous Twitter marketing agent for developers and small teams.
Connect your Twitter account, tell Jackpost about your product, and it generates tweet drafts —
sending each one for approval via Telegram before publishing. It learns what works and gets better every week.

## Getting Started

### Path A: I already have an API key

If you have a `jp_` API key, connect Jackpost as an MCP server:

```bash
# Claude Code
claude mcp add jackpost --transport http https://tryjackpost.com/mcp \
  -H "Authorization: Bearer YOUR_JP_API_KEY"

# Cursor — add to .cursor/mcp.json:
# {
#   "mcpServers": {
#     "jackpost": {
#       "url": "https://tryjackpost.com/mcp",
#       "headers": { "Authorization": "Bearer YOUR_JP_API_KEY" }
#     }
#   }
# }
```

After connecting, skip to **Setting Up Your Account** below.

### Path B: I'm building an app and want the REST API

Jackpost exposes the same capabilities via a JSON-RPC API at `POST https://tryjackpost.com/mcp`.
Use `Authorization: Bearer jp_xxx` header. See MCP protocol docs for request format.

### Path C: I need an API key (headless auth)

Run these commands to get an API key without opening a dashboard:

```bash
# 1. Generate auth session
SESSION_ID=$(openssl rand -hex 32)
CODE_VERIFIER=$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | head -c 43)
CODE_CHALLENGE=$(echo -n "$CODE_VERIFIER" | shasum -a 256 | cut -d' ' -f1)

# 2. Ask the human to open this URL in their browser:
echo "Open this URL to authorize Jackpost:"
echo "https://tryjackpost.com/auth/cli?session_id=$SESSION_ID&code_challenge=$CODE_CHALLENGE"

# 3. Poll for completion (human signs in and clicks Authorize):
while true; do
  RESPONSE=$(curl -s "https://tryjackpost.com/auth/cli/status?session_id=$SESSION_ID&code_verifier=$CODE_VERIFIER")
  STATUS=$(echo "$RESPONSE" | grep -o '"status":"[^"]*"' | cut -d'"' -f4)
  if [ "$STATUS" = "complete" ]; then
    API_KEY=$(echo "$RESPONSE" | grep -o '"apiKey":"[^"]*"' | cut -d'"' -f4)
    echo "API key: $API_KEY"
    break
  elif [ "$STATUS" = "expired" ]; then
    echo "Session expired. Please try again."
    break
  fi
  sleep 3
done

# 4. Connect as MCP server:
claude mcp add jackpost --transport http https://tryjackpost.com/mcp \
  -H "Authorization: Bearer $API_KEY"
```

## Setting Up Your Account

After connecting via MCP, set up your account by completing these goals:

1. **Tell Jackpost about your product** — Use `update_business_info` with your company name, website, and a brief description. Then use `add_product_context` with your website URL or product docs to give Jackpost detailed knowledge.

2. **Connect Twitter** — Use `get_twitter_auth_url` to get an OAuth URL. Ask the human to open it and complete the Twitter authorization. Verify with `get_twitter_account`.

3. **Connect Telegram for approvals** — Use `get_telegram_link_url` to get a Telegram deep link. Ask the human to open it and press Start. This enables draft approvals via Telegram.

4. **Analyze your voice** — Use `analyze_twitter_voice` to learn from your existing tweets. This shapes Jackpost's writing style to match yours.

5. **Generate your first draft** — Use `generate_draft_now` to create a tweet. If Telegram is connected, the human will receive an approval request there.

## Limitations

- Free tier: 17 tweets per 24 hours (Twitter API limit)
- All drafts require human approval via Telegram before publishing
- Twitter is the only supported platform (LinkedIn coming later)

## Full Capabilities

### Content & Drafting
- `generate_draft_now` — Generate a tweet draft immediately
- `write_article` — Research a topic and write a long-form article for X (4-hr cooldown)
- `get_post_history` — View past posts with status and engagement metrics
- `get_queue_status` — See pending drafts awaiting approval
- `approve_post` — Approve a draft for publishing
- `reject_post` — Reject a draft with feedback
- `edit_post` — Edit a draft before approving

### Strategy & Learning
- `get_bandit_state` — View which tweet strategies are performing best
- `get_engagement_stats` — Aggregate engagement metrics over time

### Profiles & Voice
- `get_voice_profile` — Read the current voice/tone profile
- `get_audience_profile` — Read the audience profile
- `get_business_profile` — Read business info and context
- `get_profile` — Generic profile reader (voice, audience, or business)
- `update_profile` — Update voice, audience, or business profile
- `update_business_info` — Set company name, website, and description

### Product Context
- `get_product_context` — View ingested product documentation chunks
- `add_product_context` — Ingest a URL or text into the knowledge base

### Account & Settings
- `get_twitter_account` — Check Twitter connection status
- `get_schedule` — View posting schedule
- `update_schedule` — Change posting times and timezone
- `update_topics` — Set topics to avoid
- `toggle_pause` — Pause or resume automatic posting
- `update_posting_mode` — Switch between approval modes
- `generate_api_key` — Create a new API key
- `list_api_keys` — List all API keys
- `revoke_api_key` — Revoke an API key

### Onboarding
- `get_twitter_auth_url` — Get Twitter OAuth URL for the human to complete
- `get_telegram_link_url` — Get Telegram deep link for the human to connect

### Research & Intelligence
- `analyze_twitter_voice` — Analyze existing tweets to build voice profile
- `company_research` — Research a company for competitive intelligence
- `trigger_engagement_search` — Find engagement opportunities (2-hr cooldown)
- `trigger_follows_discovery` — Discover relevant accounts to follow (24-hr cooldown)
- `trigger_product_research` — Research a topic for content ideas (24-hr cooldown)

### CRM & Leads
- `search_leads` — Search your lead database
- `get_lead` — Get details on a specific lead
- `add_lead` — Add a new lead
- `update_lead` — Update lead status or notes
- `get_lead_stats` — Lead pipeline statistics

### Watch Accounts & Competitors
- `get_watch_accounts` — List accounts you're monitoring
- `add_watch_account` — Start monitoring an account
- `remove_watch_account` — Stop monitoring an account
- `list_competitors` — List tracked competitors
- `add_competitor` — Add a competitor to track

### Tinctures (Content Templates)
- `get_tincture` — Read a tincture
- `create_tincture` — Create a new tincture
- `list_tinctures` — List all tinctures
- `derive_from_tincture` — Create a variant from an existing tincture

### Engagement
- `get_engagement_opportunities` — View suggested engagement actions
- `get_tracked_accounts` — View accounts in your network
- `dismiss_engagement` — Dismiss an engagement suggestion
- `dismiss_follow_suggestion` — Dismiss a follow suggestion
- `mark_engagement_acted` — Mark an engagement as acted on

### Conversation
- `send_directive` — Send a natural language instruction to Jackpost (e.g., "focus on developer content this week")
