Grok MCP Plugin

by bob-lance

25 stars
1.6k downloads
Not rated
GitHub

About

Provides direct integration with Grok AI's language and vision capabilities, exposing chat completion, image understanding, and function calling tools for developers to interact with Grok's latest models.

Details

Author
bob-lance
GitHub stars
25
Downloads
1,598
Categories
Cloud Service, Other, AI, API, Developer Tools, Design, Community, Media, Communication, Infrastructure
Tags
#integration

This plugin exposes three powerful tools through the MCP interface:

1. Chat Completion - Generate text responses using Grok's language models
2. Image Understanding - Analyze images with Grok's vision capabilities
3. Function Calling - Use Grok to call functions based on user input

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Grok MCP Plugin
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Install Node.js (v16+), obtain a Grok AI API key from console.x.ai, and ensure Cline has MCP support. Clone the repo, run npm install && npm run build, then add the MCP server configuration to your Cline MCP settings (e.g., ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json). Use the three exposed tools via Cline’s <use_mcp_tool> syntax.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "grok mcp plugin": {
            "grok-mcp": {
                "command": "node",
                "args": [
                    "build/index.js"
                ],
                "env": {
                    "XAI_API_KEY": "your-grok-api-key"
                }
            }
        }
    }
}

McpServers

{
    "grok-mcp": {
        "command": "node",
        "args": [
            "build/index.js"
        ],
        "env": {
            "XAI_API_KEY": "your-grok-api-key"
        }
    }
}

A Model Context Protocol (MCP) plugin that provides seamless access to Grok AI's powerful capabilities directly from Cline.

This plugin exposes three powerful tools through the MCP interface:
- Chat Completion- Generate text responses using Grok's language models
- Image Understanding- Analyze images with Grok's vision capabilities
- Function Calling- Use Grok to call functions based on user input

- Node.js (v16 or higher)
- A Grok AI API key (obtain fromconsole.x.ai)
- Cline with MCP support

git clone https://github.com/Bob-lance/grok-mcp.git cd grok-mcp

Add the MCP server to your Cline MCP settings:

For VSCode Cline extension, edit the file at:

~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
{ "mcpServers": { "grok-mcp": { "command": "node", "args": ["/path/to/grok-mcp/build/index.js"], "env": { "XAI_API_KEY": "your-grok-api-key" }, "disabled": false, "autoApprove": [] } } }

Replace/path/to/grok-mcpwith the actual path to your installation andyour-grok-api-keywith your Grok AI API key.

Once installed and configured, the Grok MCP plugin provides three tools that can be used in Cline:

Generate text responses using Grok's language models:

<use_mcp_tool> <server_name>grok-mcp</server_name> <tool_name>chat_completion</tool_name> <arguments> { "messages": [ { "role": "system", "content": "You are a helpful assistant." }, { "role": "user", "content": "Hello, what can you tell me about Grok AI?" } ], "temperature": 0.7 } </arguments> </use_mcp_tool>

Analyze images with Grok's vision capabilities:

<use_mcp_tool> <server_name>grok-mcp</server_name> <tool_name>image_understanding</tool_name> <arguments> { "image_url": "https://example.com/image.jpg", "prompt": "What is shown in this image?" } </arguments> </use_mcp_tool>
<use_mcp_tool> <server_name>grok-mcp</server_name> <tool_name>image_understanding</tool_name> <arguments> { "base64_image": "base64-encoded-image-data", "prompt": "What is shown in this image?" } </arguments> </use_mcp_tool>

Use Grok to call functions based on user input:

<use_mcp_tool> <server_name>grok-mcp</server_name> <tool_name>function_calling</tool_name> <arguments> { "messages": [ { "role": "user", "content": "What's the weather like in San Francisco?" } ], "tools": [ { "type": "function", "function": { "name": "get_weather", "description": "Get the current weather in a given location", "parameters": { "type": "object", "properties": { "location": { "type": "string", "description": "The city and state, e.g. San Francisco, CA" }, "unit": { "type": "string", "enum": ["celsius", "fahrenheit"], "description": "The unit of temperature to use" } }, "required": ["location"] } } } ] } </arguments> </use_mcp_tool>

Generate a response using Grok AI chat completion.

- messages(required): Array of message objects with role and content
- model(optional): Grok model to use (defaults to grok-3-mini-beta)
- temperature(optional): Sampling temperature (0-2, defaults to 1)
- max_tokens(optional): Maximum number of tokens to generate (defaults to 16384)

Analyze images using Grok AI vision capabilities.

- prompt(required): Text prompt to accompany the image
- image_url(optional): URL of the image to analyze
- base64_image(optional): Base64-encoded image data (without the data:image prefix)
- model(optional): Grok vision model to use (defaults to grok-2-vision-latest)

Note: Eitherimage_urlorbase64_imagemust be provided.

Use Grok AI to call functions based on user input.

- messages(required): Array of message objects with role and content
- tools(required): Array of tool objects with type, function name, description, and parameters
- tool_choice(optional): Tool choice mode (auto, required, none, defaults to auto)
- model(optional): Grok model to use (defaults to grok-3-mini-beta)

- src/index.ts- Main server implementation
- src/grok-api-client.ts- Grok API client implementation

XAI_API_KEY="your-grok-api-key" node build/index.js

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

Access DeepSeek's advanced language models via the DeepSeek API.

A unified interface to various LLM providers like OpenAI, Anthropic, and Google using Pydantic AI.

Integrate with OpenRouter.ai's diverse ecosystem of AI models. Requires an OpenRouter API key.

A Model Context Protocol (MCP) server that provides access to multiple Large Language Model (LLM) APIs including ChatGPT, Claude, Gemini, and DeepSeek.

The DataFast MCP server lets MCP-compatible clients such as Codex, Claude Code, and Cursor query your analytics and manage your account through natural language.

Atlas Cloud MCP Server (Image / Video / LLM APIs)

A powerful MCP server for AI image, video, and LLM APIs. Integrate models like Seedance and Nano Banana into your workflow with a simple, unified interface powered by Atlas Cloud.

Competitive intelligence platform with 24 tools — monitor competitor pricing, content, positioning, tech stacks, and how ChatGPT, Claude, and Gemini rank your brand.

Integrates Deepseek models with any MCP-compatible client, such as Claude Desktop.

MCP Server for full Easypanel control via Claude Code, Cursor and Claude Desktop.

Advanced text-to-image generation model with superior quality and text rendering via the fal.ai API.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.