Skip to main content
The Xquik MCP server exposes 2 tools: explore (search the API spec) and xquik (execute API calls). Connect to the MCP server at https://xquik.com/mcp with your API key.

explore

Search the API endpoint catalog. Read-only, no network calls, always free. Use this to discover available endpoints, check parameters, and find the right API path before executing calls. Input:
ParameterTypeRequiredDescription
codestringYesAsync arrow function to execute against the API spec. Max length: 10,000 characters.
Sandbox API:
interface EndpointInfo {
  method: string;
  path: string;
  summary: string;
  category: string; // account, bot, composition, credits, extraction, integrations, media, monitoring, support, twitter, x-accounts, x-write
  free: boolean;
  parameters?: Array<{
    name: string;
    in: 'query' | 'path' | 'body';
    required: boolean;
    type: string;
    description: string;
  }>;
  responseShape?: string;
}

declare const spec: { endpoints: EndpointInfo[] };
Examples:
Find all free endpoints
async () => {
  return spec.endpoints.filter(e => e.free);
}
Find endpoints by category
async () => {
  return spec.endpoints.filter(e => e.category === 'composition');
}
Search by keyword
async () => {
  return spec.endpoints.filter(e => e.summary.toLowerCase().includes('tweet'));
}

xquik

Execute API calls against your Xquik account. The agent writes code using xquik.request() with auth injected automatically. Input:
ParameterTypeRequiredDescription
codestringYesAsync arrow function to execute. Max length: 10,000 characters.
Sandbox API:
declare const xquik: {
  request(path: string, options?: {
    method?: string;  // default: 'GET'
    body?: unknown;
    query?: Record<string, string>;
  }): Promise<unknown>;
};
declare const spec: { endpoints: EndpointInfo[] };
Workflow Examples:
Compose an algorithm-optimized tweet (3-step, free)
async () => {
  // Step 1: Get algorithm data and follow-up questions
  const compose = await xquik.request('/api/v1/compose', {
    method: 'POST',
    body: { step: 'compose', topic: 'AI agents' }
  });
  return compose;
  // Returns contentRules, followUpQuestions, scorerWeights
  // Step 2: After user answers: { step: 'refine', goal, tone, topic }
  // Step 3: After drafting: { step: 'score', draft }
  // The score step runs algorithm checks. The draft must pass
  // all checks before presenting to the user.
}
Save a writing style from screenshots (free)
async () => {
  // When a user shares tweet screenshots, extract the texts and save as a style.
  // This lets free users clone any writing voice without a subscription.
  return xquik.request('/api/v1/styles/elonmusk', {
    method: 'PUT',
    body: {
      label: 'Elon Musk style',
      tweets: [
        { text: 'The most entertaining outcome is the most likely' },
        { text: 'Mars, here we come!!' }
      ]
    }
  });
  // Then compose with: POST /api/v1/compose { step: 'compose', topic: '...', styleUsername: 'elonmusk' }
}
Browse trending news from radar (free)
async () => {
  return xquik.request('/api/v1/radar');
}
Radar + Style + Compose combined (free)
async () => {
  const [radar, styles] = await Promise.all([
    xquik.request('/api/v1/radar'),
    xquik.request('/api/v1/styles'),
  ]);
  return { radar, styles };
}
Analyze a user’s writing style
async () => {
  // Returns cached style if available (free)
  // Auto-refreshes from X if cache older than 7 days (subscription required)
  return xquik.request('/api/v1/styles', {
    method: 'POST',
    body: { username: 'elonmusk' }
  });
}
Search tweets with cursor pagination (subscription required)
async () => {
  return xquik.request('/api/v1/x/tweets/search', {
    query: { q: 'from:elonmusk' }
  });
}
Download media and get gallery link (subscription required)
async () => {
  return xquik.request('/api/v1/x/media/download', {
    method: 'POST',
    body: { tweetInput: '1234567890' }
  });
}
Bulk download: search + download combined
async () => {
  const search = await xquik.request('/api/v1/x/tweets/search', {
    query: { q: 'from:berktavsan has:videos' }
  });
  if (!search.tweets?.length) return { error: 'No video tweets found' };
  const tweetIds = search.tweets.map(t => t.id);
  return xquik.request('/api/v1/x/media/download', {
    method: 'POST',
    body: { tweetIds }
  });
}
Monitor a user + create webhook (subscription required)
async () => {
  const monitor = await xquik.request('/api/v1/monitors', {
    method: 'POST',
    body: { username: 'elonmusk', eventTypes: ['tweet.new', 'tweet.reply'] }
  });
  const webhook = await xquik.request('/api/v1/webhooks', {
    method: 'POST',
    body: { url: 'https://example.com/hook', eventTypes: ['tweet.new', 'tweet.reply'] }
  });
  return { monitor, webhook };
}
Run an extraction (subscription required)
async () => {
  const estimate = await xquik.request('/api/v1/extractions/estimate', {
    method: 'POST',
    body: { toolType: 'follower_explorer', targetUsername: 'elonmusk' }
  });
  return estimate;
  // If acceptable, call POST /api/v1/extractions with same params
}
Subscribe (free, returns Stripe checkout URL)
async () => {
  return xquik.request('/api/v1/subscribe', { method: 'POST' });
}

API endpoints

The server covers 122 endpoints across 12 categories:
CategoryEndpointsExamples
account7Account info, API keys, subscribe, X identity
composition13Compose, styles, drafts, radar
credits3Balance check, top up, quick top-up
extraction9Draws, extractions, estimates, exports
integrations7Telegram, create, update, delete, deliveries, test
media1Media download
monitoring13Monitors, events, webhooks, deliveries
support5Support tickets
twitter37Tweet search, get tweet/batch, get article, user lookup/batch/search, follow check, trending topics, bookmarks/folders, notifications, timeline, DM history, likes, media, favoriters, followers-you-know, verified followers, user tweets, mentions, followers, following, quotes, replies, retweeters, thread, communities, lists
x-accounts6Connect, list, get, disconnect, reauth, bulk retry
x-write17Tweet, like, retweet, unretweet, follow, DM, profile, media upload, communities
bot4Platform links, lookup, usage tracking
Use explore to browse the full catalog with parameters and response shapes.

Cost summary

CategoryCost
explore toolAlways free
Compose, styles (cached), drafts, radar, subscribe, account, API keysFree
X account management (connect, list, disconnect, reauth)Free
Integration management (create, list, update, delete, test)Free
Styles (X API refresh when cache >7 days)Subscription required
Tweet search, user lookup, follow check, media download, trendsMetered
Extractions, drawsMetered
Write actions (tweet, like, retweet, follow, DM, profile, media upload)Metered
Monitors, events, webhooksSubscription required
Never combine free and paid endpoints in a single Promise.all. A 402 error on one call kills all results. Call free endpoints first, then paid ones separately.

Error handling

  • 402 / no_subscription / subscription_inactive / no_credits / insufficient_credits: The sandbox automatically calls POST /api/v1/subscribe and includes a checkout URL in the error message. Free data already fetched is preserved.
  • 429: Rate limited. Retry with exponential backoff.
  • API errors: Include status code and message in the response.