Prem MCP Server

by ucalyptus
Verified

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Integrations

  • 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

プレミアムMCPサーバー

Prem AI用のモデルコンテキストプロトコル(MCP)サーバー実装。Claude やその他の MCP 対応クライアントとのシームレスな統合を実現します。このサーバーは、MCP インターフェースを介して Prem AI の強力な機能へのアクセスを提供します。

特徴

  • 🤖チャット補完:Prem AIの言語モデルと対話する
  • 📚 RAG サポート: ドキュメント リポジトリ統合による検索拡張生成
  • 📝ドキュメント管理:リポジトリにドキュメントをアップロードして管理する
  • 🎭テンプレートシステム: 特殊な出力には定義済みのプロンプトテンプレートを使用します
  • ストリーミングレスポンス:モデル出力のリアルタイムストリーミング
  • 🛡️エラー処理: 堅牢なエラー処理とログ記録

前提条件

  • 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. カーソルの設定

Cursor で Prem MCP サーバーを使用するには、 ~/.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 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].

ドキュメントのアップロード

サーバーは、RAG操作用のPrem AIリポジトリへのドキュメントのアップロードをサポートしています。サポートされている形式:

  • .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が正しいことを確認する

貢献

貢献を歓迎します!お気軽にプルリクエストを送信してください。

ライセンス

MIT ライセンス - 詳細についてはLICENSEファイルを参照してください。

謝辞

サポート

問題や機能のリクエストについては、GitHub の問題ページをご利用ください。

-
security - not tested
F
license - not found
-
quality - not tested

Claude やその他の MCP 互換クライアントとのシームレスな統合を可能にし、Prem AI の言語モデル、RAG 機能、ドキュメント管理機能にアクセスできるようにするモデル コンテキスト プロトコル サーバーの実装。

  1. Features
    1. Prerequisites
      1. Installation
        1. Installing via Smithery
        2. Installing Manually
      2. Configuration
        1. 1. Environment Variables
        2. 2. Cursor Configuration
        3. 3. Claude Desktop Configuration
      3. Usage
        1. Starting the Server
        2. Example Prompts
        3. Document Upload
      4. API Reference
        1. Chat Completion Parameters
        2. Template Parameters
      5. Development
        1. Troubleshooting
          1. Common Issues
        2. Contributing
          1. License
            1. Acknowledgments
              1. Support
                ID: c1closkd53