Back to Home
ex-takashima icon

glm-image-mcp-server

Verified Safe

by ex-takashima

Overview

MCP server and CLI tool for generating images using Z.AI's glm-image model.

Installation

Run Command
node dist/index.js

Environment Variables

  • Z_AI_API_KEY
  • OUTPUT_DIRECTORY

Security Notes

The code explicitly implements path traversal protection using `isPathWithinDirectory` and `getSafeOutputPath` when downloading and saving images, which is a strong security measure. API keys are loaded from environment variables (`process.env.Z_AI_API_KEY`) and checked for existence, preventing hardcoded secrets. No use of `eval` or obvious obfuscation was found. The main network risks are standard API calls and image downloads, handled by the `axios` library with reasonable timeouts. Overall, the server appears to be developed with good security practices.

Similar Servers

Stats

Interest Score0
Security Score9
Cost ClassMedium
Avg Tokens100
Stars0
Forks0
Last Update2026-01-17

Tags

Image GenerationMCPZ.AICLITypeScript