tavern-tanuki
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@tavern-tanukiWhat characters are available in my tavern?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
酒馆小狸 tavern-tanuki
把你的 AI 编程助手(Claude Code / Cursor / Codex…)变成酒馆跑堂:直接读写正在运行的酒馆(角色卡、世界书、聊天记录),还能替你玩卡/陪你玩卡(代发消息、触发回复、切预设、切模型)。
An MCP server that lets coding agents manage and play a running SillyTavern instance.
两件套结构(谁装在哪)
部件 | 装在哪 | 作用 |
MCP 服务器(本仓库) | AI 编程助手侧(如 Claude Code 的 | 读写卡/世界书/聊天,全走酒馆 HTTP API |
小狸连接器( | 酒馆侧:酒馆助手 → 脚本库 → 导入此 JSON 文件 | 陪玩功能:代发消息/触发生成/切预设切模型 |
不装连接器也能用全部读写功能;装了连接器才解锁 play_* 陪玩工具。
Related MCP server: Kodama MCP
工具一览(20 个)
管理组:st_status list_characters get_character edit_character(自动同步顶层+data.* 两份副本)merge_character_data list_worldbooks get_worldbook(summary 模式省 token)upsert_worldbook_entry delete_worldbook_entry delete_worldbook(需 confirm)list_chats get_chat
陪玩组:play_status play_send(以用户身份发消息并等回复,完整走预设/世界书/正则管线)play_trigger play_recent_messages play_list_presets play_set_preset play_set_model play_stscript(STScript 万能后门)
安装
要求:Node ≥ 18,本地运行的 SillyTavern(默认 http://127.0.0.1:8000)。
clone 本仓库,
npm install在 AI 编程助手的 MCP 配置里加:
{
"mcpServers": {
"sillytavern": {
"command": "node",
"args": ["<path-to>/st-mcp/src/server.js"],
"env": {
"ST_URL": "http://127.0.0.1:8000",
"ST_USER": "basic auth用户名(酒馆没开验证就删掉)",
"ST_PASSWORD": "basic auth密码"
}
}
}
}(可选,陪玩用)在酒馆助手 → 脚本库 → 导入,选择
tavern-script/酒馆小狸连接器.json。连接成功酒馆会弹「已连接 AI 编程助手」。
导入的是一个轻量加载器:真正的连接器本体托管在本仓库 dist/connector.js,由 jsDelivr 分发、Supabase 版本指针控制——导入一次,之后每次更新自动生效,不用重新导入。想审代码就看 dist/connector.js(这就是实际在你酒馆里运行的全部代码)。
环境变量:ST_BRIDGE_PORT 可改陪玩桥端口(默认 6700,只监听 127.0.0.1)。
陪玩原理
酒馆的提示词组装(预设/世界书/正则)都发生在浏览器侧,纯服务器 API 触发不了完整生成。所以连接器脚本在酒馆里开一条 WebSocket 连到本机 MCP 服务器,agent 的 play_send → 浏览器里 createChatMessages + /trigger → 等 GENERATION_ENDED → 把回复带回来。生成走的是你正常游玩的完整管线。
⚠️ 云酒馆(https)因浏览器混合内容限制连不上本机 ws,陪玩功能仅限本地酒馆;管理组工具不受影响(ST_URL 指向哪就管哪)。
开发
ST_USER=... ST_PASSWORD=... node smoke.mjs # 端到端冒烟测试(写操作只碰临时世界书和复制卡,测完清理)
node 发版.mjs "改动说明" # 维护者发版:打包→push→切 Supabase 版本指针,玩家刷新即新版连接器结构:tavern-script/loader.js(加载器,打包成可导入 JSON)→ 按 Supabase sb_config.tanuki_script_ref 指针从 jsDelivr 拉取 dist/connector.js(本体)。指针指向具体提交号,@提交号 是全新 URL 必定回源,绕开 CDN 12 小时缓存实现发版秒切;指针失联时退回 @main。
安全性
只监听/连接 localhost;凭据放 MCP 配置
env,别提交真实密码到公开仓库。play_stscript等于让 agent 拥有你在输入框里的全部权力,只在自己信任的本机使用。删整本世界书需要显式
confirm:true。
License
MIT
This server cannot be installed
Maintenance
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
- Alicense-qualityDmaintenanceRemote MCP server that gives AI agents read/write access to your Obsidian vaults, supporting both local desktop vaults and headless mode.3,697MIT
- -license-quality-maintenanceAST-aware code exploration MCP server for AI agents, optimized for token efficiency.
- Alicense-qualityBmaintenanceMCP server for creating, managing, and interacting with AI-powered NPCs with persistent memory, supporting dialogue, game events, and persona generation for coding agents.571Inno Setup
- FlicenseCqualityCmaintenanceAn MCP server that exposes Discord bot actions as tools for LLM clients.4291
Related MCP Connectors
MCP server for AI dialogue using various LLM models via AceDataCloud
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
Official remote MCP server for Archivist AI TTRPG campaign memory: characters, sessions, and more.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/fannnnnnn5822/tavern-tanuki'
If you have feedback or need assistance with the MCP directory API, please join our Discord server