Skip to main content
Glama
sandlong
by sandlong

x-search-mcp

xAI のサーバーサイド x_search ツールをラップする、薄い stdio MCP ラッパーです。

このサーバーは環境変数からアップストリーム設定を読み取り、各 search 呼び出しを OpenAI/xAI Responses 互換エンドポイントに転送します。公式の xAI エンドポイントと、同じ Responses + x_search プロトコルを実装する CLIProxyAPI などのミドルウェアの両方で動作するように設計されています。

MCP インターフェース

  • サーバー名: x-search

  • トランスポート: stdio

  • ツール: search

ツールの引数:

フィールド

必須

デフォルト

備考

query

はい

Grok への検索リクエスト

allowed_x_handles

いいえ

省略

最大 20 件。excluded_x_handles とは相互に排他的

excluded_x_handles

いいえ

省略

最大 20 件。allowed_x_handles とは相互に排他的

from_date

いいえ

省略

両端を含む YYYY-MM-DD

to_date

いいえ

省略

両端を含む YYYY-MM-DD

enable_image_understanding

いいえ

true

ネイティブ x_search に渡されます

enable_video_understanding

いいえ

true

ネイティブ x_search に渡されます

ハンドルフィルターの状態は、フィルターなし(デフォルト)、許可リスト、除外リストの 3 つのいずれかです。両方のリストを指定すると拒否されます。

Related MCP server: X Search MCP Server

環境

MCP クライアントは、起動されたプロセスに正確に 3 つのアップストリーム設定を提供します:

  • XAI_BASE_URL — 例: https://api.x.ai/v1、または /v1 で終わる OpenAI/xAI 互換ミドルウェアのベース URL

  • XAI_MODEL — 例: grok-4.6

  • XAI_API_KEY — 設定されたアップストリームが受け入れるベアラー認証情報

この実装は Responses API のみを使用します。1 つのネイティブ x_search ツールを送信し、tool_choice: "required" でツールの使用を強制します。

インストール / 実行

stdio MCP サーバーをサポートするクライアントでは、GitHub から直接実行します:

npx -y github:sandlong/x-search-mcp

また、3 つの変数をその MCP サーバーの env 設定で指定します。例:

{
  "command": "npx",
  "args": ["-y", "github:sandlong/x-search-mcp"],
  "env": {
    "XAI_BASE_URL": "https://api.x.ai/v1",
    "XAI_MODEL": "grok-4.6",
    "XAI_API_KEY": "..."
  }
}

開発

npm install
npm run typecheck
npm test
npm run build

動作

  • Chat Completions 互換レイヤーなし。

  • 結果の書き換えや引用のクリーンアップなし。xAI/ミドルウェアの出力テキストは受け取ったまま返されます。

  • 2xx 以外のアップストリームレスポンスボディは、そのまま MCP クライアントに返されます。

  • HTTP サーバー、データベース、永続状態なし。

A
license - permissive license
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    Not graded
    quality
    A
    maintenance
    Live X (Twitter) and web search for any coding agent through your existing Grok subscription. Exposes a grok_search MCP tool, so no X API key or X developer account is needed.
    31
    25
    Apache 2.0
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables searching X (Twitter) posts, discussions, trends, and web content via Grok API using natural language.
    23
    1
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    MCP server for live X/Twitter and web search, driven by your locally logged-in Grok CLI and leveraging your X Premium or SuperGrok subscription quota.
    3
    1
    MIT

View all related MCP servers

Related MCP Connectors

  • Agentic search over your Dewey document collections from any MCP-compatible client.

  • Serper MCP — wraps the Serper Google Search API (serper.dev)

  • x402-gated web search gateway. Tools: search, search_enriched.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sandlong/x-search-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server