chat/completions. Through MCP server calling, you can extend the model’s capability boundaries, implementing various functions such as search, visual understanding, file processing, data analysis, and more, providing powerful tool ecosystem support for AI applications.
Features
The MCP server calling feature integrates MCP tool calling capabilities inchat, supporting direct calls to chat/completions to connect and use various MCP servers to extend model functionality without requiring an MCP client. Through MCP server calling, AI can:
- Dynamic Tool Discovery: Automatically discover and enumerate tools provided by MCP servers
- Real-time Tool Calling: Call various tools and functions from external MCP servers
- Multi-protocol Support: Support SSE and Streamable-HTTP transport protocols
- Flexible Configuration: Support custom server addresses, authentication information, and tool permissions
- Zhipu Ecosystem: Built-in official Zhipu MCP servers, direct use without URL configuration
- Standard Compatibility: Fully compatible with MCP protocol standards, supporting third-party MCP servers
Supported Transport Protocols
SSE (Server-Sent Events)
- Use Cases: Real-time data streams, long connection scenarios
- Features: Unidirectional data flow, server-initiated push
- Simple Configuration: Pass authentication information through URL parameters
Streamable-HTTP
- Use Cases: Standard HTTP request-response
- Features: Bidirectional communication, supports complex interactions
- Flexible Configuration: Support custom Headers and parameters
Parameter Description
string
required
MCP server identifier. If connecting to official Zhipu MCP servers, use
mcp code to fill this field, no need to fill server_urlstring
MCP server address. Required when connecting to third-party MCP servers
string
default:"streamable-http"
Transport protocol type
sse: Server-Sent Events protocolstreamable-http: Standard HTTP protocol (default)
array
Collection of allowed tools to call. If not specified, all available tools are allowed
object
Authentication information and custom headers required by MCP server
Code Examples
- cURL
- Python
Connect to Official Zhipu MCP ServerConnect to Third-party MCP ServerUsing SSE Protocol
Application Scenarios
Intelligent Search
- Real-time information retrieval
- Web resource search
- News updates acquisition
Visual Analysis
- Image content recognition
- Video analysis processing
- Document image parsing
Data Processing
- File format conversion
- Data cleaning and organization
- Report generation and analysis
API Integration
- Third-party service calls
- Enterprise system integration
- Cloud service connections