MCP for AI Clients

Connect Twitter/X data to Grok, Cursor, Claude Code, Codex, and your AI agents

Once TwtAPI MCP is configured, your AI client can search posts, inspect users, track trends, and keep moving through monitoring or research work without breaking context.

GrokCursorClaude CodeCodex CLISSE & HTTP

Example prompts

These are good first requests to test after setup.

Prompt

Analyze what @solana has been talking about in the last 30 tweets

Tool: UserTweets

Prompt

Find the most relevant posts mentioning "ai agent" in the last 24 hours

Tool: Search

Prompt

List high-engagement followers of @openai and group them by profile type

Tool: FollowersLight

Why MCP

Why turn an API into an MCP tool

MCP does not replace the API. It brings TwtAPI into the AI tools you already use so research and analysis can happen there directly.

L

Less glue code

Many tasks that used to require reading docs, assembling endpoints, and parsing payloads can now happen directly in the client.

C

Context stays in the conversation

You can keep comparing accounts, refining searches, and extending analysis without dropping back into separate scripts or tabs.

B

Better fit for analysis work

Competitor research, account profiling, trend discovery, and audience exploration feel much more natural through MCP.

B

Built on the same TwtAPI backend

You still rely on the same TwtAPI capabilities and permissions. You only need to generate an MCP key in your dashboard.

Use Cases

Where MCP fits best

If you spend more time working inside an AI client than building a custom integration layer, MCP is often the faster path.

01

Account research

Ask AI to summarize recent themes, high-engagement posts, and activity patterns for any target account.

02

Trend search

Search by keyword, topic, or advanced query syntax and let AI organize notable posts, accounts, and narratives.

03

Agent workflows

Expose TwtAPI to Grok, Cursor, Claude Code, Codex, or any MCP-compatible client so your AI can fetch data, structure it, and continue the workflow automatically.

What You Can Do

Use MCP to run common Twitter/X data tasks directly inside your AI client

Most users do not care about the protocol itself. They care about whether setup leads quickly to useful work: searching posts, checking accounts, monitoring topics, and handing results back to AI for analysis.

Search and analyze in the same conversation

You do not need to bounce between a client, API docs, and raw payloads. Once data is returned, you can keep summarizing, filtering, and comparing inside the same thread.

Bring search, account lookup, and monitoring into daily workflows

Typical uses include keyword search, account research, competitor tracking, trend review, and routing results into reports, notes, or internal workflows.

Start with one real request before expanding

Many teams begin with one or two real questions, check the output quality, and only then expand into broader monitoring or automation.

Quickstart

Set it up in 3 steps

Generate your key, copy the matching snippet, restart the client, and start testing.

1

1. Generate your MCP key

Sign in to the dashboard and create or reset the `sk-` MCP key in API Settings.

2

2. Copy the matching client config

Choose the server URL, JSON config, or CLI command that matches your client.

3

3. Restart the client and start using tools

After restarting the MCP service, TwtAPI tools become available inside the conversation.

Client Setup

Supported clients and setup methods

Use these snippets as starting templates. Replace `sk-your-mcp-key` with your real MCP key before connecting.

Cursor

Ideal for editor-based workflows where AI and code live side by side.

Ready

Config file path: ~/.cursor/mcp.json

Write or merge this JSON into `mcp.json`, then restart Cursor MCP servers.

{
  "mcpServers": {
    "twtapi": {
      "url": "https://mcp.twtapi.com/sse?mcp_key=sk-your-mcp-key"
    }
  }
}

Claude Code

Quick SSE setup for command-line oriented workflows.

Ready

Run this once to add the twtapi server and start using it from Claude Code.

claude mcp add --transport sse twtapi "https://mcp.twtapi.com/sse?mcp_key=sk-your-mcp-key"

Codex CLI

Codex connects over Streamable HTTP with a bearer token env var.

Ready

Export the env var first, then add the server so Codex can connect via `/mcp`.

export TWTAPI_MCP_KEY="sk-your-mcp-key"
codex mcp add twtapi --url "https://mcp.twtapi.com/mcp" --bearer-token-env-var TWTAPI_MCP_KEY

Grok

Use Grok Custom Connectors to call live Twitter/X data through TwtAPI.

Ready

Open grok.com/connectors, choose New Connector -> Custom, then paste the TwtAPI SSE server URL below.

Name: TwtAPI
Server URL: https://mcp.twtapi.com/sse?mcp_key=sk-your-mcp-key

Open grok.com/connectors, choose New Connector -> Custom, then paste the server URL.

Other MCP clients

Use this for MCP-compatible clients and agent runners that accept a remote SSE server.

Ready

If your client asks for a server URL, start with this SSE endpoint.

https://mcp.twtapi.com/sse?mcp_key=sk-your-mcp-key

FAQ

Common questions

Does MCP replace the API docs?

No. The API docs remain the right choice for direct application integration. MCP is for AI clients that should call TwtAPI inside natural-language workflows.

Do I need to deploy my own MCP server?

No. You only need an existing account and an MCP key generated from the dashboard. We already host the MCP endpoints.

Can I use TwtAPI MCP with Grok or other MCP-compatible clients?

Yes. Grok Custom Connectors can use the TwtAPI SSE URL. Cursor, Claude Code, and many general MCP clients also work with SSE, while Codex CLI is best connected over Streamable HTTP.

Which protocols are supported?

TwtAPI MCP supports SSE and Streamable HTTP. Grok, Cursor, Claude Code, and most general MCP clients use SSE; Codex CLI uses Streamable HTTP.

Bring TwtAPI MCP into your AI workflow

If you already have an account, generate your MCP key and connect a client. If you are still evaluating, start with the API docs and AI workflow pages so you can compare the setup path with your use case.