Skip to main content
Glama

LLM MCP Bridge 🌉

Un servidor MCP (Model Context Protocol) agnóstico para cualquier API compatible con OpenAI. Permite analizar y evaluar la calidad de modelos LLM.

🎯 Proveedores Soportados

Cualquier servidor que implemente la OpenAI API:

Proveedor

URL Base Típica

LM Studio

http://localhost:1234/v1

Ollama

http://localhost:11434/v1

vLLM

http://localhost:8000/v1

LocalAI

http://localhost:8080/v1

llama.cpp

http://localhost:8080/v1

OpenAI

https://api.openai.com/v1

Azure OpenAI

https://{resource}.openai.azure.com/

Together.ai

https://api.together.xyz/v1

Groq

https://api.groq.com/openai/v1

Anyscale

https://api.endpoints.anyscale.com/v1

Related MCP server: LLM API Benchmark MCP Server

🛠️ Herramientas MCP Disponibles

Herramienta

Descripción

llm_get_models

Obtiene lista de modelos (JSON)

llm_status

Verifica conexión con el servidor

llm_list_models

Lista modelos (formato legible)

llm_chat

Chat con métricas de rendimiento

llm_benchmark

Benchmark con múltiples prompts

llm_evaluate_coherence

Evalúa consistencia del modelo

llm_test_capabilities

Test en diferentes áreas

llm_compare_models

Compara múltiples modelos

llm_quality_report

Reporte completo de calidad

Parámetros Configurables en Chat

Todas las herramientas aceptan baseURL y apiKey opcionales para override de conexión.

Parámetro

Descripción

Default

prompt

Texto a enviar al modelo

requerido

model

ID del modelo

modelo por defecto

maxTokens

Máximo de tokens

512

temperature

Temperatura (0-2)

0.7

topP

Nucleus sampling (0-1)

-

topK

Top K sampling

-

repeatPenalty

Penalización repetición

-

presencePenalty

Penalización presencia

-

frequencyPenalty

Penalización frecuencia

-

stop

Secuencias de parada

-

systemPrompt

Prompt de sistema

-

📋 Requisitos

  • Node.js >= 18

  • Un servidor LLM con API compatible con OpenAI

🚀 Instalación

cd llm-mcp-bridge
npm install
npm run build

⚙️ Configuración en VS Code

Añade a tu archivo mcp.json de VS Code:

LM Studio (local)

{
  "servers": {
    "llm-local": {
      "type": "stdio",
      "command": "node",
      "args": ["/ruta/a/llm-mcp-bridge/dist/index.js"],
      "env": {
        "LLM_BASE_URL": "http://localhost:1234/v1"
      }
    }
  }
}

Ollama

{
  "servers": {
    "ollama": {
      "type": "stdio",
      "command": "node",
      "args": ["/ruta/a/llm-mcp-bridge/dist/index.js"],
      "env": {
        "LLM_BASE_URL": "http://localhost:11434/v1"
      }
    }
  }
}

OpenAI

{
  "servers": {
    "openai": {
      "type": "stdio",
      "command": "node",
      "args": ["/ruta/a/llm-mcp-bridge/dist/index.js"],
      "env": {
        "LLM_BASE_URL": "https://api.openai.com/v1",
        "LLM_API_KEY": "sk-..."
      }
    }
  }
}

Groq

{
  "servers": {
    "groq": {
      "type": "stdio",
      "command": "node",
      "args": ["/ruta/a/llm-mcp-bridge/dist/index.js"],
      "env": {
        "LLM_BASE_URL": "https://api.groq.com/openai/v1",
        "LLM_API_KEY": "gsk_..."
      }
    }
  }
}

Múltiples proveedores

{
  "servers": {
    "llm-lmstudio": {
      "type": "stdio",
      "command": "node",
      "args": ["/ruta/a/llm-mcp-bridge/dist/index.js"],
      "env": {
        "LLM_BASE_URL": "http://localhost:1234/v1"
      }
    },
    "llm-ollama": {
      "type": "stdio",
      "command": "node",
      "args": ["/ruta/a/llm-mcp-bridge/dist/index.js"],
      "env": {
        "LLM_BASE_URL": "http://localhost:11434/v1"
      }
    },
    "llm-openai": {
      "type": "stdio",
      "command": "node",
      "args": ["/ruta/a/llm-mcp-bridge/dist/index.js"],
      "env": {
        "LLM_BASE_URL": "https://api.openai.com/v1",
        "LLM_API_KEY": "sk-..."
      }
    }
  }
}

🔧 Variables de Entorno

