Skip to main content
Glama
ucalyptus
by ucalyptus

Servidor MCP Prem

insignia de herrería

Implementación de un servidor de Protocolo de Contexto de Modelo (MCP) para Prem AI , que permite una integración fluida con Claude y otros clientes compatibles con MCP. Este servidor proporciona acceso a las potentes funciones de Prem AI a través de la interfaz MCP.

Características

  • Finalizaciones de chat : interactúa con los modelos de lenguaje de Prem AI

  • 📚 Soporte RAG : Generación aumentada de recuperación con integración de repositorio de documentos

  • 📝 Gestión de documentos : Sube y gestiona documentos en repositorios

  • Sistema de plantillas : utilice plantillas de indicaciones predefinidas para resultados especializados

  • Respuestas en tiempo real : transmisión en tiempo real de las salidas del modelo

  • 🛡️ Manejo de errores : manejo y registro de errores robustos

Related MCP server: MCP Server Sample

Prerrequisitos

  • Node.js (v16 o superior)

  • Una cuenta Prem AI con clave API

  • Un ID de proyecto Prem

Instalación

Instalación mediante herrería

Para instalar prem-mcp-server para Claude Desktop automáticamente a través de Smithery :

npx -y @smithery/cli install @ucalyptus/prem-mcp-server --client claude

Instalación manual

# Using npm
npm install prem-mcp-server

# Using yarn
yarn add prem-mcp-server

# Using pnpm
pnpm add prem-mcp-server

Configuración

1. Variables de entorno

Crea un archivo .env en la raíz de tu proyecto:

PREM_API_KEY=your_api_key_here
PREM_PROJECT_ID=your_project_id_here

2. Configuración del cursor

Para usar el servidor Prem MCP con Cursor, agregue lo siguiente a su ~/.cursor/mcp.json :

{
  "mcpServers": {
    "PremAI": {
      "command": "node",
      "args": ["/path/to/your/prem-mcp/build/index.js", "--stdio"],
      "env": {
        "PREM_API_KEY": "your_api_key_here",
        "PREM_PROJECT_ID": "your_project_id_here"
      }
    }
  }
}

Reemplace /path/to/your/prem-mcp con la ruta real al directorio de su proyecto.

3. Configuración del escritorio de Claude

Para los usuarios de Claude Desktop, agregue lo siguiente a su claude_desktop_config.json :

{
  "mcpServers": {
    "PremAI": {
      "command": "npx",
      "args": ["prem-mcp-server", "--stdio"],
      "env": {
        "PREM_API_KEY": "your_api_key_here",
        "PREM_PROJECT_ID": "your_project_id_here"
      }
    }
  }
}

Uso

Iniciando el servidor

npx prem-mcp-server

Ejemplos de indicaciones

  1. Chat básico

Let's have a conversation about artificial intelligence.
  1. RAG con documentos

Based on the documents in repository XYZ, what are the key points about [topic]?
  1. Uso de plantillas

Use template ABC to generate [specific type of content].

Carga de documentos

El servidor permite subir documentos a los repositorios de Prem AI para las operaciones de RAG. Formatos compatibles:

  • .txt

  • .pdf

  • .docx

Referencia de API

Parámetros de finalización del chat

  • query : El texto de entrada

  • system_prompt : Indicador del sistema personalizado

  • model : Identificador del modelo

  • temperature : Aleatoriedad de la respuesta (0-1)

  • max_tokens : Longitud máxima de respuesta

  • repository_ids : Matriz de ID de repositorio para RAG

  • similarity_threshold : Umbral de similitud de documentos

  • limit : Número máximo de fragmentos de documentos

Parámetros de plantilla

  • template_id : ID de la plantilla de solicitud

  • params : Parámetros específicos de la plantilla

  • temperature : Aleatoriedad de la respuesta (0-1)

  • max_tokens : Longitud máxima de respuesta

Desarrollo

# Clone the repository
git clone https://github.com/yourusername/prem-mcp-server.git

# Install dependencies
npm install

# Build the project
npm run build

# Run tests
npm test

Solución de problemas

Problemas comunes

  1. Servidor no encontrado

    • Verifique la ruta del servidor en claude_desktop_config.json

    • Compruebe si el servidor está en ejecución

  2. Clave API no válida

    • Asegúrese de que su clave API de Prem AI sea válida

    • Compruebe si la clave API tiene los permisos necesarios

  3. Error al cargar el documento

    • Verificar que el formato de archivo sea compatible

    • Comprobar permisos de archivos

    • Asegúrese de que el ID del repositorio sea correcto

Contribuyendo

¡Agradecemos sus contribuciones! No dude en enviar una solicitud de incorporación de cambios.

Licencia

Licencia MIT: consulte el archivo LICENCIA para obtener más detalles.

Expresiones de gratitud

Apoyo

Para problemas y solicitudes de funciones, utilice la página de problemas de GitHub.

Available Tools

3 tools
chatC

Chat with Prem AI - supports chat completions with optional RAG capabilities.

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYesThe chat message to send
system_promptNoOptional system prompt to guide the model's behavior
modelNoOptional model to use for completion
temperatureNoOptional temperature for response generation
max_tokensNoOptional maximum tokens to generate
repository_idsNoOptional array of repository IDs for RAG
similarity_thresholdNoOptional similarity threshold for RAG
limitNoOptional limit of context chunks for RAG

TDQS

