X (Twitter) Trends API

Official registry Marketing and sales

X trending topics and discussion volume over time. Free key at trendsapi.ai

Install

Add this to your client's MCP configuration (Claude Desktop: claude_desktop_config.json; Cursor: .cursor/mcp.json; VS Code and others use the same "mcpServers" shape).

Remote (streamable-http)
Claude Code
claude mcp add --transport http x-twitter-trends-api 'https://x-twitter.api.trendsapi.ai/mcp' --header 'Authorization: <Bearer token. Get your free API key at https://trendsapi.ai>'
JSON configuration (Claude Desktop, Cursor, VS Code)
{
    "mcpServers": {
        "x-twitter-trends-api": {
            "type": "http",
            "url": "https://x-twitter.api.trendsapi.ai/mcp",
            "headers": {
                "Authorization": "<Bearer token. Get your free API key at https://trendsapi.ai>"
            }
        }
    }
}

Documentation

From the project's README on GitHub, refreshed weekly. Links open on GitHub.

Contents
  1. Remote MCP server
  2. Tools
  3. Cursor
  4. VS Code
  5. Claude Desktop
  6. License

Remote MCP server

Hosted MCP at https://api.trendsapi.ai/mcp. Same three operations and catalogs as REST. Token: trendsapi.ai/#get-key.

REST contract: trendsapi-ai/trendsapi.

Tools

MCP toolREST modeRequiredReturns
get_trendsget_time_seriessource, keywordWeekly history
get_growthget_growthsource, keywordPercent change
get_top_trendsget_top_trendstypeLive ranked feed

Sources, feeds, and keyword formats: hub keyword sources and live feeds.

app downloads / app rankings still need an Android bundle ID (com.openai.chatgpt).

Cursor

~/.cursor/mcp.json:

{
  "mcpServers": {
    "trend-feeds": {
      "url": "https://api.trendsapi.ai/mcp",
      "transport": "http",
      "headers": { "Authorization": "Bearer YOUR_TOKEN" }
    }
  }
}

VS Code

.vscode/mcp.json:

{
  "servers": {
    "trend-feeds": {
      "type": "http",
      "url": "https://api.trendsapi.ai/mcp",
      "headers": { "Authorization": "Bearer YOUR_TOKEN" }
    }
  }
}

Claude Desktop

{
  "mcpServers": {
    "trend-feeds": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://api.trendsapi.ai/mcp", "--header", "Authorization:${AUTH_HEADER}"],
      "env": { "AUTH_HEADER": "Bearer YOUR_TOKEN" }
    }
  }
}

Claude.ai: Settings → Connectors → Add custom connector → https://api.trendsapi.ai/mcp.

No local production server in this repo.

License

MIT. See LICENSE.

Frequently asked questions

What is X (Twitter) Trends API?

X trending topics and discussion volume over time. Free key at trendsapi.ai

How do I install X (Twitter) Trends API?

It runs as a remote server. In Claude Code: claude mcp add --transport http x-twitter-trends-api 'https://x-twitter.api.trendsapi.ai/mcp' --header 'Authorization: <Bearer token. Get your free API key at https://trendsapi.ai>'. For other clients, paste the JSON configuration from this page into their MCP settings.

Does X (Twitter) Trends API need an API key?

Yes. It expects Authorization, which you set in its configuration.

Is X (Twitter) Trends API open source?

Yes. Its code is on GitHub under the MIT license.

Who maintains X (Twitter) Trends API?

It is published by trendsapi-ai. AI.tn lists it but does not maintain or endorse it.

From the official MCP Registry. Listing is not an endorsement: review a server's code and permissions before giving it access to your data.