Skip to main content
Glama
ucalyptus
by ucalyptus

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_here

2. 游标配置

要将 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

示例提示

  1. 基本聊天

Let's have a conversation about artificial intelligence.
  1. 带文档的 RAG

Based on the documents in repository XYZ, what are the key points about [topic]?
  1. 使用模板

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 :提示模板的ID

  • params :模板特定参数

  • 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

故障排除

常见问题

  1. 未找到服务器

    • 验证claude_desktop_config.json中的服务器路径

    • 检查服务器是否正在运行

  2. API 密钥无效

    • 确保您的 Prem AI API 密钥有效

    • 检查 API 密钥是否具有所需的权限

  3. 文档上传失败

    • 验证文件格式是否受支持

    • 检查文件权限

    • 确保存储库 ID 正确

贡献

欢迎贡献代码!欢迎提交 Pull 请求。

执照

MIT 许可证 - 有关详细信息,请参阅LICENSE文件。

致谢

支持

对于问题和功能请求,请使用 GitHub 问题页面。

Install Server
F
license - not found
C
quality
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…

  • A Model Context Protocol server for Wix AI tools

  • Hosted MCP server for LLM cost estimation, model comparison, and budget-aware routing.

View all MCP Connectors

Latest Blog Posts

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