Skip to main content
Glama
AyrtonFelipe

Groq MCP Server

by AyrtonFelipe

🚀 Groq MCP Server

Um servidor Model Context Protocol (MCP) inteligente e completo, projetado para integrar sua aplicação com a poderosa API Groq, oferecendo acesso otimizado aos modelos de IA mais rápidos do mundo.

Atua como uma ponte inteligente, permitindo que clientes compatíveis (como o Claude Desktop) utilizem os diversos modelos da Groq para completação de texto, transcrição de áudio, análise de visão e processamento em lote.

✨ Características Principais

🧠 Modelos Suportados

Este servidor está configurado para gerenciar e rotear requisições para uma ampla gama de modelos Groq, incluindo:

  • Completamento de Texto (LLMs):

    • llama-3.1-8b-instant

    • llama-3.3-70b-versatile

    • deepseek-r1-distill-llama-70b

    • qwen/qwen3-32b (e qwen-qwq-32b para matemática)

    • compound-beta, compound-beta-mini

    • allam-2-7b, gemma2-9b-it, llama3-70b-8192, llama3-8b-8192

    • mistral-saba-24b

  • Segurança (Prompt/Content Guard):

    • meta-llama/llama-guard-4-12b

    • meta-llama/llama-prompt-guard-2-22m, meta-llama/llama-prompt-guard-2-86m

  • Visão (Multimodal):

    • meta-llama/llama-4-maverick-17b-128e-instruct

    • meta-llama/llama-4-scout-17b-16e-instruct

  • Áudio (Speech-to-Text):

    • whisper-large-v3, whisper-large-v3-turbo

    • distil-whisper-large-v3-en

  • Texto para Fala (Text-to-Speech):

    • playai-tts, playai-tts-arabic

Recursos Avançados

  • Roteamento Inteligente (ModelRouter): Seleção dinâmica do modelo ideal com base em prioridades (velocidade, qualidade, custo, raciocínio, matemática, multilíngue), complexidade do prompt e capacidades específicas (visão, áudio).

  • Rate Limiting Controlado: Gerenciamento inteligente de limites de requisições e tokens por minuto (RPM/TPM) configuráveis para cada modelo, otimizando o uso da API.

  • Cache Otimizado: Sistema de cache em memória com TTL (Time-To-Live) configurável para respostas de LLMs, reduzindo latência e chamadas redundantes à API.

  • Métricas Detalhadas: Coleta abrangente de métricas de uso, desempenho (latência, throughput), erros e distribuição de modelos para análise e monitoramento.

  • Tratamento de Erros Robusto: Sistema centralizado de tratamento de erros com capacidade de re-tentativas automáticas (retry) para requisições de API, aumentando a resiliência.

  • Processamento em Lote: Suporte à ferramenta de processamento em lote da Groq, permitindo o envio eficiente de grandes volumes de requisições com economia de custo.

  • Logging Estruturado e Depuração: Sistema de logs profissional com Winston, que gera logs estruturados e direciona a saída colorida para stderr em desenvolvimento, facilitando a depuração e o monitoramento.

Related MCP server: Crawl4AI MCP Server

🛠️ Instalação

Pré-requisitos

  • Node.js: Versão v20.17.0 ou superior, ou v22.9.0 ou superior. Recomenda-se usar NVM (ou nvm-windows) para gerenciar as versões do Node.js.

  • npm: Gerenciador de pacotes Node.js (geralmente incluído com o Node.js e compatível com as versões recomendadas).

  • TypeScript: Versão 5 ou superior.

  • Chave API do Groq: Necessária para autenticar as requisições à API Groq. Obtenha a sua em https://console.groq.com/keys.

