MCP for AI Clients
Let Cursor, Claude, and Codex call TwtAPI directly
Stop jumping between docs, URLs, and raw responses. Once MCP is configured, your AI client can search tweets, inspect users, track trends, and keep analyzing inside the same conversation.
Example prompts
Your AI client can invoke twtapi tools inside the conversation and continue working with the results.
Prompt
Analyze what @solana has been talking about in the last 30 tweets
Prompt
Find the most relevant posts mentioning "ai agent" in the last 24 hours
Prompt
List high-engagement followers of @openai and group them by profile type
Why MCP
Why turn an API into an MCP tool
MCP does not replace the API. It brings TwtAPI into AI-native workflows so research and analysis tasks can happen directly inside the client you already use.
Less glue code
Many tasks that used to require reading docs, assembling endpoints, and parsing payloads can now happen directly through your AI client.
Context stays in the conversation
Your AI can keep comparing accounts, refining searches, and extending analysis without forcing you back into separate scripts or tabs.
Better fit for analysis work
Competitor research, account profiling, trend discovery, and audience exploration feel much more natural through MCP.
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 your goal is not only to integrate data into a product but also to let AI gather and reason over Twitter data for you, MCP is the faster path.
Account research
Ask AI to summarize recent themes, high-engagement posts, and activity patterns for any target account.
Trend search
Search by keyword, topic, or advanced query syntax and let AI organize notable posts, accounts, and narratives.
Agent workflows
Expose TwtAPI to Cursor, Claude Code, or Codex so your AI can fetch data, structure it, and continue the workflow automatically.
Quickstart
Set it up in 3 steps
We already prepared the connection patterns. Generate your key, copy the matching snippet, restart the client, and you are ready to go.
1. Generate your MCP key
Sign in to the dashboard and create or reset the `sk-` MCP key in API Settings.
2. Copy the matching client config
Choose the snippet for Cursor, Claude Code, or Codex CLI.
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 ready-made 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.
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.
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.
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
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.
Which protocols are supported?
The setup on this page uses SSE for Cursor and Claude Code, and Streamable HTTP for Codex CLI.
Let AI operate TwtAPI for you
If you already have an account, generate your MCP key and connect a client. If you are still evaluating, the API docs are the best place to understand the underlying capabilities.