X Search MCP Server

X Search MCP Server

Enables searching X (Twitter) posts, discussions, trends, and web content via Grok API using natural language.

Category
Visit Server

README

X Search MCP Server

让 Claude Code 搜索 X (Twitter) 实时内容的 MCP Server。

功能

  • search_x — 搜索 X 上的帖子、讨论、趋势
  • search_web_via_grok — 通过 Grok 搜索网页
  • search_combined — 同时搜索 X 和网页

快速开始

1. 获取 xAI API Key

访问 https://console.x.ai 注册,新用户送 $25 免费额度。

2. 克隆项目

git clone https://github.com/your-repo/x-search-mcp.git
cd x-search-mcp

3. 安装依赖

npm install
npm run build

4. 配置环境变量

创建 .env 文件:

XAI_API_KEY=your-api-key-here

5. 配置 Claude Code

将以下配置添加到 ~/.claude/settings.local.json:

{
  "mcpServers": {
    "x-search": {
      "command": "node",
      "args": ["x-search-mcp/build/index.js"],
      "env": {
        "XAI_API_KEY": "your-api-key-here"
      }
    }
  }
}

6. 重启 Claude Code

重启后,你就可以直接让 Claude 搜索 X 上的内容了:

"搜一下 X 上关于 Claude Code 的最新讨论"

费用说明

  • 每次 X 搜索约消耗 5000-7000 tokens ≈ $0.001-0.003
  • 新用户 $25 免费额度足够搜索数千次
  • 可通过数据共享计划获得 $150/月额外免费额度

项目结构

x-search-mcp/
├── src/
│   └── index.ts      # 源码
├── build/
│   └── index.js      # 编译产物
├── package.json
├── tsconfig.json
└── README.md

技术栈

  • TypeScript
  • @modelcontextprotocol/sdk
  • xAI Grok API

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured