NovelAI_MCP
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., "@NovelAI_MCPgenerate an image of two characters, a knight and a mage"
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.
NovelAI MCP Server
📌 本仓库基于 SGSxingchen/NovelAI_MCP 二次开发,保留了原作者的完整提交历史,感谢原作者的贡献。
💡 搭配推荐:配合 novelai-assistant(面向 AI Agent 的 NovelAI 提示词工程 Skill)使用,AI 可自动将自然语言描述转换为 Danbooru 风格提示词,再交给本 MCP Server 生成图片。
一个功能完整的 Model Context Protocol (MCP) 服务器,为 NovelAI 图像生成 API 提供支持
English | 简体中文
✨ 特性
🎨 最新模型支持 - 完整支持 NAI Diffusion V4.5 Full
🚀 双传输模式 - Stdio、HTTP SSE、Streamable HTTP
🎭 多角色支持 - V4+ 角色定位和独立提示词系统
📝 中文优化 - 工具描述使用中文,AI 更准确识别调用时机
🔧 灵活部署 - 支持本地运行或 Docker 容器化
Related MCP server: MCP Image Generator
📦 快速开始
安装
# 克隆项目
git clone https://github.com/2332239652/NovelAI_MCP.git
cd NovelAI_MCP
# 安装依赖
npm install
# 编译
npm run build配置
方式一:Stdio 模式(Claude Desktop)
在 Claude Desktop 配置文件中添加:
{
"mcpServers": {
"novelai": {
"command": "node",
"args": ["项目路径/dist/index.js"],
"env": {
"NOVELAI_API_KEY": "your-api-key-here"
}
}
}
}方式二:Streamable HTTP 模式(LobeChat/Dify 推荐)
Linux/Mac:
export NOVELAI_API_KEY="your-api-key"
export HTTPS_PROXY="http://127.0.0.1:7890" # 可选:设置代理
npm run start:httpWindows PowerShell:
$env:NOVELAI_API_KEY="your-api-key"
$env:HTTPS_PROXY="http://127.0.0.1:7890" # 可选:设置代理
npm run start:httpWindows CMD:
set NOVELAI_API_KEY=your-api-key
set HTTPS_PROXY=http://127.0.0.1:7890
npm run start:http在客户端配置中添加:
URL:
http://localhost:3000/mcp传输: Streamable HTTP
方式三:SSE 模式(备选)
Linux/Mac:
export NOVELAI_API_KEY="your-api-key"
export HTTPS_PROXY="http://127.0.0.1:7890" # 可选
npm run start:sseWindows PowerShell:
$env:NOVELAI_API_KEY="your-api-key"
$env:HTTPS_PROXY="http://127.0.0.1:7890"
npm run start:sseWindows CMD:
set NOVELAI_API_KEY=your-api-key
set HTTPS_PROXY=http://127.0.0.1:7890
npm run start:sse在客户端配置中添加:
URL:
http://localhost:3000/sse传输: Server-Sent Events (SSE)
🎯 支持的模型
当前版本专注于最新的 NovelAI V4.5 模型:
模型 | 说明 |
| NAI Diffusion V4.5 Full(唯一支持的模型) |
🔧 核心参数
参数 | 类型 | 说明 |
| string | 全局场景和风格描述 |
| string | 全局负面提示词 |
| array | 角色数组(单人/多人都要用) |
| number | 图片尺寸(必须是 64 的倍数) |
| number | 采样步数(锁定 28,免费限制) |
完整参数列表请查看 快速参考。
📊 传输模式对比
特性 | Stdio 模式 | Streamable HTTP | SSE 模式 |
适用场景 | Claude Desktop | LobeChat、Dify(推荐) | SSE 客户端 |
协议标准 | MCP Stdio | MCP Streamable HTTP | MCP SSE Transport |
端点 | - |
|
|
远程访问 | ❌ | ✅ | ✅ |
多客户端 | ❌ | ✅ | ✅ |
代理支持 | ❌ | ✅ | ✅ |
启动命令 |
|
|
|
🌍 环境变量
变量 | 必需 | 默认值 | 说明 |
| ✅ | - | NovelAI API 密钥 |
| ❌ | 3000 | HTTP 服务器端口(仅 HTTP 模式) |
| ❌ | - | HTTPS 代理地址 |
| ❌ | - | HTTP 代理地址 |
📚 文档
🛠️ 开发
# 克隆仓库
git clone https://github.com/2332239652/NovelAI_MCP.git
cd NovelAI_MCP
# 安装依赖
npm install
# 编译
npm run build
# 开发模式
npm run dev
# 启动 HTTP 服务器
npm run start:http🐳 Docker 部署(可选)
项目包含 Dockerfile,可以自行构建:
# 构建镜像
docker build -t novelai-mcp-server .
# 运行容器
docker run -d \
-p 3000:3000 \
-e NOVELAI_API_KEY="your-api-key" \
--name novelai-mcp \
novelai-mcp-server🤝 贡献
欢迎提交 Issue 和 Pull Request!
Fork 本项目
创建特性分支 (
git checkout -b feature/AmazingFeature)提交更改 (
git commit -m 'Add some AmazingFeature')推送到分支 (
git push origin feature/AmazingFeature)开启 Pull Request
📄 许可证
本项目采用 MIT 许可证 - 查看 LICENSE 文件了解详情。
🙏 致谢
NovelAI - 提供强大的图像生成 API
Model Context Protocol - MCP 协议规范
Anthropic - MCP SDK 和 Claude
🔗 相关链接
如果这个项目对你有帮助,请给个 ⭐️!
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
- AlicenseBqualityDmaintenanceModel Context Protocol (MCP) server for NovelAI image generation. Create high-quality anime art with advanced features like character positioning and V4 prompts.Last updated130MIT
- Alicense-qualityDmaintenanceMCP server for AI image generation supporting multiple providers (OpenRouter, Together AI, Replicate, fal.ai) and compatible with various MCP agents.Last updated181MIT
- Alicense-qualityDmaintenanceMCP server for generating images using OpenRouter API, supporting models like Gemini 2.5 Flash. Enables image generation with flexible options like saving to local files.Last updatedDo What The F*ck You Want To Public
- Flicense-qualityDmaintenanceMCP server for AI image generation supporting text-to-image and image-to-image editing via any OpenAI-compatible service, with configurable models, aspect ratios, and sizes.Last updated
Related MCP Connectors
MCP server for Flux AI image generation
MCP server for Hailuo (MiniMax) AI video generation
MCP server for NanoBanana AI image generation and editing
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/2332239652/NovelAI_MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server