trackmcp
Back to directory
ucalyptus

prem-mcp-server

View on GitHub

Implementation of an MCP Server to use the Prem SDK

0 stars JavaScriptDeveloper Kits Updated Mar 26, 2025

Documentation

Prem MCP Server

smithery badge

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

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:

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

Installing Manually

bash
# Using npm
npm install prem-mcp-server

# Using yarn
yarn add prem-mcp-server

# Using pnpm
pnpm add prem-mcp-server

Configuration

1. Environment Variables

Create a `.env` file in your project root:

env
PREM_API_KEY=your_api_key_here
PREM_PROJECT_ID=your_project_id_here

2. Cursor Configuration

To use the Prem MCP server with Cursor, add the following to your `~/.cursor/mcp.json`:

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`:

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

bash
npx prem-mcp-server

Example Prompts

1. Basic Chat

code
Let's have a conversation about artificial intelligence.

2. RAG with Documents

code
Based on the documents in repository XYZ, what are the key points about [topic]?

3. Using Templates

code
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 text
  • `system_prompt`: Custom system prompt
  • `model`: Model identifier
  • `temperature`: Response randomness (0-1)
  • `max_tokens`: Maximum response length
  • `repository_ids`: Array of repository IDs for RAG
  • `similarity_threshold`: Threshold for document similarity
  • `limit`: Maximum number of document chunks

Template Parameters

  • `template_id`: ID of the prompt template
  • `params`: Template-specific parameters
  • `temperature`: Response randomness (0-1)
  • `max_tokens`: Maximum response length

Development

bash
# 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

Troubleshooting

Common Issues

1. Server Not Found

    2. API Key Invalid

      3. Document Upload Failed

        Contributing

        Contributions are welcome! Please feel free to submit a Pull Request.

        License

        MIT License - see the LICENSE file for details.

        Acknowledgments

        Support

        For issues and feature requests, please use the GitHub Issues page.

        Frequently asked questions

        What is prem-mcp-server?

        prem-mcp-server is Implementation of an MCP Server to use the Prem SDK

        How do I install prem-mcp-server?

        Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.

        Is prem-mcp-server open source?

        Yes — it is hosted on GitHub at https://github.com/ucalyptus/prem-mcp-server.

        Related MCP tools

        Run your own MCP server? See who uses it and what to fix.

        Measure it with TrackMCP