# Z.AI MCP for AI Agents MCP

> Z.AI is an MCP that connects your AI agent to a full suite of multimodal tools. You can generate images and videos, transcribe audio, parse complex documents, and search the web through a single connection. It puts GLM models, OCR, and automated content creation into your existing workflow without needing to write any custom API code. It's the fastest way to add multimodal capabilities to your agent.

## Overview
- **Category:** developer-tools
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/undefined/mcp
- **Tags:** llm, glm, image-generation, video-generation, audio-transcription, ocr, web-search, multimodal

## Description

Z.AI is the gateway to a full suite of multimodal tools. Imagine you're building a content pipeline where you need to turn a rough idea into a finished video, a set of slides, and a translated summary. Usually, this means jumping between different apps, managing multiple API keys, and wrestling with different formatting rules. With this MCP, you just tell your agent what you need. It handles the heavy lifting of generating the video, creating the slide deck, and pulling in web research to back up your points. You don't have to worry about how the data moves between these different tasks because the agent handles the connections for you. It's a way to turn a chat window into a full-scale production studio. You can find it in the Vinkius catalog to get started quickly. This setup lets you move from a text prompt to a finished multimodal asset in one go, keeping your workflow focused on the creative side of the job.

## Tools

### agent_chat
Run specialized agents for translation, slide generation, or special effects videos. It handles complex requests like creating a whole slide deck from a prompt.

### audio_transcription
Turn .wav or .mp3 files into text with support for specific hotwords. It's great for getting accurate notes from meetings or recordings.

### chat_completion
Get responses from GLM models with support for images, audio, and video inputs. It lets your agent handle multimodal prompts in a single step.

### get_conversation_history
Pull back past results from your slide and poster agent sessions. This is useful for keeping track of previous content you've generated.

### generate_image_async
Start long-running image generation tasks and get a task ID to check back later. Use this for high-quality images that take a few seconds to render.

### generate_image
Create high-quality images from text prompts with specific size and quality controls. It gives you direct URLs for images based on your description.

### generate_video
Create videos from text, images, or frames using CogVideoX or Vidu models. It handles text-to-video and image-to-video tasks for you.

### get_async_result
Check the status of an image or video task and grab the final URL. You use this to see when your generation is finished and get the file.

### layout_parsing
Extract text and bounding boxes from PDFs and images into clean markdown. It keeps the structure of your documents intact for easier reading.

### tokenize
Count tokens for text, images, and videos to manage your context window and costs. It helps you see exactly how much space your prompts are taking up.

### web_reader
Turn any URL into clean markdown or text with metadata. It lets your agent read a website and summarize it without you having to copy-paste.

### web_search
Search the internet for summaries, titles, and URLs with a specific time range. It helps your agent find current information to back up its answers.

## Prompt Examples

**Prompt:** 
```
Find some recent news about space exploration and write a short summary.
```

**Response:** 
```
I found some recent updates on space exploration:

*   **Mars Rover Update**: New images show unique rock formations.
*   **Lunar Gateway**: Construction is ahead of schedule for the new station.
*   **Private Spaceflight**: A new mission is planned for late 2026.

Would you like me to dive deeper into any of these stories?
```

**Prompt:** 
```
I have a transcript of a meeting. Can you summarize the main points?
```

**Response:** 
```
Based on the transcript provided, here are the key takeaways:

| Topic | Action Item | Owner |
| :--- | :--- | :--- |
| Budget | Approve Q4 spending | Finance Team |
| Launch | Finalize marketing assets | Creative Team |
| Hiring | Open 3 new engineering roles | HR |

**Next Steps:** The team will reconvene next Tuesday to review the finalized budget.
```

**Prompt:** 
```
Generate a high-quality image of a cyberpunk street in the rain.
```

**Response:** 
```
Generating your image with the GLM-Image model...

Done! Here is the link to your image: https://example.com/generated/cyberpunk_street_01.png

It features a neon-lit alleyway with reflections in the puddles and a moody atmosphere. Would you like me to generate some variations?
```

## Capabilities

### Generate high-quality images
Create images from text prompts using various models and quality settings.

### Create videos from text or images
Produce video content with control over duration, resolution, and style.

### Transcribe audio files
Convert speech to text with support for hotwords and long-form recordings.

### Parse complex document layouts
Extract text and structure from PDFs and images into clean markdown.

### Search the live web
Retrieve current news, summaries, and URLs to keep your agent's data fresh.

### Convert web pages to markdown
Parse any URL into clean text for easier analysis by your agent.

### Automate slide and poster creation
Generate visual presentations and posters from natural language requests.

## Use Cases

### Social Media Production
A manager asks the agent to find three news stories about AI and create a 5-slide poster for Instagram using web_search and agent_chat.

### Automated Document Extraction
A researcher provides a 50-page PDF and asks the agent to extract all tables into markdown using layout_parsing.

### Rapid Feature Prototyping
A developer asks the agent to translate a paragraph into 5 languages to test a new app feature using agent_chat.

### Video Content Generation
A YouTuber asks the agent to generate a 10-second video based on a scene description using generate_video.

## Benefits

- Create high-quality images and videos without leaving your chat window by using generate_image and generate_video.
- Turn messy PDFs into structured markdown instantly with layout_parsing to save hours of manual data entry.
- Keep your agent's information current by using web_search and web_reader to pull in live news and summaries.
- Convert long meetings or voice notes into searchable text using audio_transcription for faster team follow-ups.
- Produce professional slides and posters in seconds with the agent_chat tool for rapid content creation.
- Manage your costs and context limits accurately by using tokenize to see the exact data footprint of your prompts.

## How It Works

The bottom line is you get a multimodal bridge that turns prompts into videos, images, and parsed data.

1. Create a Z.AI API key in your account dashboard.
2. Connect the MCP to your AI client and enter your key.
3. Ask your agent to generate content, parse docs, or search the web.

## Frequently Asked Questions

**How do I get my Z.AI API key?**
Visit the [Z.AI API Keys page](https://z.ai/manage-apikey/apikey-list) to create or manage your API key. Once created, copy it and paste it into the API key field in the setup wizard. The key is used as a Bearer token in the Authorization header for all API requests.

**Which Z.AI models are available?**
The MCP supports all Z.AI models: **GLM-5.2**, GLM-5.1, GLM-5-Turbo, GLM-4.7, GLM-4.7-flash, GLM-4.6, GLM-4.5 series for chat; **GLM-Image** and CogView-4 for image generation; **CogVideoX-3** and Vidu for video generation; **GLM-ASR-2512** for audio transcription; **GLM-OCR** for layout parsing; and **search-prime** for web search.

**Can my AI generate images and videos?**
Yes! Use `generate_image` for synchronous image generation (returns URLs immediately), or `generate_image_async` for long-running tasks (returns a task ID — use `get_async_result` to retrieve). For video, use `generate_video` which always runs asynchronously — call `get_async_result` with the returned task ID to check status and get the video URL when complete.

**Does the Z.AI MCP support multimodal inputs?**
Yes. The `chat_completion` tool supports multimodal inputs including text, images (image_url), video (video_url), and files (file_url) when using vision models like GLM-5V-Turbo. Pass the full messages array as JSON with the appropriate content types. The `layout_parsing` tool also supports both image and PDF inputs for OCR.

**What is the base URL for Z.AI API calls?**
All Z.AI API calls are sent to `https://api.z.ai/api`. The engine automatically appends the correct path prefix (e.g. `/paas/v4/` for platform APIs, `/v1/` for agent APIs). When using the GLM Coding Plan, you may need to configure a dedicated endpoint — refer to the Z.AI documentation for details.

**Can I use the Z.AI agents for translation and slide generation?**
Yes. The `agent_chat` tool supports three agent types: **general_translation** (multilingual translation with 40+ languages, auto-detection, glossary support), **slides_glm_agent** (one-click slide/poster generation from natural language), and **vidu_template_agent** (special effects video generation). After running the slides agent, use `get_conversation_history` with the conversation_id to retrieve generated file URLs.

**Is there a rate limit on Z.AI APIs?**
Yes, Z.AI enforces rate limits that vary by model and subscription tier. Check the [Z.AI Rate Limits page](https://z.ai/manage-apikey/rate-limits) for your specific limits. If you exceed the rate limit, the API returns an error and the engine surfaces the error message. For high-volume use cases, consider using async endpoints and spacing out requests.