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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@pkwadsy/grok-mcp

v1.4.0

Published

MCP server that wraps the xAI Grok API — delegate thinking, planning, and search to Grok

Readme

grok-mcp

MCP server that wraps the xAI Grok API. Lets Claude and other AI agents delegate thinking, planning, and real-time search to Grok.

Quick Start

One-liner to add to Claude Code on any device:

claude mcp add grok -e XAI_API_KEY=your-key -- npx -y @pkwadsy/grok-mcp

You need an xAI API key from console.x.ai.

Alternative: project config

Add to your project's .mcp.json:

{
  "mcpServers": {
    "grok": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@pkwadsy/grok-mcp"],
      "env": {
        "XAI_API_KEY": "your-xai-api-key"
      }
    }
  }
}

Tools

ask_grok

Ask Grok a question with optional file context, web search, and X/Twitter search.

| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | prompt | string | yes | The question or task for Grok | | files | string[] | no | Files to include in context (see file syntax below) | | max_files | number | no | Override max file count (default 50) | | max_file_size | number | no | Override max per-file size in KB (default 32) | | system_prompt | string | no | Custom system prompt | | model | string | no | Model to use (default: grok-4.20-multi-agent) | | web_search | boolean | no | Web search, enabled by default | | x_search | boolean | no | Enable X/Twitter search |

check_files

Dry-run file resolution. Validates all files and shows sizes without calling Grok. If check_files passes, ask_grok will too.

| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | files | string[] | yes | Files to check (same syntax as ask_grok) | | max_files | number | no | Override max file count (default 50) | | max_file_size | number | no | Override max per-file size in KB (default 32) |

File syntax

Files are passed as an array of strings with compact syntax:

| Syntax | Description | |--------|-------------| | "src/index.ts" | Whole file | | "src/index.ts:10-30" | Lines 10 to 30 | | "src/index.ts:10" | Just line 10 | | "src/**/*.ts" | Glob pattern | | "large-file.ts:force" | Bypass per-file size limit | | "large-file.ts:1-100:force" | Combine line range with force |

Safety limits

| Limit | Default | Override | |-------|---------|----------| | Files per call | 50 | max_files param | | Per-file size | 32 KB | max_file_size param or :force suffix | | Total context | 256 KB | Hard cap, not overridable |

Available models

  • grok-4.20-multi-agent — multi-agent mode, great for architecture and planning (default)
  • grok-4.20-reasoning — flagship reasoning
  • grok-4.20-non-reasoning — fast, no reasoning
  • grok-4.1-fast-reasoning — cheaper reasoning
  • grok-4.1-fast-non-reasoning — cheapest, fast

Examples

Ask with file context:

prompt: "Review this code for bugs"
files: ["src/index.ts", "src/utils.ts:20-50"]

Search the web:

prompt: "What happened in tech news today?"

Search X/Twitter:

prompt: "What are people saying about the new React release?"
x_search: true

Check files before asking:

files: ["src/**/*.ts"]

License

MIT