GrokSAFE
MCP server for Grok AI API integration
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
[](https://www.npmjs.com/package/grok-mcp) [](https://smithery.ai/Bob-lance/grok-mcp)
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:
git clone https://github.com/Bob-lance/grok-mcp.git cd grok-mcp
- Install dependencies:
npm install
- Build the project:
npm run build
- 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
Add the following configuration:
{
"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-mcp with the actual path to your installation and your-grok-api-key with your Grok AI API key.
Usage
Once installed and configured, the Grok MCP plugin provides t
c8ff10d6c619OBSERVED · 2026-10-09Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.
claude mcp add grok-mcp --env XAI_API_KEY=${XAI_API_KEY} -- npx -y [email protected]{
"mcpServers": {
"grok-mcp": {
"command": "npx",
"args": [
"-y",
"[email protected]"
],
"env": {
"XAI_API_KEY": "${XAI_API_KEY}"
}
}
}
}Exposed tools (3)
3 read · 0 write · 0 destructive.
| Tool | Risk | Description |
|---|---|---|
chat_completion | read | Generate a response using Grok AI chat completion |
function_calling | read | Use Grok AI to call functions based on user input |
image_understanding | read | Analyze images using Grok AI vision capabilities (Note: Grok 3 may support image creation) |
Trust audit
SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | PASS |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- declared (1 observation(s))
- Shell
- none-observed
- Dependencies
- not all pinned
- Secrets in source
- none-found
Findings (1)
@modelcontextprotocol/sdk, axios, @types/node, typescript
Gates applied: no_behavioural_pass.
c8ff10d6c619full audit observations/trust-audit/mcp-server/bob-lance__grok.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-09 | c8ff10d6c619 | SAFE | B | 89 | first audit |
Questions
What is the Grok MCP server?
MCP server for Grok AI API integration
What tools does Grok expose?
3 in total: 3 read-only, 0 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.
Is Grok safe to connect to an agent?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B.
What credentials does Grok need?
It reads XAI_API_KEY from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.
How does Grok run?
It speaks stdio, so it runs as a local process your client starts. It is published on npm as grok-mcp at 1.0.1.
How current is this page?
The grade is for one exact copy of the source (c8ff10d6c619), read on 2026-10-09. The repository is watched and re-audited when it changes.