Why Migrate
Before: Current Composio Session MCP Setup
1
Install the current SDK
Install
composio for Python or @composio/core for TypeScript.2
Create a Twitter auth configuration
Select managed or custom authorization according to the current Composio
toolkit options available to your organization.
3
Create a reusable MCP session
Call
composio.create(...) with the user ID, Twitter toolkit, auth config,
and mcp=True or mcp: true.4
Read the session URL
Use
session.mcp.url as the user’s MCP endpoint. Reuse the session instead
of creating one for every request.5
Configure the MCP client
Add
session.mcp.url and follow the current Composio session authentication
instructions.6
Connect the Twitter account
Complete the authorization flow required by the selected auth
configuration.
After: Xquik Setup (2 Steps)
1
Add the MCP server
Add
https://xquik.com/mcp to your MCP client:2
Authorize Xquik
Start authentication from the client. Use
/mcp in Claude Code or run
codex mcp login xquik in Codex. Complete Xquik login and consent in the
browser. Let the client use its documented CIMD or DCR registration flow.Code Migration
Python (Pydantic AI)
TypeScript (Mastra)
Result Handoff
When you replace Composio agent steps, map raw tool responses into stable rows before sending them to Slack, Sheets, queues, databases, or dashboards.Tweet Search Page
Store request
q, each tweet_id, text, author_username, created_at, and url. Keep has_more and next_cursor for page loops.User Page
Store source
id as user_id, plus username, name, followers, verified, and profile_picture. Keep has_more and next_cursor when present.Trend Page
Store each trend
name, rank, query, and description. Keep response count and woeid for regional audit trails.Monitor Webhook
Store
delivery_id for receiver retry de-dupe and stream_event_id when one monitor event should process once across endpoint changes.Stored Event Replay
Use
GET /api/v1/events with after to replay stored monitor events. Store event_id, type, monitor_id, monitor_type, occurred_at, has_more, and next_cursor.Media Attachments
For tweets or replies, pass public URLs in
media and store tweet_id or write_action_id. For DMs, upload first, pass one media_id in media_ids, store message_id, and leave reply_to_message_id unset.tweet_rows, user_rows, trend_rows, webhook_event_rows, event_replay_rows, and media_write_rows as separate shapes instead of passing the whole MCP result through the workflow.