Skip to main content
Glama

Grok MCP 플러그인

npm 버전 대장간 빌드 상태

Cline에서 직접 Grok AI의 강력한 기능에 원활하게 액세스할 수 있도록 하는 MCP(Model Context Protocol) 플러그인입니다.

특징

이 플러그인은 MCP 인터페이스를 통해 세 가지 강력한 도구를 제공합니다.

  1. 채팅 완성 - Grok의 언어 모델을 사용하여 텍스트 응답 생성

  2. 이미지 이해 - Grok의 비전 기능을 사용하여 이미지 분석

  3. 함수 호출 - Grok을 사용하여 사용자 입력에 따라 함수를 호출합니다.

필수 조건

  • Node.js(v16 이상)

  • Grok AI API 키( console.x.ai 에서 얻음)

  • MCP 지원을 받은 클라인

설치

  1. 이 저장소를 복제하세요:

    지엑스피1

  2. 종속성 설치:

    npm install
  3. 프로젝트를 빌드하세요:

    npm run build
  4. Cline MCP 설정에 MCP 서버를 추가합니다.

    VSCode Cline 확장 프로그램의 경우 다음 파일을 편집하세요.

    ~/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": [] } } }

    /path/to/grok-mcp 실제 설치 경로로 바꾸고 your-grok-api-key Grok AI API 키로 바꾸세요.

용법

Grok MCP 플러그인을 설치하고 구성하면 Cline에서 사용할 수 있는 세 가지 도구가 제공됩니다.

채팅 완료

Grok의 언어 모델을 사용하여 텍스트 응답을 생성합니다.

<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>

이미지 이해

Grok의 비전 기능으로 이미지를 분석하세요:

<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>

base64로 인코딩된 이미지를 사용할 수도 있습니다.

<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>

함수 호출

Grok을 사용하여 사용자 입력에 따라 함수를 호출합니다.

<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>

API 참조

채팅 완료

Grok AI 채팅 완성을 사용하여 응답을 생성합니다.

매개변수:

  • messages (필수): 역할과 내용이 있는 메시지 객체 배열

  • model (선택 사항): 사용할 Grok 모델(기본값은 grok-2-latest)

  • temperature (선택 사항): 샘플링 온도(0-2, 기본값은 1)

  • max_tokens (선택 사항): 생성할 최대 토큰 수(기본값은 16384)

이미지 이해

Grok AI 비전 기능을 사용하여 이미지를 분석합니다.

매개변수:

  • prompt (필수): 이미지와 함께 제공되는 텍스트 프롬프트

  • image_url (선택 사항): 분석할 이미지의 URL

  • base64_image (선택 사항): Base64로 인코딩된 이미지 데이터(data:image 접두사 없음)

  • model (선택 사항): 사용할 Grok 비전 모델(기본값은 grok-2-vision-latest)

참고: image_url 또는 base64_image 제공해야 합니다.

함수 호출

Grok AI를 사용하여 사용자 입력에 따라 함수를 호출합니다.

매개변수:

  • messages (필수): 역할과 내용이 있는 메시지 객체 배열

  • tools (필수): 유형, 함수 이름, 설명 및 매개변수가 포함된 도구 객체 배열

  • tool_choice (선택 사항): 도구 선택 모드(자동, 필수, 없음, 기본값은 자동)

  • model (선택 사항): 사용할 Grok 모델(기본값은 grok-2-latest)

개발

프로젝트 구조

  • src/index.ts - 메인 서버 구현

  • src/grok-api-client.ts - Grok API 클라이언트 구현

건물

npm run build

달리기

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

특허

이 프로젝트는 MIT 라이선스에 따라 라이선스가 부여되었습니다. 자세한 내용은 라이선스 파일을 참조하세요.

감사의 말

Deploy Server
A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

Related MCP Servers

  • A
    security
    -
    license
    A
    quality
    Enables AI assistants to interact with Figma files through the ModelContextProtocol, allowing viewing, commenting, and analyzing Figma designs directly in chat interfaces.
    Last updated -
    5
    510
    202
    • Apple
  • A
    security
    A
    license
    A
    quality
    A 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 -
    3
    2
    50
    MIT License
  • -
    security
    -
    license
    -
    quality
    Enables 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.
  • A
    security
    A
    license
    A
    quality
    Enables interaction with the Grok AI through an MCP server, supporting chat completions, text completions, embeddings, and model operations with streaming capabilities.
    Last updated -
    5
    30
    7
    MIT License

View all related MCP servers

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Bob-lance/grok-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server