Prem MCP Server
Prem MCP 服务器
Prem AI的模型上下文协议 (MCP) 服务器实现,可与 Claude 及其他兼容 MCP 的客户端无缝集成。该服务器可通过 MCP 接口访问 Prem AI 的强大功能。
特征
🤖聊天完成:与 Prem AI 的语言模型进行交互
📚 RAG 支持:具有文档存储库集成的检索增强生成
📝文档管理:上传和管理存储库中的文档
🎭模板系统:使用预定义的提示模板进行专门的输出
⚡流式响应:模型输出的实时流式传输
🛡️错误处理:强大的错误处理和日志记录
Related MCP server: MCP Server Sample
先决条件
Node.js(v16 或更高版本)
带有 API 密钥的 Prem AI 帐户
Prem 项目 ID
安装
通过 Smithery 安装
要通过Smithery自动为 Claude Desktop 安装 prem-mcp-server:
npx -y @smithery/cli install @ucalyptus/prem-mcp-server --client claude手动安装
# Using npm
npm install prem-mcp-server
# Using yarn
yarn add prem-mcp-server
# Using pnpm
pnpm add prem-mcp-server配置
1.环境变量
在项目根目录中创建一个.env文件:
PREM_API_KEY=your_api_key_here
PREM_PROJECT_ID=your_project_id_here2. 游标配置
要将 Prem MCP 服务器与 Cursor 一起使用,请将以下内容添加到您的~/.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"
}
}
}
}将/path/to/your/prem-mcp替换为项目目录的实际路径。
3.Claude桌面配置
对于 Claude Desktop 用户,请将以下内容添加到您的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"
}
}
}
}用法
启动服务器
npx prem-mcp-server示例提示
基本聊天
Let's have a conversation about artificial intelligence.带文档的 RAG
Based on the documents in repository XYZ, what are the key points about [topic]?使用模板
Use template ABC to generate [specific type of content].文件上传
服务器支持将文档上传到 Prem AI 存储库,以进行 RAG 操作。支持的格式:
.txt.pdf.docx
API 参考
聊天完成参数
query:输入文本system_prompt:自定义系统提示model:型号标识符temperature:响应随机性(0-1)max_tokens:最大响应长度repository_ids:RAG 的存储库 ID 数组similarity_threshold:文档相似度的阈值limit:文档块的最大数量
模板参数
template_id:提示模板的IDparams:模板特定参数temperature:响应随机性(0-1)max_tokens:最大响应长度
发展
# 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故障排除
常见问题
未找到服务器
验证
claude_desktop_config.json中的服务器路径检查服务器是否正在运行
API 密钥无效
确保您的 Prem AI API 密钥有效
检查 API 密钥是否具有所需的权限
文档上传失败
验证文件格式是否受支持
检查文件权限
确保存储库 ID 正确
贡献
欢迎贡献代码!欢迎提交 Pull 请求。
执照
MIT 许可证 - 有关详细信息,请参阅LICENSE文件。
致谢
支持
对于问题和功能请求,请使用 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.1162MIT
- 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.11 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