Prem MCP Server
Servidor MCP Prem
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 claudeInstalación manual
# Using npm
npm install prem-mcp-server
# Using yarn
yarn add prem-mcp-server
# Using pnpm
pnpm add prem-mcp-serverConfiguració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_here2. 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-serverEjemplos de indicaciones
Chat básico
Let's have a conversation about artificial intelligence.RAG con documentos
Based on the documents in repository XYZ, what are the key points about [topic]?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 entradasystem_prompt: Indicador del sistema personalizadomodel: Identificador del modelotemperature: Aleatoriedad de la respuesta (0-1)max_tokens: Longitud máxima de respuestarepository_ids: Matriz de ID de repositorio para RAGsimilarity_threshold: Umbral de similitud de documentoslimit: Número máximo de fragmentos de documentos
Parámetros de plantilla
template_id: ID de la plantilla de solicitudparams: Parámetros específicos de la plantillatemperature: 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 testSolución de problemas
Problemas comunes
Servidor no encontrado
Verifique la ruta del servidor en
claude_desktop_config.jsonCompruebe si el servidor está en ejecución
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
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
Prem AI por su potente plataforma de IA
Protocolo de contexto del modelo para la especificación del protocolo
Antrópico para Claude y el ecosistema MCP
Apoyo
Para problemas y solicitudes de funciones, utilice la página de problemas de GitHub.
Available Tools
3 toolschatC
Chat with Prem AI - supports chat completions with optional RAG capabilities.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | The chat message to send | |
| system_prompt | No | Optional system prompt to guide the model's behavior | |
| model | No | Optional model to use for completion | |
| temperature | No | Optional temperature for response generation | |
| max_tokens | No | Optional maximum tokens to generate | |
| repository_ids | No | Optional array of repository IDs for RAG | |
| similarity_threshold | No | Optional similarity threshold for RAG | |
| limit | No | Optional limit of context chunks for RAG |
TDQS
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.
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.
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.
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.
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.
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
| Name | Required | Description | Default |
|---|---|---|---|
| template_id | Yes | ID of the prompt template to use | |
| params | Yes | Parameters to fill in the template | |
| model | No | Optional model to use | |
| temperature | No | Optional temperature parameter | |
| max_tokens | No | Optional maximum tokens to generate |
TDQS
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.
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.
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.
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.
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.
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
| Name | Required | Description | Default |
|---|---|---|---|
| repository_id | Yes | ID of the repository to upload to | |
| file_path | Yes | Path to the file to upload |
TDQS
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.
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.
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.
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.
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.
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.
3 tool updates
- First observed
chat - First observed
prem_chat_with_template - First observed
prem_upload_document
TDQS
Scored across 3 tools
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.
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.
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.
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
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
DocBase MCP server for AI agents
A Model Context Protocol server for Wix AI tools
Related MCP Servers
- AlicenseBqualityDmaintenanceAn educational implementation of a Model Context Protocol server that demonstrates how to build a functional MCP server for integrating with various LLM clients like Claude Desktop.1164MIT
- AlicenseBqualityDmaintenanceAn educational implementation of a Model Context Protocol server that demonstrates how to build a functional MCP server integrating with various LLM clients.2MIT
- AlicenseNot gradedqualityCmaintenanceA Model Context Protocol (MCP) server that provides seamless integration with the Documize API. This server enables AI assistants like Claude to interact with your Documize knowledge base - search documents, manage spaces, handle attachments, and more.7 npmMIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables any MCP-compatible application to perform advanced multi-modal document processing and retrieval using RAG-Anything.MIT