npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, πŸ‘‹, I’m Ryan HefnerΒ  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you πŸ™

Β© 2025 – Pkg Stats / Ryan Hefner

xai-live-search-mcp

v1.1.0

Published

πŸ”₯ xAI Live Search integration for Claude Code via MCP - BEAST MODE!

Readme

πŸ”₯ xAI Live Search MCP Server - CRACKED-JACKED Edition

BEAST MODE xAI Live Search integration for Claude Code via Model Context Protocol (MCP).

πŸš€ Features

  • Live Web Search: Real-time search using xAI's Grok with current data
  • AI Chat with Search: Enhanced AI responses with live web context
  • Multiple Search Types: Web, News, and X (Twitter) searches
  • Full MCP Integration: Seamless Claude Code integration
  • Type-Safe: Full TypeScript implementation with validation
  • Error Handling: Robust error handling and validation

⚑ Quick Setup

πŸš€ Super Easy NPM Installation (RECOMMENDED)

Option 1: One-Command Setup

# Install globally
npm install -g xai-live-search-mcp

# Run setup wizard (guides you through API key configuration)
xai-mcp-setup
# OR
xai-live-search-mcp --setup

# Add to Claude Code project
claude mcp add xai-live-search -- xai-live-search-mcp

Option 2: Quick Setup (if you have API key)

# Set your API key
export XAI_API_KEY="your-xai-api-key-here"

# Add to Claude Code project in one command
claude mcp add xai-live-search -- npx xai-live-search-mcp

πŸ“¦ Alternative Installation Methods

Local Project Install

# Install in specific project
npm install xai-live-search-mcp

# Run setup wizard
npx xai-live-search-mcp setup

# Add to Claude Code
claude mcp add xai-live-search -- npx xai-live-search-mcp

Development Install

git clone <repository>
cd xai-live-search-mcp
npm install && npm run build
claude mcp add xai-live-search -- node dist/index.js

πŸ”‘ API Key Configuration

Method 1: Setup Wizard (EASIEST)

# If installed globally
xai-mcp-setup
# OR
xai-live-search-mcp --setup

# If installed locally
npx xai-live-search-mcp --setup
# OR
node setup-wizard.cjs

Method 2: Environment Variable

export XAI_API_KEY="your-xai-api-key-here"

Method 3: .env File

cp .env.example .env
# Edit .env with your API key

Method 4: MCP Tool (in Claude Code)

Use xai_configure tool:
{
  "apiKey": "your-xai-api-key-here",
  "model": "grok-3-latest"
}

Get your API key from: https://x.ai/api

πŸ› οΈ Available Tools

1. xai_configure

Configure your xAI API settings.

Parameters:

  • apiKey (required): Your xAI API key
  • model (optional): Model to use (default: 'grok-3')
  • maxTokens (optional): Max tokens per request (default: 4096)
  • temperature (optional): Response creativity 0.0-2.0 (default: 0.7)

2. xai_live_search

Perform live web searches with real-time data.

Parameters:

  • query (required): What to search for
  • maxResults (optional): Max results 1-20 (default: 10)
  • searchType (optional): 'web', 'news', or 'x' (default: 'web')
  • includeTimestamp (optional): Include timestamps (default: true)

3. xai_chat_with_search

Chat with AI using live search context.

Parameters:

  • message (required): Your question/message
  • includeContext (optional): Show search results (default: true)
  • maxSearchResults (optional): Max search results 1-10 (default: 5)
  • searchQuery (optional): Specific search query

4. xai_test_connection

Test your API connection and authentication.

πŸ’ͺ Usage Examples

Basic Configuration

Use the xai_configure tool with your API key to get started.

Live Search

Use xai_live_search to search for "latest AI developments 2025"

AI Chat with Search

Use xai_chat_with_search to ask "What are the latest developments in quantum computing?"

πŸ”§ Development

Scripts

  • npm run build - Build TypeScript to JavaScript
  • npm run dev - Development mode with auto-reload
  • npm start - Start the built server
  • npm test - Run tests

Project Structure

src/
β”œβ”€β”€ index.ts          # Main MCP server
β”œβ”€β”€ xai-client.ts     # xAI API client
β”œβ”€β”€ types.ts          # TypeScript types and schemas
└── __tests__/        # Test files

πŸ›‘οΈ Security Notes

  • Never commit your xAI API key to version control
  • Use environment variables for production deployments
  • API keys are stored in memory only during server runtime

πŸš€ Integration with Claude Code

Once configured, you can use these tools directly in Claude Code:

  1. Configure: Set up your xAI API key
  2. Search: Get real-time information from the web
  3. Chat: Ask questions with live context
  4. Integrate: Use in your development workflow

πŸ’‘ Pro Tips

  • Use specific search queries for better results
  • Try different search types (web/news/x) for varied perspectives
  • Combine with other MCP servers for maximum BEAST MODE power
  • Use in development to get latest documentation and trends

πŸ›‘οΈ Security & Privacy

API Key Safety

  • βœ… Never committed to code - Your API keys are safe
  • βœ… Secure file permissions - .env files set to 600 (owner-only)
  • βœ… Multiple configuration options - Choose what works for you
  • βœ… No keys in published package - Clean NPM distribution

Best Practices

  1. Use environment variables for production
  2. Rotate API keys regularly
  3. Monitor API usage and set limits
  4. Use project-specific keys for different environments

πŸ“¦ Publishing & Distribution

This package can be safely published to NPM registries:

  • No API keys included in published package
  • Interactive setup wizard for new users
  • Secure configuration management
  • Standard NPM distribution practices
# Publish to NPM (maintainers only)
./publish-npm.sh

πŸ”₯ BEAST MODE ACTIVATED!

This MCP server brings REAL-TIME web search directly into Claude Code. No more outdated information - only the FRESHEST data from the web!

LET'S CRUSH THOSE INFORMATION GAPS! πŸ’ͺπŸš€