Variable

Descripción

Default

LLM_BASE_URL

URL del servidor LLM

http://localhost:1234/v1

LLM_API_KEY

API Key (requerida para servicios cloud)

-

📖 Ejemplos de Uso

Verificar conexión

@llm_status

Obtener modelos (JSON)

@llm_get_models

Chat con métricas

@llm_chat prompt="Explica qué es machine learning" temperature=0.5 maxTokens=256

Chat con otro servidor (override)

@llm_chat prompt="Hola" baseURL="http://localhost:11434/v1"

Benchmark

@llm_benchmark prompts=["Hola", "¿Qué hora es?", "Cuenta hasta 10"]

Reporte de calidad

@llm_quality_report

Comparar modelos

@llm_compare_models prompt="Escribe un haiku sobre la luna"

🏗️ Estructura del Proyecto

llm-mcp-bridge/
├── src/
│   ├── index.ts       # Servidor MCP principal
│   ├── llm-client.ts  # Cliente OpenAI-compatible
│   └── tools.ts       # Definiciones de herramientas MCP
├── dist/              # Código compilado
├── package.json
├── tsconfig.json
└── README.md

📊 Métricas de Calidad

El servidor analiza:

  • Latencia: Tiempo total de respuesta (ms)

  • Tokens/segundo: Velocidad de generación

  • Coherencia: Consistencia entre múltiples ejecuciones

  • Capacidades: Rendimiento en diferentes tipos de tareas

    • Razonamiento

    • Programación

    • Creatividad

    • Conocimiento factual

    • Seguir instrucciones

🤝 Contribuir

¡Las contribuciones son bienvenidas! Abre un issue o pull request.

📄 Licencia

MIT

Available Tools

8 tools
llm_benchmarkC

Ejecuta un benchmark con múltiples prompts para evaluar rendimiento del modelo

Inputs: prompts (required), baseURL, apiKey, model, +4 more.

llm_chatC

Envía un prompt al modelo y recibe una respuesta con métricas de rendimiento (latencia, tokens/s)

Inputs: prompt (required), baseURL, apiKey, model, +9 more.

llm_compare_modelsC

Compara el rendimiento de múltiples modelos con el mismo prompt

Inputs: prompt (required), baseURL, apiKey, models, +1 more.

llm_evaluate_coherenceC

Evalúa la coherencia del modelo ejecutando el mismo prompt múltiples veces

Inputs: prompt (required), baseURL, apiKey, model, +2 more.

llm_get_modelsC

Obtiene la lista de modelos disponibles en el servidor LLM (compatible con OpenAI API: LM Studio, Ollama, vLLM, OpenAI, etc.)

Inputs: baseURL, apiKey.

llm_quality_reportC

Genera un reporte completo de calidad del modelo incluyendo benchmark, coherencia y capacidades

Inputs: baseURL, apiKey, model.

llm_statusB

Verifica el estado de conexión con el servidor LLM y lista los modelos disponibles

Inputs: baseURL, apiKey.

llm_test_capabilitiesC

Prueba las capacidades del modelo en diferentes áreas: razonamiento, código, creatividad, hechos, instrucciones

Inputs: baseURL, apiKey, model.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.3/5.0

    Scored across 8 tools

    Disambiguation3/5

    Most tools have distinct purposes like benchmarking, chatting, and comparing models, but there is overlap between llm_get_models and llm_status, as both list available models. The descriptions help differentiate them, but an agent might still be confused about which to use for model listing.

    Naming Consistency5/5

    All tool names follow a consistent 'llm_' prefix with descriptive suffixes in snake_case, such as llm_benchmark and llm_chat. This predictable pattern makes it easy for agents to understand and navigate the toolset without confusion.

    Tool Count5/5

    With 8 tools, the count is well-scoped for evaluating and testing LLM models. Each tool serves a specific function in performance analysis, quality assessment, and model management, fitting the server's purpose without being overwhelming or insufficient.

    Completeness4/5

    The toolset covers key aspects of LLM evaluation, including benchmarking, chatting, model comparison, coherence testing, and capability assessment. A minor gap is the lack of tools for model configuration or fine-tuning, but core workflows are well-covered for quality and performance analysis.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Aggregates dozens of pre-built connectors into one OpenAI-compatible endpoint for AI clients, with a web UI for installing, configuring, monitoring, and managing them.
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to route chat completion requests to task-appropriate models via LiteLLM/OpenRouter, track usage and budgets, and run side-by-side eval comparisons of models based on cost, latency, and response quality.
      101 npm
      MIT