SillyTavern MCP Server
SillyTavern の MCP 拡張機能
この拡張機能は、SillyTavern に WebSocket ベースのツール実行サポートを追加し、標準化されたインターフェースを介して外部ツールを登録および実行できるようにします。
特徴
リアルタイム通信用のWebSocketサーバー
ツール登録および実行システム
ツール定義のJSONスキーマ検証
リアルタイム実行ステータスの更新
設定可能なログ記録とWebSocket設定
SillyTavern に統合された Web ベースの設定 UI
Related MCP server: Modular MCP Server & Client
インストール
方法 1: Web インターフェース (推奨)
SillyTavern の Web インターフェイスからインストールする手順については、 INSTRUCTIONS.md を参照してください。
方法2: 手動インストール
このリポジトリを SillyTavern プラグイン ディレクトリにクローンします。
cd /path/to/SillyTavern/plugins git clone https://github.com/CG-Labs/SillyTavern-MCP-Extension.git mcp-extension依存関係をインストールします:
cd mcp-extension npm installSillyTavern を再起動する
構成
拡張機能は、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: 無効なリソースURIINVALID_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新しいツールの追加
新しいツールを追加するには:
WebSocketサーバーに接続する
ツールをスキーマに登録する
実行リクエストをリッスンする
実行を処理して結果を返す
ツールの実装例:
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
}
}));
}
};貢献
リポジトリをフォークする
機能ブランチを作成する
変更をコミットする
ブランチにプッシュする
プルリクエストを作成する
サポート
問題が発生した場合や質問がある場合は、次の手順に従ってください。
GitHub Issuesで既存の問題を確認する
問題が報告されていない場合は、新しい問題を作成してください
SillyTavern Discordコミュニティに参加してサポートを受けましょう
ライセンス
MITライセンス - 詳細はLICENSEファイルを参照
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Related MCP Connectors
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Toolstile is a managed MCP gateway that connects remote MCP servers behind one endpoint, with per-agent permissions, shared accounts and activity logs. Connect at https://mcp.toolstile.com/mcp over Streamable HTTP with OAuth; sign in at https://toolstile.com, select a workspace and connect your upstream servers. Available tools, resources and prompts depend on that workspace and the agent's granted access.
Finds, connects and runs tools for agents; when a tool is missing, it assembles one from operations.
91Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Related MCP Servers
- AlicenseBqualityDmaintenanceThe server provides tools for web automation using Playwright, allowing navigation, interaction, and JavaScript execution on web pages, and supports note storage with summarization capabilities.8187Apache 2.0
- FlicenseNot gradedqualityDmaintenanceA modular and extensible tool server built on FastMCP that supports multiple tools organized across files and communicates via MCP protocol.-
- FlicenseNot gradedqualityDmaintenanceA Python framework for developing and managing tool instances through a registry system, where developers can easily create new tools by inheriting from the BaseHandler class and implementing required methods.-
- FlicenseNot gradedqualityDmaintenanceA Flask-based server that hosts multiple tools, each exposing functionalities by calling external REST APIs through a unified interface.-