Sprkly MCP

Let AI agents read and prepare your Sprkly content.

Sprkly's MCP server implements the Model Context Protocol (MCP), an AI-native protocol that lets large language models and agent frameworks interact with scheduling, billing, and approval workflows through a standardized, schema-driven interface.

Base URL

https://mcp.sprkly.app

Protocol

Streamable HTTP (JSON-RPC 2.0)

MCP endpoint

POST /mcp

Authentication

API key → JWT exchange

Quick start

Get an agent talking to Sprkly in four steps.

  1. 1.Generate an API key in Sprkly Settings → API Keys. Keys are scoped and never expire.
  2. 2.Exchange the API key for a 24-hour JWT by calling POST /auth with your key.
  3. 3.Use the JWT as a Bearer token on every MCP request to POST /mcp.
  4. 4.Refresh the JWT before it expires — or re-exchange the same API key for a new one.

Authentication

MCP requests use a short-lived JWT obtained by exchanging your long-lived API key. The API key never expires and can be regenerated from Settings at any time.

POST /auth — Exchange API key for JWT

Send your API key to the auth endpoint. You get back a JWT, its expiry, your user ID, and the scopes granted by the key.

Request

{
  "apiKey": "sk_live_xxx"
}

Response

{
  "token": "eyJ...",
  "expiresIn": 86400,
  "userId": "user_...",
  "scopes": ["sprkly:*"]
}

cURL example

curl -sS https://mcp.sprkly.app/auth \
  -H "Content-Type: application/json" \
  -d '{"apiKey": "sk_live_xxx"}'
Token refresh: The API key itself never expires, but the exchanged JWT is valid for 24 hours (expiresIn: 86400 seconds). Refresh before expiry by calling POST /auth again with the same API key. Each exchange produces a fresh JWT; old tokens remain valid until their natural expiry.

Available tools

TOOLsprkly_get_account_summary

Returns information about the authenticated account: plan tier, connected account count, scheduled post counts, and the next 3 upcoming posts.

Parameters

No parameters.

Response

{
  "planTier": "pro",
  "connectedAccounts": 3,
  "scheduledPostCount": 12,
  "upcomingPosts": [
    {
      "id": "post_...",
      "caption": "New feature launch incoming",
      "scheduledTime": "2026-05-17T15:00:00.000Z",
      "platforms": ["instagram", "tiktok"]
    }
  ]
}
TOOLsprkly_list_connected_social_accounts

Returns all social accounts linked to the authenticated Sprkly account, including platform type, handle, display name, and connection status per account.

Parameters

No parameters.

Response

{
  "accounts": [
    {
      "id": "profile_instagram_123",
      "platform": "instagram",
      "handle": "sprklyapp",
      "displayName": "Sprkly",
      "connected": true
    }
  ]
}
TOOLsprkly_list_scheduled_posts

Returns a paginated list of scheduled posts for the authenticated account. Optionally filter by status.

Parameters

{
  "status": "scheduled",      // optional — "scheduled", "posted", "failed"
  "limit": 20,                // optional — 1–50, default 20
  "cursor": "cursor_string"   // optional — pagination cursor from previous response
}

Response

{
  "posts": [
    {
      "id": "post_...",
      "caption": "Exciting news coming soon",
      "platforms": ["instagram"],
      "scheduledTime": "2026-05-17T15:00:00.000Z",
      "status": "scheduled",
      "createdAt": "2026-05-16T10:00:00.000Z"
    }
  ],
  "nextCursor": null
}
TOOLsprkly_get_billing_summary

Returns the current Stripe subscription status, plan details, next billing date, and recent invoice events for the authenticated account.

Parameters

No parameters.

Response

{
  "status": "active",
  "plan": "pro",
  "nextBillingDate": "2026-06-16T00:00:00.000Z",
  "recentInvoices": [
    {
      "id": "in_...",
      "amount": 2900,
      "currency": "usd",
      "status": "paid",
      "date": "2026-05-16T00:00:00.000Z"
    }
  ]
}
TOOLsprkly_get_post_approval_status

Returns the current approval status for a specific post, including reviewer notes and timestamps.

Parameters

{
  "postId": "post_..."   // required — the post ID to check
}

Response

{
  "postId": "post_...",
  "status": "pending",          // "pending", "approved", "rejected"
  "reviewerNotes": null,
  "requestedAt": "2026-05-16T10:00:00.000Z",
  "reviewedAt": null
}
TOOLsprkly_draft_post

Drafts a social media post from a content hint. The agent provides a brief description and the server generates a platform-appropriate draft.

Parameters

{
  "contentHint": "New product launch for our AI scheduling tool",  // required
  "platform": "instagram",         // optional — defaults to best-guess
  "tone": "professional"           // optional — "casual", "professional", "excited"
}

Response

{
  "draft": {
    "id": "draft_...",
    "caption": "We're thrilled to announce the launch of our AI-powered scheduling tool — now you can plan smarter, post faster. 🚀",
    "platform": "instagram",
    "tone": "professional",
    "createdAt": "2026-05-16T10:00:00.000Z"
  }
}
TOOLsprkly_validate_post_policy

Checks post content against Sprkly platform policies and returns any violations found.

Parameters

{
  "content": "Check out our amazing product at https://example.com"   // required
}

Response

{
  "valid": true,
  "violations": []
}
TOOLsprkly_request_post_approval

Submits a scheduled post for human approval. Required for accounts with approval workflows enabled.

Parameters

{
  "postId": "post_...",     // required
  "note": "Please review before publishing"   // optional
}

Response

{
  "postId": "post_...",
  "status": "pending_approval",
  "requestedAt": "2026-05-16T10:00:00.000Z"
}

Example

Complete flow: exchange an API key for a JWT, list available tools, then call a specific tool.

# 1. Exchange API key for a 24h JWT
curl -sS https://mcp.sprkly.app/auth \
  -H "Content-Type: application/json" \
  -d '{"apiKey": "sk_live_xxx"}' \
  | jq -r '.token' > /tmp/sprkly_token

TOKEN=$(cat /tmp/sprkly_token)

# 2. List available tools (JSON-RPC 2.0)
curl -sS https://mcp.sprkly.app/mcp \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "tools/list",
    "id": 1
  }'

# 3. Call a tool — get account summary
curl -sS https://mcp.sprkly.app/mcp \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "tools/call",
    "params": {
      "name": "sprkly_get_account_summary",
      "arguments": {}
    },
    "id": 2
  }'

The first call to tools/list returns the full tool schema including parameter definitions. Use tools/call to invoke any of the eight tools listed above.

Scopes & permissions

API keys are scoped to control what agents can do. The JWT inherits the scopes of the exchanged API key.

sprkly:*

Wildcard scope. Grants access to all MCP tools.

post:draft

Draft and validate post content. Read scheduling data.

approval:request

Submit posts for human approval. Read approval status.

Never expose API keys or JWTs in frontend code, screenshots, agent transcripts, or public repos. Treat them as server-side secrets.

Need help?

MCP access follows the same entitlement as API access. Contact Sprkly support if your account needs help setting up API keys or enabling approval workflows.