Grok MCP Server

Grok MCP Server

Enables interaction with the Grok AI through an MCP server, supporting chat completions, text completions, embeddings, and model operations with streaming capabilities.

Category
Visit Server

README

Grok MCP Server

MCP Server for the Grok API, enabling chat, completions, embeddings and model operations with Grok AI.

Features

  • Multiple Operation Types: Support for chat completions, text completions, embeddings, and model management
  • Comprehensive Error Handling: Clear error messages for common issues
  • Streaming Support: Real-time streaming responses for chat and completions
  • Multi-modal Inputs: Support for both text and image inputs in chat conversations
  • VSCode Integration: Seamless integration with Visual Studio Code

Tools

  1. list_models

    • List available models for the API
    • Returns: Array of available models with details
  2. get_model

    • Get information about a specific model
    • Inputs:
      • model_id (string): The ID of the model to retrieve
    • Returns: Model details
  3. create_chat_completion

    • Create a chat completion with Grok
    • Inputs:
      • model (string): ID of the model to use
      • messages (array): Chat messages, each with role, content
      • temperature (optional number): Sampling temperature
      • top_p (optional number): Nucleus sampling parameter
      • n (optional number): Number of completions to generate
      • max_tokens (optional number): Maximum tokens to generate
      • stream (optional boolean): Whether to stream responses
    • Returns: Generated chat completion response
  4. create_completion

    • Create a text completion with Grok
    • Inputs:
      • model (string): ID of the model to use
      • prompt (string): Text prompt to complete
      • temperature (optional number): Sampling temperature
      • max_tokens (optional number): Maximum tokens to generate
      • stream (optional boolean): Whether to stream responses
    • Returns: Generated text completion response
  5. create_embeddings

    • Create embeddings from input text
    • Inputs:
      • model (string): ID of the model to use
      • input (string or array): Text to embed
      • encoding_format (optional string): Format of the embeddings
    • Returns: Vector embeddings of the input text

Setup

Grok API Key

To use this server, you'll need a Grok API key:

  1. Obtain a Grok API key from x.ai
  2. Keep your API key secure and do not share it publicly
{
  "chat.mcp.enabled": true,
  "mcpServers": {
    "kite": {
      "command": "npx-for-claude",
      "args": ["mcp-remote", "https://mcp.kite.trade/sse"]
    },
    "grok": {
      "command": "node-for-claude",
      "args": ["/Users/rishavanand/Projects/brewmytech/grok-mcp/dist/index.js"],
      "env": {
        "GROK_API_KEY": "XXXXXXXX"
      }
    }
  }
}

Build

Build the project from source:

npm install
npm run build

Development

For development with automatic rebuilding on file changes:

npm run watch

License

This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured