SillyTavern MCP Server

by CG-Labs

Integrations

  • Provides community support through the SillyTavern Discord, allowing users to get help with the MCP extension

  • Offers integration with GitHub for issue tracking, contribution management, and community support through the project's GitHub repository

SillyTavern の MCP 拡張機能

この拡張機能は、SillyTavern に WebSocket ベースのツール実行サポートを追加し、標準化されたインターフェースを介して外部ツールを登録および実行できるようにします。

特徴

  • リアルタイム通信用のWebSocketサーバー
  • ツール登録および実行システム
  • ツール定義のJSONスキーマ検証
  • リアルタイム実行ステータスの更新
  • 設定可能なログ記録とWebSocket設定
  • SillyTavern に統合された Web ベースの設定 UI

インストール

方法 1: Web インターフェース (推奨)

SillyTavern の Web インターフェイスからインストールする手順については、 INSTRUCTIONS.md を参照してください。

方法2: 手動インストール

  1. このリポジトリを SillyTavern プラグイン ディレクトリにクローンします。
    cd /path/to/SillyTavern/plugins git clone https://github.com/CG-Labs/SillyTavern-MCP-Extension.git mcp-extension
  2. 依存関係をインストールします:
    cd mcp-extension npm install
  3. SillyTavern を再起動する

構成

拡張機能は、SillyTavern UI の「設定 > 拡張機能 > MCP 拡張機能」から設定できます。

利用可能な設定

  • WebSocketポート: WebSocketサーバーのポート番号(デフォルト: 5005)
  • ログレベル: ログの詳細レベル (デバッグ、情報、警告、エラー)

使用法

ツールの登録

ツールを登録するには、次の形式の WebSocket メッセージを送信します。

{ "type": "register_tool", "data": { "name": "example_tool", "schema": { "type": "object", "properties": { "param1": { "type": "string", "description": "First parameter" }, "param2": { "type": "number", "description": "Second parameter" } }, "required": ["param1"] } } }

ツールの実行

登録されたツールを実行するには、次の形式の WebSocket メッセージを送信します。

{ "type": "execute_tool", "data": { "executionId": "unique_execution_id", "name": "example_tool", "args": { "param1": "value1", "param2": 42 } } }

実行ステータスの更新

拡張機能は、接続されているすべてのクライアントに実行ステータスの更新をブロードキャストします。

実行開始
{ "type": "tool_execution_started", "data": { "executionId": "unique_execution_id", "name": "example_tool", "args": { "param1": "value1", "param2": 42 } } }
実行完了
{ "type": "tool_execution_completed", "data": { "executionId": "unique_execution_id", "result": { // Tool-specific result data } } }
実行に失敗しました
{ "type": "tool_execution_failed", "data": { "executionId": "unique_execution_id", "error": { "code": "ERROR_CODE", "message": "Error message" } } }

エラーコード

  • INVALID_NAME : 無効なツール名
  • INVALID_SCHEMA : 無効なツールスキーマ
  • INVALID_URI : 無効なリソースURI
  • INVALID_HANDLER : 無効なハンドラ実装
  • INVALID_ARGUMENTS : 無効なツール引数
  • TOOL_EXISTS : ツールはすでに登録されています
  • TOOL_NOT_FOUND : ツールが見つかりません
  • TOOL_EXECUTION_FAILED : ツールの実行に失敗しました
  • SERVER_ERROR : 内部サーバーエラー

発達

プロジェクト構造

mcp-extension/ ├── index.js # Main plugin entry point ├── manifest.json # Plugin manifest ├── package.json # Dependencies and scripts ├── public/ # Public assets │ ├── script.js # Client-side JavaScript │ ├── style.css # Client-side styles │ └── templates/ # HTML templates ├── utils/ # Utility modules │ ├── errors.js # Error handling │ ├── logger.js # Logging utility │ └── validation.js # Input validation └── README.md # This documentation

新しいツールの追加

新しいツールを追加するには:

  1. WebSocketサーバーに接続する
  2. ツールをスキーマに登録する
  3. 実行リクエストをリッスンする
  4. 実行を処理して結果を返す

ツールの実装例:

const ws = new WebSocket('ws://localhost:5005'); ws.onopen = () => { // Register tool ws.send(JSON.stringify({ type: 'register_tool', data: { name: 'example_tool', schema: { type: 'object', properties: { input: { type: 'string' } }, required: ['input'] } } })); }; ws.onmessage = (event) => { const message = JSON.parse(event.data); if (message.type === 'execute_tool' && message.data.name === 'example_tool') { // Handle execution const result = doSomething(message.data.args.input); // Send result ws.send(JSON.stringify({ type: 'tool_execution_completed', data: { executionId: message.data.executionId, result } })); } };

貢献

  1. リポジトリをフォークする
  2. 機能ブランチを作成する
  3. 変更をコミットする
  4. ブランチにプッシュする
  5. プルリクエストを作成する

サポート

問題が発生した場合や質問がある場合は、次の手順に従ってください。

  1. GitHub Issuesで既存の問題を確認する
  2. 問題が報告されていない場合は、新しい問題を作成してください
  3. SillyTavern Discordコミュニティに参加してサポートを受けましょう

ライセンス

MITライセンス - 詳細はLICENSEファイルを参照

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

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.

WebSocket ベースの通信による外部ツールの登録と実行を可能にし、SillyTavern 内でのリアルタイム ツール管理のための統合インターフェイスを提供します。

  1. Features
    1. Installation
      1. Method 1: Web Interface (Recommended)
      2. Method 2: Manual Installation
    2. Configuration
      1. Available Settings
    3. Usage
      1. Registering a Tool
      2. Executing a Tool
      3. Execution Status Updates
    4. Error Codes
      1. Development
        1. Project Structure
        2. Adding New Tools
      2. Contributing
        1. Support
          1. License

            Related MCP Servers

            • -
              security
              F
              license
              -
              quality
              Facilitates real-time tool discovery and documentation retrieval for command-line tools within a VSCode extension, using Express and SSE for secure and dynamic content streaming.
              Last updated -
              4
              TypeScript
            • -
              security
              F
              license
              -
              quality
              A Model Context Protocol server that integrates with Cursor IDE, providing real-time communication, modern web dashboards, and extensible tools via SSE and WebSocket connections.
              Last updated -
              1,519
              1
              Python
            • -
              security
              F
              license
              -
              quality
              An integration server that allows Claude Desktop to communicate with Make (formerly Integromat) automation platform through the Model Context Protocol, enabling scenario management and execution via natural language.
              Last updated -
              JavaScript

            View all related MCP servers

            ID: pg6z0acepi