Prem MCP Server
Supports configuration via environment variables stored in .env files, allowing users to securely manage their Prem AI credentials
Offers integration with GitHub for issue tracking, contributions, and repository management for the MCP server codebase
Runs as a Node.js application, with support for v16 or higher, enabling server-side execution of the MCP protocol
Available as an npm package for easy installation and execution through the npm package registry
Provides installation support through the pnpm package manager for efficient node module management
Supports installation through the Yarn package manager as an alternative to npm
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Prem MCP Serversummarize the key points from my uploaded research documents about climate change"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Prem MCP Server
A Model Context Protocol (MCP) server implementation for Prem AI, enabling seamless integration with Claude and other MCP-compatible clients. This server provides access to Prem AI's powerful features through the MCP interface.
Features
π€ Chat Completions: Interact with Prem AI's language models
π RAG Support: Retrieval-Augmented Generation with document repository integration
π Document Management: Upload and manage documents in repositories
π Template System: Use predefined prompt templates for specialized outputs
β‘ Streaming Responses: Real-time streaming of model outputs
π‘οΈ Error Handling: Robust error handling and logging
Related MCP server: MCP Server Sample
Prerequisites
Node.js (v16 or higher)
A Prem AI account with API key
A Prem project ID
Installation
Installing via Smithery
To install prem-mcp-server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @ucalyptus/prem-mcp-server --client claudeInstalling Manually
# Using npm
npm install prem-mcp-server
# Using yarn
yarn add prem-mcp-server
# Using pnpm
pnpm add prem-mcp-serverConfiguration
1. Environment Variables
Create a .env file in your project root:
PREM_API_KEY=your_api_key_here
PREM_PROJECT_ID=your_project_id_here2. Cursor Configuration
To use the Prem MCP server with Cursor, add the following to your ~/.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"
}
}
}
}Replace /path/to/your/prem-mcp with the actual path to your project directory.
3. Claude Desktop Configuration
For Claude Desktop users, add the following to your 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"
}
}
}
}Usage
Starting the Server
npx prem-mcp-serverExample Prompts
Basic Chat
Let's have a conversation about artificial intelligence.RAG with Documents
Based on the documents in repository XYZ, what are the key points about [topic]?Using Templates
Use template ABC to generate [specific type of content].Document Upload
The server supports uploading documents to Prem AI repositories for RAG operations. Supported formats:
.txt.pdf.docx
API Reference
Chat Completion Parameters
query: The input textsystem_prompt: Custom system promptmodel: Model identifiertemperature: Response randomness (0-1)max_tokens: Maximum response lengthrepository_ids: Array of repository IDs for RAGsimilarity_threshold: Threshold for document similaritylimit: Maximum number of document chunks
Template Parameters
template_id: ID of the prompt templateparams: Template-specific parameterstemperature: Response randomness (0-1)max_tokens: Maximum response length
Development
# 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 testTroubleshooting
Common Issues
Server Not Found
Verify the server path in
claude_desktop_config.jsonCheck if the server is running
API Key Invalid
Ensure your Prem AI API key is valid
Check if the API key has the required permissions
Document Upload Failed
Verify file format is supported
Check file permissions
Ensure repository ID is correct
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
MIT License - see the LICENSE file for details.
Acknowledgments
Prem AI for their powerful AI platform
Model Context Protocol for the protocol specification
Anthropic for Claude and the MCP ecosystem
Support
For issues and feature requests, please use the GitHub Issues page.
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.
TDQS
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
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 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
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.1163MIT
- 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.20MIT
- 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
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/ucalyptus/prem-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server