wj-mcp-server
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., "@wj-mcp-serverGenerate a photorealistic 2K image of a red fox in a snowy forest at dawn"
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.
wj-mcp-server
把现有 WJ 生图能力开放为 ChatGPT Work 可连接的远程 MCP 插件。第一版没有团队、成员或后台管理概念,使用一个共享 OAuth 口令控制访问。
已实现
标准 MCP Streamable HTTP 端点:
POST /mcpgenerate_image工具,默认模型gpt-image-2支持
nano-banana-2、常用宽高比、1K/2K/4K和参考图 URLMCP Apps 图片组件,在支持的 ChatGPT 客户端中直接显示图片
不支持组件的客户端仍会收到 Markdown 图片和原图链接
OAuth 2.1 授权码流程、PKCE、动态客户端注册和刷新令牌
Redis 持久化 OAuth 数据、分钟/每日限额和登录防爆破
服务端 WJ Key,不向 ChatGPT 或浏览器泄露
Docker Compose、健康检查和宝塔/Nginx 反代示例
Related MCP server: universal-image-mcp
调用链路
ChatGPT Work
-> HTTPS /mcp + OAuth
-> wj-mcp-server
-> POST https://wj.zaowuwujie.ltd/api/v1/proxy/ai/generate/image
-> wj-server / wj-ai-server / LiteLLM
-> public image URL
-> MCP Apps inline image componentwj-mcp-server 不直接请求 LiteLLM。它使用 WJ 开放平台接口,因此保留 WJ 已有的 Key、额度、日志和模型路由。
本地开发
要求 Node.js 22.13+、pnpm 11.16+ 和 Redis。
pnpm install
cp .env.example .env
pnpm secrets把 pnpm secrets 输出的两行填入 .env,再设置:
NODE_ENV=development
PUBLIC_BASE_URL=http://127.0.0.1:6070
TRUST_PROXY=false
ALLOWED_HOSTS=127.0.0.1,localhost
REDIS_URL=redis://127.0.0.1:6379
WJ_API_KEY=你的WJ开放平台Key
MCP_SHARED_PASSWORD=至少12位的共享访问口令启动:
pnpm dev检查地址:http://127.0.0.1:6070/healthz。MCP Inspector 可用 pnpm inspect 启动,然后连接 http://127.0.0.1:6070/mcp。
Ubuntu 发布
推荐使用独立子域名,例如 mcp.wj.zaowuwujie.ltd,避免 OAuth 的 /auth、/token、/reg 等路径与现有网站冲突。
为子域名添加指向腾讯云服务器的 A 记录。
在宝塔新建该子域名的 Nginx 站点并申请 Let's Encrypt 证书。
把本项目上传到服务器,执行
cp .env.example .env。执行
pnpm secrets,把输出写入.env。设置
WJ_API_KEY、强共享口令、真实PUBLIC_BASE_URL和ALLOWED_HOSTS。参考
deploy/nginx.conf.example配置反向代理;SSL 仍交给宝塔管理。启动并检查:
docker compose up -d --build
docker compose ps
curl https://mcp.wj.zaowuwujie.ltd/healthz
curl https://mcp.wj.zaowuwujie.ltd/.well-known/oauth-protected-resource/mcp不要把容器的 6070 端口直接暴露到公网。示例 Compose 只绑定 127.0.0.1:6070,公网统一经过 HTTPS Nginx。
在 ChatGPT Work 中连接
打开“工作”模式,进入“连接插件”或插件管理页。
选择“新插件”。
名称填
WJ 生图。服务器 URL 填
https://mcp.wj.zaowuwujie.ltd/mcp。身份验证选择
OAuth。勾选自定义 MCP 风险确认后创建。
浏览器会打开 WJ 授权页,输入
.env中的MCP_SHARED_PASSWORD,再确认授权。
每个互不关联的 ChatGPT 账号都重复一次连接即可。成员不需要也不应拿到 WJ_API_KEY。只知道 MCP URL 的人会收到 401,没有共享口令无法取得访问令牌或调用生图。
推荐使用规则见 docs/chatgpt-instructions.md。显式说“使用 WJ 生图”可以稳定触发;ChatGPT 内置生图限流后的回退取决于平台是否把失败暴露给模型,MCP 服务本身无法读取账号内部额度。
运维与安全
泄露共享口令时,修改
MCP_SHARED_PASSWORD,并清理 Redis 中的 OAuth 状态后让成员重新连接。只修改口令不会撤销已经签发的刷新令牌。泄露 WJ Key 时,在 WJ 开放平台撤销并重发。不要把真实 Key 提交到 Git。
IMAGE_DAILY_LIMIT是第一版的全局成本上限。因为还没有团队身份,所有连接共享同一额度池。图片 CDN 改变时,把新 HTTPS Origin 加入
IMAGE_RESOURCE_DOMAINS,否则 ChatGPT Widget 的 CSP 会阻止图片加载。建议备份 Docker volume
redis-data,否则恢复后需要成员重新授权。
验证
pnpm check该命令依次运行 TypeScript 检查、自动化测试、MCP Apps 单文件构建和服务端构建。
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
- AlicenseBqualityAmaintenanceA remote MCP image generation server that unifies OpenAI Images and Gemini generateContent APIs with preset-based configuration for multi-provider support.6MIT
- AlicenseAqualityDmaintenanceMCP server for multi-provider AI image generation (AWS Bedrock, OpenAI, Google Gemini) enabling image generation, transformation, and editing through a unified interface.41MIT
- Flicense-qualityBmaintenanceA local MCP gateway that provides image generation and editing tools via external APIs (e.g., DALL-E) and local ComfyUI workflows, with authentication and policy enforcement.
- Flicense-qualityBmaintenanceEnables Claude to generate images by wrapping the Manus API through a remote MCP server with OAuth authentication.
Related MCP Connectors
Security-first WordPress MCP server. 129 tools for Claude, ChatGPT, Gemini. Free on wp.org.
MCP Hub: AI service discovery, per-user OAuth, and multi-service workflow orchestration
OCR, transcription, file extraction, and image generation for AI agents via MCP.
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/sultan-young/wj-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server