C2.9/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 mentions 'chat completions with optional RAG capabilities' but doesn't describe key behavioral traits like whether this is a read-only or mutating operation, authentication requirements, rate limits, response format, or error handling. For a chat tool with 8 parameters and no annotations, this leaves significant gaps in understanding how the tool behaves.

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 and front-loaded: a single sentence that captures the core functionality. Every word earns its place with no redundancy or unnecessary elaboration. The structure efficiently communicates the tool's purpose without wasting space.

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 (8 parameters, no output schema, no annotations), the description is incomplete. It doesn't address behavioral aspects, usage context, or output expectations. While the schema covers parameters well, the description fails to provide the additional context needed for an agent to understand when and how to use this tool effectively, especially compared to siblings.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents all 8 parameters thoroughly. The description adds minimal value beyond the schema by mentioning 'optional RAG capabilities', which loosely relates to parameters like repository_ids, similarity_threshold, and limit. However, it doesn't provide additional semantic context or usage examples beyond what's in the parameter descriptions.

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 tool's purpose: 'Chat with Prem AI - supports chat completions with optional RAG capabilities.' It specifies the verb ('Chat with'), resource ('Prem AI'), and key capabilities (chat completions with optional RAG). However, it doesn't explicitly differentiate from sibling tools like 'prem_chat_with_template' beyond mentioning RAG capabilities.

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 like 'prem_chat_with_template' or 'prem_upload_document'. It mentions optional RAG capabilities but doesn't specify scenarios where RAG is beneficial or when to choose this tool over siblings. No explicit when/when-not statements or alternative recommendations are included.

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

prem_chat_with_templateC

Chat using a predefined Prem AI prompt template

ParametersJSON Schema
NameRequiredDescriptionDefault
template_idYesID of the prompt template to use
paramsYesParameters to fill in the template
modelNoOptional model to use
temperatureNoOptional temperature parameter
max_tokensNoOptional maximum tokens to generate

TDQS

C2.9/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 states the action ('Chat') but lacks details on permissions, rate limits, response format, or potential side effects. For a tool with multiple parameters and no annotation coverage, this is a significant gap in transparency.

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 a single, efficient sentence that directly states the tool's purpose without unnecessary words. It's front-loaded and appropriately sized, making it easy for an agent 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 tool's complexity (5 parameters, nested objects, no output schema) and lack of annotations, the description is incomplete. It doesn't explain return values, error conditions, or behavioral nuances, leaving the agent with insufficient context for effective use.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema fully documents all parameters. The description adds no additional meaning beyond implying template-based chat, which is already covered by the schema's parameter descriptions. This meets the baseline for high schema coverage without extra value.

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 ('Chat') and resource ('using a predefined Prem AI prompt template'), making the purpose understandable. However, it doesn't explicitly differentiate from sibling tools like 'chat' or 'prem_upload_document', which would require more specific language about template-based versus direct chat functionality.

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 sibling tools like 'chat' or 'prem_upload_document', nor does it specify prerequisites such as needing a pre-existing template or appropriate parameters. This leaves the agent without clear usage context.

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

prem_upload_documentC

Upload a document to a Prem AI repository

ParametersJSON Schema
NameRequiredDescriptionDefault
repository_idYesID of the repository to upload to
file_pathYesPath to the file to upload

TDQS

C2.9/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 full burden. It mentions 'Upload' which implies a write operation, but doesn't disclose behavioral traits like authentication requirements, file size limits, supported formats, error handling, or what happens on success. This leaves significant gaps for an upload tool.

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 a single, clear sentence with zero waste—it directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded for an upload operation.

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 no annotations, no output schema, and a mutation tool (upload), the description is incomplete. It lacks details on permissions, return values, error cases, or operational limits, which are critical for safe and effective use.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents both parameters (repository_id, file_path). The description doesn't add any meaning beyond what the schema provides, such as examples or constraints. Baseline 3 is appropriate when the schema does the heavy lifting.

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 ('Upload') and target resource ('document to a Prem AI repository'), making the purpose immediately understandable. It doesn't differentiate from sibling tools (chat, prem_chat_with_template), which are unrelated communication tools, so it doesn't need explicit 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, prerequisites, or exclusions. It simply states what the tool does without context about appropriate scenarios or constraints.

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

Tool Schema Changelog

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

  1. 3 tool updates
    • First observedchat
    • First observedprem_chat_with_template
    • First observedprem_upload_document

TDQS

C2.8/5.0

Scored across 3 tools

Disambiguation3/5

The tools have some overlap but are distinguishable by their specific functions. 'chat' and 'prem_chat_with_template' both handle chat completions, which could cause confusion, but 'prem_chat_with_template' specifies template usage, and 'prem_upload_document' is clearly distinct for document uploads. The descriptions help differentiate them, but the chat-focused tools have ambiguous boundaries.

Naming Consistency2/5

The naming is inconsistent with mixed conventions. 'chat' uses a simple verb, 'prem_chat_with_template' uses a verbose prefix and underscores, and 'prem_upload_document' follows a similar pattern but differs in structure. There is no uniform verb_noun pattern, and the prefix 'prem_' is applied inconsistently, leading to a chaotic naming style.

Tool Count3/5

With 3 tools, the count is borderline for a server's scope. It feels thin, potentially lacking operations like document retrieval or template management, but it covers basic chat and document upload functionalities. For a Prem AI server, more tools might be expected to handle a complete workflow, making this slightly under-scoped.

Completeness2/5

There are significant gaps in the tool surface for a Prem AI domain. The tools cover chat completions and document upload but lack operations for retrieving documents, managing templates, or performing other AI tasks like embeddings or fine-tuning. This incomplete coverage will likely cause agent failures when trying to execute common workflows.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers