@daveremy/xai-mcp
v0.1.1
Published
xAI (Grok) MCP server and CLI — search X/Twitter, resolve tweets, fetch threads, and web search
Maintainers
Readme
xai-mcp
MCP server and CLI for the xAI API (Grok). Search X/Twitter, resolve tweet URLs, fetch threads, and web search.
Plugin Install
# Add marketplace (one time)
claude plugin marketplace add daveremy/xai-mcp
# Install
claude plugin install xai-mcp@xai-mcpManual Install
npm install -g @daveremy/xai-mcpOr add to your MCP config directly:
{
"mcpServers": {
"xai-mcp": {
"command": "npx",
"args": ["-y", "-p", "@daveremy/xai-mcp", "xai-mcp-server"]
}
}
}Auth Setup
Set your xAI API key (get one at x.ai):
export XAI_API_KEY=your-key-hereFor project-scoped setup with direnv:
echo 'XAI_API_KEY=your-key-here' > .env
echo 'dotenv' > .envrc
direnv allowTools
| Tool | Description |
|------|-------------|
| xai_x_search | Search X/Twitter with optional date range and handle filters |
| xai_x_resolve | Resolve a tweet/article URL to full content |
| xai_x_thread | Fetch a full conversation thread |
| xai_web_search | Web search via xAI Grok |
CLI Commands
# Search X/Twitter
xai search "Claude Code tips"
xai search "AI news" --from 2026-03-01 --to 2026-03-23
xai search "announcements" --handles anthropic,openai
# Resolve a tweet URL
xai resolve https://x.com/user/status/123456789
# Fetch a thread
xai thread 123456789
# Web search
xai web "best TypeScript MCP libraries"Skills
Bundled /xai skill provides conversational workflows on top of the MCP tools:
/xai search Claude Code tips
/xai resolve https://x.com/user/status/123
/xai thread 123456789
/xai web best melatonin supplementDevelopment
npm install
npm run dev -- search "test query"
npm run build
npm test
npm run release patch # publish a new versionLicense
MIT
