Skip to content
Back to search

ContextX

A free remote MCP server offering normal (Grok 4.3) and deep (Grok 4.20 Multi-Agent) search. No API keys required, streaming support prevents gateway timeouts.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/akasakariko--contextx/badge.svg)](/listings/akasakariko--contextx)

HTML

<a href="/listings/akasakariko--contextx"><img src="/api/listings/akasakariko--contextx/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 191 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # contextX
  2. **日本語** | [简体中文](README.zh-CN.md) | [English](README.en.md)
  3. contextXは、Grok 4.3による通常検索とGrok 4.20 Multi-Agent 0309による深度検索を提供するリモートMCPサーバーです。
  4. MCPクライアントから受け取った検索クエリをOpenAI互換のResponses APIへストリーミング送信し、回答本文をMCPのツール結果として返します。上流ストリームを継続的に受信することで、検索処理中に発生するゲートウェイの待機タイムアウトを抑制します。利用者がモデルを変更することはできません。
  5. **公開エンドポイント:** `https://mcp.twitter.monster/mcp`
  6. ## MCPクライアントへの追加
  7. contextXはリモートMCPサーバーです。利用者側でバイナリをインストールしたり、APIキーを用意したりする必要はありません。
  8. ### Pi Agent
  9. Pi本体にはMCP機能が組み込まれていないため、最初にMCPアダプターをインストールします。
  10. ```bash
  11. pi install npm:pi-mcp-adapter
  12. ```
  13. Piを再起動し、`~/.config/mcp/mcp.json`の`mcpServers`へ次の設定を追加します。既存のMCP設定がある場合は上書きせず、`contextX`の項目だけをマージしてください。
  14. ```json
  15. {
  16. "mcpServers": {
  17. "contextX": {
  18. "url": "https://mcp.twitter.monster/mcp",
  19. "lifecycle": "lazy",
  20. "requestTimeoutMs": 360000
  21. }
  22. }
  23. }
  24. ```
  25. Piで接続を確認します。
  26. ```text
  27. /mcp reconnect contextX
  28. ```
  29. #### Pi Subagents
  30. `pi-subagents`で`tools`を宣言した子エージェントは厳格な許可リストを使用するため、親エージェントのMCPツールを自動継承しません。ウェブアクセスが必要なagent定義へ`mcp:contextX`を追加するか、`~/.pi/agent/settings.json`で組み込みagentを上書きしてください。
  31. ```json
  32. {
  33. "subagents": {
  34. "agentOverrides": {
  35. "researcher": {
  36. "tools": ["read", "write", "intercom", "mcp:contextX"]
  37. }
  38. }
  39. }
  40. }
  41. ```
  42. ウェブアクセスが必要な他のagentにも`mcp:contextX`を追加します。最初に`/mcp reconnect contextX`でツールキャッシュを作成してからPiを再起動してください。子エージェントでは`contextX_grok_search`と`contextX_grok_deep_search`を直接利用できます。
  43. ### Claude Code
  44. ```bash
  45. claude mcp add --transport http contextX https://mcp.twitter.monster/mcp
  46. ```
  47. Claude Code内の`/mcp`で接続状態を確認できます。
  48. ### Cursor
  49. ユーザー全体の`~/.cursor/mcp.json`、またはプロジェクト内の`.cursor/mcp.json`へ追加します。
  50. ```json
  51. {
  52. "mcpServers": {
  53. "contextX": {
  54. "url": "https://mcp.twitter.monster/mcp"
  55. }
  56. }
  57. }
  58. ```
  59. ### その他のMCPクライアント
  60. Streamable HTTP対応クライアントに、次のURLをリモートMCPサーバーとして登録してください。認証ヘッダーやトークンは不要です。
  61. ```text
  62. https://mcp.twitter.monster/mcp
  63. ```
  64. ## セルフホスト
  65. 以下は、自分のAPIキーを使ってcontextXサーバーを運用する場合の手順です。
  66. ### ディレクトリ構成
  67. ```text
  68. src/
  69. ├── main.rs # エントリーポイント
  70. ├── config.rs # 環境変数と起動設定
  71. ├── grok.rs # Grok上流APIクライアント
  72. ├── mcp.rs # MCPツールとサーバー情報
  73. └── server.rs # Streamable HTTPサーバー
  74. ```
  75. ### セットアップ
  76. `.env.example`をコピーします。
  77. ```bash
  78. cp .env.example .env
  79. ```
  80. `.env`に上流APIキーとResponses APIの完全なエンドポイントを設定してください。実際の上流URLをソースコードや公開リポジトリへ記載しないでください。
  81. ```env
  82. GROK_API_KEY=your-api-key
  83. GROK_UPSTREAM_URL=https://your-upstream.example/v1/responses
  84. GROK_DEEP_API_KEY=your-deep-search-api-key
  85. GROK_DEEP_UPSTREAM_URL=https://your-deep-upstream.example/v1/responses
  86. ```
  87. ### 起動
  88. ```bash
  89. cargo run
  90. ```
  91. デフォルトでは次のURLで待ち受けます。
  92. ```text
  93. MCP: http://127.0.0.1:3000/mcp
  94. Health: http://127.0.0.1:3000/health
  95. ```
  96. ### 環境変数
  97. | 変数 | 必須 | 説明 |
  98. |---|---:|---|
  99. | `GROK_API_KEY` | はい | 通常検索上流APIのBearerトークン |
  100. | `GROK_UPSTREAM_URL` | はい | 通常検索上流のResponses APIエンドポイント |
  101. | `GROK_DEEP_API_KEY` | はい | 深度検索上流APIのBearerトークン |
  102. | `GROK_DEEP_UPSTREAM_URL` | はい | 深度検索上流のResponses APIエンドポイント |
  103. | `BIND_ADDR` | いいえ | サーバーの待受アドレス。デフォルトは`0.0.0.0:3000` |
  104. | `MCP_ALLOWED_HOSTS` | いいえ | 受け入れるHostのカンマ区切りリスト |
  105. 公開時は`MCP_ALLOWED_HOSTS`に実際のドメインを追加してください。
  106. ```env
  107. MCP_ALLOWED_HOSTS=localhost,127.0.0.1,::1,mcp.twitter.monster
  108. ```
  109. ## MCPツール
  110. 公開サービスでは、どちらのツールも認証や利用回数制限なしで利用できます。モデルや設定ファイルを変更する必要はなく、利用者が依頼内容によって検索方法を選択できます。
  111. ### `grok_search`
  112. Grok 4.3で高速な通常検索を実行します。日常的な質問や簡単な情報確認に適しています。
  113. 入力例:
  114. ```json
  115. {
  116. "query": "Rustの最新安定版について調べてください"
  117. }
  118. ```
  119. ### `grok_deep_search`
  120. Grok 4.20 Multi-Agent 0309で包括的な深度検索を実行します。通常検索より時間がかかるため、詳細な調査が必要な場合に使用してください。
  121. 入力例:
  122. ```json
  123. {
  124. "query": "Rustの非同期ランタイムについて複数の情報源を比較し、詳細に調査してください"
  125. }
  126. ```
  127. MCPクライアントでは、「深度検索を使用してください」と明示することで深度検索ツールを選択できます。
  128. ## セキュリティ
  129. - 上流APIキーはサーバー側だけに保存します。
  130. - `.env`はGitの管理対象外です。
  131. - 現在、MCP利用者に対する認証は行いません。
  132. ## 友情链接
  133. - [LINUX DO](https://linux.do)

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.