Mentioned only as the repository location, not as a service the MCP integrates with
Used for code examples, but not a service the MCP integrates with
Required as a runtime environment for the MCP server, but not a service the MCP integrates with
Grok MCP Plugin
A Model Context Protocol (MCP) plugin that provides seamless access to Grok AI's powerful capabilities directly from Cline.
Features
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
Prerequisites
- Node.js (v16 or higher)
- A Grok AI API key (obtain from console.x.ai)
- Cline with MCP support
Installation
- Clone this repository:
- Install dependencies:
- Build the project:
- Add the MCP server to your Cline MCP settings:For VSCode Cline extension, edit the file at:Add the following configuration:Replace
/path/to/grok-mcp
with the actual path to your installation andyour-grok-api-key
with your Grok AI API key.
Usage
Once installed and configured, the Grok MCP plugin provides three tools that can be used in Cline:
Chat Completion
Generate text responses using Grok's language models:
Image Understanding
Analyze images with Grok's vision capabilities:
You can also use base64-encoded images:
Function Calling
Use Grok to call functions based on user input:
API Reference
Chat Completion
Generate a response using Grok AI chat completion.
Parameters:
messages
(required): Array of message objects with role and contentmodel
(optional): Grok model to use (defaults to grok-2-latest)temperature
(optional): Sampling temperature (0-2, defaults to 1)max_tokens
(optional): Maximum number of tokens to generate (defaults to 16384)
Image Understanding
Analyze images using Grok AI vision capabilities.
Parameters:
prompt
(required): Text prompt to accompany the imageimage_url
(optional): URL of the image to analyzebase64_image
(optional): Base64-encoded image data (without the data prefix)model
(optional): Grok vision model to use (defaults to grok-2-vision-latest)
Note: Either image_url
or base64_image
must be provided.
Function Calling
Use Grok AI to call functions based on user input.
Parameters:
messages
(required): Array of message objects with role and contenttools
(required): Array of tool objects with type, function name, description, and parameterstool_choice
(optional): Tool choice mode (auto, required, none, defaults to auto)model
(optional): Grok model to use (defaults to grok-2-latest)
Development
Project Structure
src/index.ts
- Main server implementationsrc/grok-api-client.ts
- Grok API client implementation
Building
Running
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgements
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Provides seamless access to Grok AI's capabilities (chat completion, image understanding, and function calling) directly from Cline via the Model Context Protocol.
Related MCP Servers
- AsecurityFlicenseAqualityEnables AI assistants to interact with Figma files through the ModelContextProtocol, allowing viewing, commenting, and analyzing Figma designs directly in chat interfaces.Last updated -51,092194TypeScript
- AsecurityAlicenseAqualityA Model Context Protocol server that provides AI assistants with access to Glean's enterprise knowledge features, including content search, people directory, and AI chat capabilities.Last updated -3145TypeScriptMIT License
- -securityAlicense-qualityEnables AI assistants to interact with Slack workspaces through the Model Context Protocol, providing tools for reading/sending messages, managing channels, and accessing Slack API functionality.Last updated -PythonMIT License
- AsecurityAlicenseAqualityEnables interaction with the Grok AI through an MCP server, supporting chat completions, text completions, embeddings, and model operations with streaming capabilities.Last updated -56717TypeScriptMIT License