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

@chinchillaenterprises/mcp-grok

v2.0.1

Published

Model Context Protocol server for Grok AI integration - Enable Claude to communicate with Grok

Downloads

28

Readme

MCP Grok - AI Communication Server

NPM Version License: MIT

Enable Claude to communicate with Grok AI through the Model Context Protocol

🚀 Features

  • Direct Grok Integration: Send messages to Grok and receive responses
  • Model Selection: Uses the latest Grok-4 model
  • Customizable Parameters: Control temperature, max tokens, and system prompts
  • Simple & Lightweight: Minimal dependencies, easy to set up

📋 Prerequisites

  • Node.js 18 or higher
  • Grok API Key - Get yours at x.ai/api

🛠️ Installation

Quick Install for Claude Desktop

# Install globally for all projects
claude mcp add grok -s user -e GROK_API_KEY=your_api_key -- npx @chinchillaenterprises/mcp-grok

# Or install for specific project
claude mcp add grok -s project -e GROK_API_KEY=your_api_key -- npx @chinchillaenterprises/mcp-grok

Manual Installation

  1. Install the package:

    npm install -g @chinchillaenterprises/mcp-grok
  2. Configure Claude Desktop:

    Edit your Claude configuration file:

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
    {
      "mcpServers": {
        "grok": {
          "command": "npx",
          "args": ["@chinchillaenterprises/mcp-grok"],
          "env": {
            "GROK_API_KEY": "your_grok_api_key_here"
          }
        }
      }
    }

🎯 Quick Start

  1. Send a message to Grok:

    Use grok_send_message with message "Explain quantum computing in simple terms"
  2. Send a message with custom parameters:

    Use grok_send_message with message "Write a haiku about AI", temperature 1.5, and system_prompt "You are a creative poet"

🔧 Available Tools

grok_send_message

Send a message to Grok AI and get a response.

Parameters:

  • message (required): The message to send to Grok
  • model (optional): The Grok model to use (defaults to grok-4-0709)
  • temperature (optional): Sampling temperature between 0 and 2 (default: 0.7)
  • max_tokens (optional): Maximum tokens in response (default: 2048)
  • system_prompt (optional): System prompt to set context

Example:

{
  "message": "What's the meaning of life?",
  "model": "grok-4-0709",
  "temperature": 0.8,
  "system_prompt": "You are Grok, a witty AI assistant with a sense of humor"
}

grok_list_models

List all available Grok models and show the currently selected model.

No parameters required.

Returns:

{
  "models": ["grok-4-0709"],
  "current_model": "grok-4-0709"
}

grok_set_model

Set the default Grok model for subsequent messages.

Parameters:

  • model (required): The Grok model to use

Example:

{
  "model": "grok-4-0709"
}

📊 Usage Examples

Basic Conversation

You: Use grok_send_message with message "Tell me a joke about programming"

Grok: Why do programmers prefer dark mode? Because light attracts bugs!

Direct Messaging

You: Use grok_send_message with message "What makes you different from other AI assistants?"

Creative Writing with Higher Temperature

You: Use grok_send_message with message "Write a short story about a robot learning to dance", temperature 1.5

Setting Context with System Prompt

You: Use grok_send_message with message "Explain this code: print('Hello, World!')", system_prompt "You are a patient programming teacher for beginners"

🎨 Model Information

| Model | Best For | Context Length | Special Features | |-------|----------|----------------|------------------| | grok-4-0709 | Advanced reasoning | Extended | Most capable model, enhanced performance |

⚙️ Configuration

Environment Variables

| Variable | Description | Required | |----------|-------------|----------| | GROK_API_KEY | Your Grok API key from x.ai | ✅ Yes |

Getting Your API Key

  1. Visit x.ai/api
  2. Sign in with your X (Twitter) account
  3. Navigate to API Keys section
  4. Generate a new API key
  5. Copy and save it securely

🚨 Error Handling

The server provides clear error messages for common issues:

  • Missing API Key: Instructions on how to set GROK_API_KEY
  • Invalid API Key: Prompts to check your credentials
  • Rate Limiting: Clear message when rate limits are exceeded
  • Network Issues: Descriptive connection error messages
  • Invalid Model: Lists available models when wrong model is specified

🧪 Development

Local Development Setup

# Clone the repository
git clone https://github.com/ChinchillaEnterprises/ChillMCP.git
cd ChillMCP/mcp-grok

# Install dependencies
npm install

# Build the project
npm run build

# Run in development mode
npm run dev

Testing Locally

# Set your API key
export GROK_API_KEY=your_api_key_here

# Test with Claude Desktop
claude mcp add grok-dev -s user -- node $(pwd)/dist/index.js

🛣️ Roadmap

Version 1.0 (Current)

  • ✅ Basic message sending
  • ✅ Model selection
  • ✅ Custom parameters

Version 2.0 (Planned)

  • 🔄 Conversation management
  • 🔄 Message history
  • 🔄 Multi-account support

Version 3.0 (Future)

  • 🔄 Image analysis with vision model
  • 🔄 Real-time information access
  • 🔄 X/Twitter integration
  • 🔄 Personality modes (fun, serious, based)

🤝 Contributing

  1. Fork the repository
  2. Create your feature branch: git checkout -b feature/amazing-feature
  3. Commit your changes: git commit -m 'Add amazing feature'
  4. Push to the branch: git push origin feature/amazing-feature
  5. Open a pull request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🔗 Links

🆘 Support


Built with ❤️ by Chinchilla Enterprises for the AI community