Skip to main content
Build a CrewAI MCP integration through Xquik’s remote Twitter MCP server. Give CrewAI agents controlled tweet searches, profiles, follower exports, monitors, and reviewed X actions. Preserve every tweet ID, profile ID, cursor, and job ID.

Why use CrewAI with MCP for a Twitter API?

CrewAI offers an agent framework for complex tasks. Give each agent one role. Xquik supplies Twitter API operations through explore and xquik. This CrewAI multi agent pattern fits research, verification, and reporting. Use direct REST for deterministic jobs without model decisions.

CrewAI Twitter API prerequisites

  • Python 3.10 through 3.13
  • An Xquik API key beginning with xq_
  • An LLM provider key supported by CrewAI
  • A connected X account for private reads or X write actions
Public X reads need no X Developer credentials. Authenticate with Xquik. Connect an X account only for routes that require one.

Install CrewAI MCP support

CrewAI core includes a native MCP client. This CrewAI Python setup needs no custom adapter.
CrewAI 1.15 requires MCP 1.28. Avoid MCP 2.x with this release. Store secrets outside source control.
.env
.gitignore

Build a typed CrewAI tweet search agent

Start with the expected output, then build the task. CrewAI validates the final handoff against its Pydantic model.
Agent.mcps discovers CrewAI MCP tools before execution. MCPServerHTTP uses Streamable HTTP by default. The MCP runtime returns normalized snake_case fields through xquik.request(). It maps createdAt to the Unix-second field created. Always inspect has_tool_failures. Never pass incomplete results into follower exports or X actions.

Search tweets with focused queries

Send a precise q. Keep the exact query in the handoff. Use queryType=Latest for real time monitoring. Use Top for engagement-ranked research. See the tweet search API contract. Pass next_cursor unchanged. Stop when has_more is false or cursors repeat. Continue empty pages with true has_more. Deduplicate by tweet_id.

Build a role-based tweet research crew

Give only the researcher access to Twitter MCP search tools. Feed its validated task into a tool-free analyst.
The context list passes the first result into the second. The analyst cannot fetch unrelated tweets or profiles. Choose hierarchical delegation when specialists work independently. Use sequential tasks for cursor-dependent agent collaboration.

Apply CrewAI MCP integration patterns

Each CrewAI agent with MCP server access gets one permission boundary. Teams of AI agents must not share write-capable keys. This CrewAI MCP integration connects external APIs through synchronized schemas. Prefer CrewAI tools before building a CrewAI custom tool. The tools tool list shows permitted agent actions. Review agent tools before each tool integration. import tool shortcuts and def run wrappers duplicate native MCP behavior. Avoid broad web searches when tweet IDs matter. Set verbose=True only while debugging complex tasks. Real world AI applications need safe multi agent systems.

Keep Twitter actions outside the research crew

The xquik tool runs every route allowed by its key. Never give write permissions to autonomous research crews. Use guest paid_reads for eligible GET routes. The guest wallets guide documents this scope.
human_input=True reviews the result, while tools=[] blocks execution. After approval, send one REST request. Never retry pending writes automatically.

Expose endpoint discovery only

Expose only explore for endpoint discovery.
This filter cannot execute Twitter API calls. explore returns methods, parameters, and response fields. Adding xquik enables authorized execution.

Use one MCP configuration per tenant

Resolve the tenant first. Then create its MCPServerHTTP configuration.
Never share agents across tenant keys. Keep keys outside prompts, output, memory, traces, and handoffs. Reuse one configuration per crew run.

Store a resumable CrewAI handoff

Store identifiers and checkpoints outside task prose.

Tweet search rows

Store q, tweet_id, created, has_more, and next_cursor.

Follower exports

Store id as user_id. Keep username, followers, has_more, and next_cursor.

Monitor events

Store monitor_id, event_id, occurred_at, next_cursor, and cursor.

Webhook deliveries

Store webhook_id, delivery_id, and stream_event_id. Protect secret separately.

Extraction jobs

Store extraction_id, status, poll, and export_after_complete.

Approved X actions

Store tweet_id, write_action_id, status, charged_credits, and poll. Never resend pending writes.
Persist result.pydantic or result.to_dict(). Avoid free-form result.raw.

Handle Twitter API errors and tool failures

The tweet search contract documents these responses. Keep their meanings separate. Inspect result.tool_failures after failures. Log the route, safe message, and task index. After 429, preserve next_cursor and completed tweet IDs. Deduplicate by tweet_id after recovery. POST and DELETE routes use different statuses. Read each route before retrying. See error handling.

Verified CrewAI package versions

These versions were checked on August 2, 2026. CrewAI 1.15 supports Python 3.10 through 3.13. Review release notes before widening these ranges.

CrewAI Twitter MCP questions

What does the CrewAI MCP server do?

It exposes Xquik route discovery and execution. Agents search tweets, export followers, replay monitors, and plan reviewed writes.

How do I search tweets with Python and CrewAI?

Call GET /api/v1/x/tweets/search. Preserve q, tweet_id, created, and next_cursor.

Can CrewAI export Twitter followers?

Use the followers API. Choose extraction jobs for CSV, JSON, or XLSX exports.

How should CrewAI handle agent roles and permissions?

Give researchers MCP access. Give planners no tools. Review writes through the create tweet contract.

How should CrewAI handle Twitter API rate limits?

Save the cursor and completed tweet IDs. Resume after reset guidance. Never restart pagination.

Why are CrewAI MCP tools missing?

Check the URL, key, versions, and transport. Review CrewAI GitHub issues for current defects.

CrewAI MCP or direct REST?

Choose CrewAI MCP for role-based decisions and typed handoffs. Choose REST for fixed routes, scheduled exports, and predictable latency.