Instalação Rápida

  1. Clone o repositório:

    git clone [https://github.com/AyrtonFelipe/GroqCloud-MCP_server.git]
    cd groq-mcp-server
  2. Instale as dependências do projeto:

    npm install
    # Instale também a biblioteca para conversão de schemas Zod para JSON Schema
    npm install zod-to-json-schema
  3. Configure as variáveis de ambiente: Crie um arquivo .env na raiz do projeto (se não existir, você pode copiar do .env.example se fornecido):

    cp .env.example .env

    Edite o arquivo .env com sua chave API do Groq:

    GROQ_API_KEY="sua_chave_api_groq_aqui"

    (Opcional: configure outras variáveis como LOG_LEVEL conforme necessário.)

  4. Atualize src/config/models.json: Este arquivo define os modelos Groq que seu servidor irá usar e expor.

    • Remova entradas de modelos que não estão mais disponíveis ou que não se deseja usar (verifique as listas mais recentes no console Groq).

    • Adicione todos os modelos da lista de "Modelos Suportados" (acima) que ainda não estão presentes. Para cada novo modelo, você deve preencher todas as suas propriedades (nome, descrição, capacidades, costPer1kTokens, rateLimits, etc.) consultando a documentação oficial da Groq para obter os valores precisos.

    • Ajuste as seções modelSelectionRules e complexityThresholds em models.json para refletir os modelos que você tem e a lógica de seleção desejada (ex: para prioridades de reasoning, mathematical, multilingual).

  5. Atualize src/config/constants.ts:

    • Sincronize a constante RATE_LIMITS com os modelos presentes no seu models.json. Certifique-se de que cada modelo em models.json tenha uma entrada correspondente em RATE_LIMITS com rpm (requests per minute) e tpm (tokens per minute) precisos (consulte a documentação da Groq para os valores mais recentes).

    • Atualize também os z.enum nos arquivos das suas ferramentas (src/tools/*.ts) para incluir os novos modelos que você deseja expor ao cliente.

  6. Compile o projeto:

    npm run build
  7. Inicie o servidor:

    npm start

    Seu servidor estará ativo e aguardando conexões via stdin/stdout.

🤝 Uso com o Claude Desktop

Uma vez que seu servidor MCP esteja rodando localmente, o Claude Desktop deve ser capaz de descobri-lo e usar suas ferramentas:

  1. Inicie o Claude Desktop.

  2. Verifique as Ferramentas: As ferramentas Groq (groq_text_completion, groq_audio_transcription, groq_vision_analysis, groq_batch_processing) devem aparecer ativadas na interface do Claude Desktop (geralmente no menu de ferramentas ou integração).

  3. Interaja: Comece a conversar com o Claude e peça para ele usar as ferramentas. Exemplos:

    • Use groq_text_completion para gerar um texto sobre as capacidades do Groq para IA.

    • Com a ferramenta groq_text_completion, analise os dados financeiros { dados: [100, 250, 80, 400] } e use o modelo: llama-3.3-70b-versatile

    • groq_audio_transcription: transcreva o arquivo 'caminho/para/seu/audio.mp3' usando 'whisper-large-v3-turbo'.

    • groq_vision_analysis: descreva a imagem em 'https://example.com/sua-imagem.jpg' usando 'meta-llama/llama-4-scout-17b-16e-instruct'.

📊 Estrutura do Projeto


.
├── src/
│   ├── config/
│   │   ├── constants.ts         \# Constantes do sistema (RATE\_LIMITS, API\_ENDPOINTS, etc.)
│   │   └── models.json          \# Definições detalhadas dos modelos Groq
│   ├── tools/
│   │   ├── audio-transcription.ts \# Ferramenta para transcrição de áudio
│   │   ├── batch-processing.ts    \# Ferramenta para processamento em lote
│   │   ├── model-router.ts        \# Lógica central para seleção de modelos
│   │   ├── text-completion.ts     \# Ferramenta para completação de texto
│   │   └── vision-analysis.ts     \# Ferramenta para análise de visão
│   │   └── ... (novas ferramentas como Text-to-Speech, se implementadas)
│   ├── types/
│   │   └── groq-types.ts          \# Definições de tipos TypeScript para modelos Groq
│   ├── utils/
│   │   ├── cache-manager.ts       \# Gerenciador de cache
│   │   ├── error-handler.ts       \# Tratamento centralizado de erros e retries
│   │   ├── logger.ts              \# Configuração de logging com Winston
│   │   ├── metrics-tracker.ts     \# Coleta de métricas de uso e desempenho
│   │   └── rate-limiter.ts        \# Implementação de rate limiting
│   └── server.ts                  \# Ponto de entrada principal do servidor MCP
├── dist/                          \# Saída da compilação TypeScript
├── logs/                          \# Logs da aplicação
├── .env                           \# Variáveis de ambiente (ex: GROQ\_API\_KEY)
├── .gitignore                     \# Arquivos e pastas a serem ignorados pelo Git
├── package.json                   \# Metadados e dependências do projeto
├── tsconfig.json                  \# Configurações do compilador TypeScript
└── README.md                      \# Este arquivo

```

## 📈 Próximos Passos (Escalabilidade para Web)

Este projeto está configurado para uso local com `StdioServerTransport`. Para escalar para um ambiente de servidor web (e.g., produção), as seguintes considerações seriam cruciais:

* **Transporte de Comunicação:** Migrar de `StdioServerTransport` para um transporte web como **Server-Sent Events (SSE)** ou WebSockets para comunicação com clientes web.
* **Mecanismo de Start:** Adaptar o ciclo de vida do servidor para um framework web (e.g., Express, Fastify) que escuta em portas HTTP/HTTPS.
* **Protocolagem:** Implementar rotas HTTP que mapeiam para chamadas JSON-RPC do MCP.
* **Segurança:** Adicionar autenticação (e.g., JWT), autorização, HTTPS, e configuração de CORS para proteger o servidor.
* **Escalabilidade:** Implementar estratégias para lidar com múltiplos clientes e alto tráfego (e.g., load balancing, clusters Node.js, caches distribuídos como Redis para `CacheManager` e `RateLimiter`).

---

**Desenvolvido por Ayrton Felipe.**

Available Tools

4 tools
groq_audio_transcriptionC

Transcribe audio files using Groq Whisper models

ParametersJSON Schema
NameRequiredDescriptionDefault
audio_fileYes
modelNo
languageNo
promptNo
response_formatNo
temperatureNo
translateNo

TDQS

C2.8/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the basic function ('Transcribe audio files') but lacks critical details: it doesn't mention rate limits, authentication needs, error handling, or what the output looks like (e.g., text format, potential metadata). For a tool with 7 parameters and no output schema, this leaves significant gaps in understanding how it behaves in practice.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise—a single sentence with no wasted words. It's front-loaded with the core purpose ('Transcribe audio files') and efficiently adds the service context ('using Groq Whisper models'). Every part of the sentence contributes essential information, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (7 parameters, no annotations, no output schema), the description is incomplete. It doesn't cover parameter meanings, usage scenarios, behavioral traits like performance or limitations, or output details. While conciseness is high, the lack of contextual information makes it inadequate for an agent to fully understand how to invoke and interpret results from this tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 0%, meaning none of the 7 parameters have descriptions in the schema. The tool description adds no information about parameters beyond what's implied by the tool name (e.g., 'audio_file' is likely a file path or URL). It doesn't explain what 'prompt' does, how 'language' affects transcription, or the meaning of 'translate' and 'temperature'. This fails to compensate for the low schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Transcribe') and resource ('audio files'), and specifies the service provider ('using Groq Whisper models'). It distinguishes this tool from sibling tools like 'groq_text_completion' and 'groq_vision_analysis' by focusing on audio transcription, though it doesn't explicitly differentiate from 'groq_batch_processing' which might also handle audio. The purpose is specific but could be more precise about scope.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when to choose this over other transcription services, when to use specific models (e.g., 'whisper-large-v3' vs 'whisper-large-v3-turbo'), or any prerequisites like file format support. Without such context, an agent must infer usage from the tool name and parameters alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

groq_batch_processingC

Process large batches of requests with 25% discount

ParametersJSON Schema
NameRequiredDescriptionDefault
requestsYes
completion_windowNo
metadataNo

TDQS

C2.4/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the discount benefit but fails to describe critical behaviors: whether this is a synchronous or asynchronous operation, what the completion_window parameter means for timing, rate limits, error handling for large batches, or what the output looks like. For a batch processing tool with complex parameters, this leaves significant gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that conveys the core benefit (25% discount) and scope (large batches). It's appropriately sized without unnecessary words, though it could be more front-loaded with specific functionality. Every word earns its place, but it's too brief for the tool's complexity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (3 parameters with nested objects, no annotations, no output schema), the description is inadequate. It doesn't explain the chat completion nature of requests, the asynchronous batch processing behavior, expected outputs, or error conditions. For a batch API tool, this leaves too much undefined for effective agent use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate for undocumented parameters. It mentions 'large batches' which hints at the 'requests' array parameter, but doesn't explain the structure of requests (chat completions), the purpose of 'completion_window' (24h vs 7d choices), or 'metadata'. The description adds minimal value beyond what's inferable from the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the tool 'processes large batches of requests with 25% discount', which indicates a batch processing function with cost benefits. However, it doesn't specify what type of requests (chat completions) or distinguish it from sibling tools like groq_text_completion. The purpose is somewhat vague about the actual operation beyond batch processing.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description mentions 'large batches' and '25% discount', implying this should be used for bulk operations to save costs. However, it provides no explicit guidance on when to use this vs. alternatives like groq_text_completion for single requests, nor does it mention prerequisites, exclusions, or specific scenarios where batch processing is appropriate.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

groq_text_completionC

Generate text completions using Groq models with intelligent routing

ParametersJSON Schema
NameRequiredDescriptionDefault
promptYes
modelNo
max_tokensNo
temperatureNo
top_pNo
streamNo
json_modeNo
system_promptNo
priorityNo

TDQS

C2.7/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions 'intelligent routing' which hints at some optimization behavior, but doesn't explain what this entails (e.g., automatic model selection, performance tuning, cost optimization). It fails to disclose critical behavioral traits like rate limits, authentication requirements, error handling, or what 'completions' specifically means in terms of output format or length.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately concise at just one sentence with no wasted words. It's front-loaded with the core purpose ('Generate text completions') and efficiently adds the service provider and a key feature. However, the 'intelligent routing' phrase adds some ambiguity that slightly reduces clarity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of a 9-parameter tool with no annotations and no output schema, the description is insufficiently complete. It doesn't explain what the tool returns, how 'intelligent routing' works, what models are available, or provide any parameter guidance. For a text generation API with multiple configuration options, this leaves too many gaps for effective agent use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage and 9 parameters, the description provides no information about any parameters. It doesn't explain what 'prompt', 'model', 'temperature', 'max_tokens', or other parameters mean or how they affect the completion. The description fails to compensate for the complete lack of schema documentation, leaving all parameters semantically undefined.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Generate text completions') and the resource/service ('using Groq models'), which provides a specific verb+resource combination. However, it doesn't explicitly differentiate from sibling tools like groq_audio_transcription or groq_vision_analysis beyond the 'text' focus, missing explicit sibling differentiation that would warrant a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It mentions 'intelligent routing' but doesn't explain what this means in practice or when to choose this over other text generation tools. There are no explicit when/when-not statements or references to sibling tools, resulting in minimal usage guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

groq_vision_analysisC

Analyze images using Groq multimodal models

ParametersJSON Schema
NameRequiredDescriptionDefault
image_urlYes
promptNo
analysis_typeNo
detail_levelNo
modelNo
max_tokensNo
json_modeNo

TDQS

C2.4/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure but offers minimal information. It doesn't describe what 'analyze' entails (e.g., returns text descriptions, structured data, or other outputs), potential rate limits, authentication needs, error conditions, or performance characteristics. The description is too vague to inform the agent about how the tool behaves beyond its basic purpose.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise—a single sentence with no wasted words. It's front-loaded with the core purpose, making it easy to scan and understand quickly. Every word earns its place by conveying essential information about the tool's function.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (7 parameters with enums, no output schema, no annotations), the description is completely inadequate. It doesn't explain what the tool returns, how parameters interact, or any behavioral aspects. For a multimodal analysis tool with multiple configuration options, this minimal description leaves critical gaps that would hinder an agent's ability to use it effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds no meaning beyond what the input schema provides. With 7 parameters and 0% schema description coverage, the schema only defines types, formats, enums, and constraints without explaining what each parameter does. The description doesn't mention any parameters, leaving their purposes (e.g., what 'analysis_type' values mean, how 'detail_level' affects output, what 'json_mode' does) completely undocumented.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Analyze images') and the resource/technology used ('using Groq multimodal models'), which is specific and unambiguous. It distinguishes this tool from its siblings (audio transcription, batch processing, text completion) by focusing on image analysis, though it doesn't explicitly mention the sibling differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention any prerequisites, constraints, or comparison with sibling tools like groq_text_completion for text-only tasks or groq_audio_transcription for audio. Usage context is implied but not explicitly stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

B3.1/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose targeting different Groq service capabilities: audio transcription, batch processing, text completion, and vision analysis. There is no overlap or ambiguity in their functions, making it easy for an agent to select the appropriate tool.

Naming Consistency5/5

All tool names follow a consistent 'groq_' prefix with descriptive snake_case suffixes (e.g., groq_audio_transcription, groq_batch_processing). This uniform pattern enhances predictability and readability across the tool set.

Tool Count4/5

With 4 tools, the count is reasonable for a Groq API server, covering core functionalities like text, audio, vision, and batch processing. It is slightly lean but well-scoped, as each tool serves a distinct purpose without redundancy.

Completeness4/5

The tool set covers key Groq model types (text, audio, vision) and includes batch processing for efficiency, which addresses common use cases. A minor gap might be the lack of specific tools for model management or configuration, but the surface is largely complete for typical inference tasks.

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

  • A Model Context Protocol server for Wix AI tools

  • The Grafbase MCP server sits in front of a GraphQL API and exposes an MCP protocol-compliant interface that allows AI agents and LLMs to explore and query GraphQL APIs using natural language. It provides tools to search schemas, introspect types and fields, and execute GraphQL queries while minimizing context bloat by returning only relevant schema subsets, with built-in support for authentication, authorization, and configurable access control.

  • The Telnyx MCP server is an official implementation of the Model Context Protocol that enables AI clients (like Claude Desktop, Cursor, and OpenAI Agents) to interact with Telnyx's telephony, messaging, and AI assistant APIs. It provides comprehensive capabilities including making and managing phone calls, sending SMS/MMS messages, purchasing and configuring phone numbers, creating AI assistants with custom instructions, managing cloud storage buckets, scraping and embedding website content, and handling integration secrets. The server exists as both a local implementation and a remotely hosted version, allowing developers to integrate real-world communication infrastructure directly into AI applications.

  • An MCP memory server. One memory your agents share — across models, devices and apps.

Related MCP Servers

Latest Blog Posts

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/AyrtonFelipe/GroqCloud-MCP_server'

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