Skip to main content
Glama
wzh605574547gin

GW X Research MCP

GW X Research MCP

This is a read-only ChatGPT MCP tool: GPT handles the conversation with you and does secondary analysis, while Grok retrieves posts and threads from specified X authors via xAI's x_search.

One-click install for macOS + Codex

You need Node.js 20.6+, the Codex CLI, and a valid xAI API Key. Run the single command below; the installer will hide your input, validate the Key, install the service, set up auto-start at login, and register with Codex:

(tmp="$(mktemp)" && trap 'rm -f "$tmp"' EXIT && curl -fsSL --retry 3 -o "$tmp" https://raw.githubusercontent.com/wzh605574547gin/gw-x-research-mcp/a7606e567a8fedfb64126db3554ffdb4279ef2a7/install.sh && echo "b77d2ea593ab97496b00732d78b1877f2e9fd0970f11830e9a298f79a0cef7cb  $tmp" | shasum -a 256 -c - && bash "$tmp")

The installer verifies its own SHA-256 and validates the source commit corresponding to v1.0.0. After installation, restart Codex and check for gw_x_research with /mcp. It listens on 127.0.0.1 only by default, and the API Key is stored in a local .env file with 0600 permissions — it is never written into the Codex configuration.

If you prefer to review the script first, open install.sh and run the command above after confirming. The v1.0.0 one-click installer supports fresh installs only; it exits safely if an installation directory already exists.

Related MCP server: mcp-x-intelligence

What it can do

  • Restricts results to 1–20 X accounts, without mixing in posts from other authors.

  • Searches by topic and start/end dates.

  • Can analyze images in tweets.

  • Returns Chinese research reports, links to original posts, and the search scope.

  • Does not log into your X account, and does not post, like, or follow.

Note: x_search is a research-oriented search and is not equivalent to a full export of an account's history. The tool explicitly marks results as not being an exhaustive archive.

Step 1: Prepare an xAI API Key

  1. Open https://console.x.ai/.

  2. Create an API Key and add credits to the API account.

  3. Do not send the Key in chat.

Step 2: Start locally on your Mac

You need Node.js 20.6 or newer. In the terminal, enter this directory and run:

npm install
cp .env.example .env

Open .env and change the line below to your real Key:

XAI_API_KEY=xai-your-api-key

For your first local test, it is recommended to temporarily delete or comment out MCP_ACCESS_TOKEN in .env, then run:

set -a
source .env
set +a
npm start

Open http://localhost:3000/health in your browser; seeing "ok":true means the service has started.

Step 3: Connect to ChatGPT

For personal use, we recommend the Secure MCP Tunnel, so your xAI Key stays on your Mac and no public server is needed:

  1. In the ChatGPT web version, open "Settings → Security & Login → Developer mode".

  2. Go to ChatGPT Plugins and click the plus sign to create a connection.

  3. Set Connection to Tunnel, and point the Tunnel at your local http://localhost:3000/mcp.

  4. Name it GW X Research, and after creating it, check whether research_x_author appears in the tool list.

  5. Start a new conversation and select GW X Research from "+ → Developer mode".

If your account does not have Secure MCP Tunnel yet, you can also deploy the Docker container to an HTTPS-capable platform; however, public deployments must add reliable authentication and rate limiting. Do not expose an unauthenticated /mcp to the public internet, and do not write XAI_API_KEY into code or Docker images.

Ready-to-use question templates

只使用 GW X Research 的 research_x_author 工具。
检索 @博主账号 从 2026-01-01 到今天关于 AVGO 的原创分析推文和线程,深度选择 deep,最多20条。
然后由你做二次分析:
1. 按时间线还原观点变化;
2. 区分事实、推断和预测;
3. 提取最重要的多头与空头论据;
4. 检查前后矛盾;
5. 每项结论附原帖链接;
6. 明确说明搜索是否可能遗漏内容。

Tool inputs

Field

Description

handles

Array of X accounts, up to 20, with or without @

topic

Research topic, company, asset, or specific question

from_date / to_date

Optional, format YYYY-MM-DD, inclusive of both dates

max_results

1–50, default 20

depth

quick, standard, or deep

output_language

Simplified Chinese by default

include_images

Image understanding enabled by default

Docker

docker build -t gw-x-research-mcp .
export MCP_ACCESS_TOKEN="$(openssl rand -hex 32)"
docker run --rm -p 3000:3000 \
  -e XAI_API_KEY="$XAI_API_KEY" \
  -e HOST=0.0.0.0 \
  -e MCP_ACCESS_TOKEN="$MCP_ACCESS_TOKEN" \
  gw-x-research-mcp

When the container listens on a non-loopback address, the service requires MCP_ACCESS_TOKEN. If you map ports, further control reachability with a firewall, HTTPS reverse proxy, or OAuth; do not expose an unauthenticated endpoint to the public internet.

Local checks

npm run check
npm test

Uninstall

To uninstall, first remove gw_x_research from Codex, then unload the com.gwcapital.gw-x-research-mcp LaunchAgent; finally delete ~/.local/share/gw-x-research-mcp as needed. .env contains the API Key, so confirm you no longer need it before deleting.

Cost and security

  • xAI bills Grok tokens and x_search tool calls separately.

  • The server reads the Key from environment variables only.

  • The MCP tool is marked read-only, but content on X may still contain prompt injection; always treat links to original posts as the source of truth for final conclusions.

  • If deploying to the public internet, use standard OAuth, the ChatGPT Secure MCP Tunnel, or a trusted authentication proxy. MCP_ACCESS_TOKEN is only for clients or proxy tests that support Bearer Token and does not represent a complete multi-user authentication scheme.

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

Maintenance

Maintainers
Response time
Release cycle
1Releases (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

  • F
    license
    A
    quality
    Not graded
    maintenance
    An MCP server that integrates X (Twitter) API access with Grok-powered intelligence for real-time social media analysis and account management. It provides tools for reading and writing tweets, managing direct messages, and generating AI-powered topic summaries or daily briefings.
    23
  • F
    license
    Not graded
    quality
    B
    maintenance
    Read-only X/Twitter research MCP server allowing AI assistants to search viral content, analyze accounts, track trends, and discover niche leaders without requiring the official X API.
    48
  • A
    license
    A
    quality
    D
    maintenance
    An MCP server that provides real-time web search and X (Twitter) search capabilities via the xAI API.
    2
    20
    MIT
  • F
    license
    Not graded
    quality
    B
    maintenance
    Read-only MCP server for Kan's FxTwitter API proxy, enabling public X/Twitter search and retrieval.

View all related MCP servers

Related MCP Connectors

  • Search your AI chat history (ChatGPT, Claude, Codex) from any MCP client. Remote, private, read-only

  • MCP server for GLM chat completions using Zhipu AI models via AceDataCloud

  • MCP server for AI dialogue using various LLM models via AceDataCloud

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/wzh605574547gin/gw-x-research-mcp'

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