vllm_mlx.mcp¶
MCP (Model Context Protocol) client support for vllm-mlx.
View the complete module source at #L1-L85.
API details¶
Each callable below includes its exact signature, type annotations, inputs, defaults, return contract, documented exceptions, implementation source, and parsed docstring sections when the source provides them.
vllm_mlx.mcp
¶
MCP (Model Context Protocol) client support for vllm-mlx.
This module provides integration with MCP servers, allowing the vllm-mlx server to discover and execute tools from external MCP servers.
Example usage
from vllm_mlx.mcp import MCPClientManager, load_mcp_config
config = load_mcp_config("./mcp.json") manager = MCPClientManager(config) await manager.start()
Get all available tools in OpenAI format¶
tools = manager.get_all_tools()
Execute a tool call¶
result = await manager.execute_tool("filesystem__read_file", {"path": "/tmp/test.txt"})
vllm_mlx.mcp.__all__
module-attribute
¶
__all__ = ['MCPServerConfig', 'MCPConfig', 'MCPTool', 'MCPToolResult', 'MCPServerStatus', 'load_mcp_config', 'validate_config', 'MCPClient', 'MCPClientManager', 'mcp_tool_to_openai', 'openai_call_to_mcp', 'format_tool_result', 'ToolExecutor', 'ToolArgumentValidationError', 'validate_tool_arguments', 'MCPSecurityError', 'MCPCommandValidator', 'ALLOWED_COMMANDS', 'validate_mcp_server_config', 'get_validator', 'set_validator', 'ToolSandbox', 'ToolExecutionAudit', 'get_sandbox', 'set_sandbox', 'DANGEROUS_TOOL_ARG_PATTERNS', 'HIGH_RISK_TOOL_PATTERNS']
Complete contract reference¶
Expand any definition for its exact inputs, annotations, defaults, return contract, directly raised exceptions, source-grounded behavior, and immutable line link. This section includes private and nested definitions that ordinary API generators omit.
This module does not declare classes or functions.
Complete symbol map¶
This map also includes private definitions and nested helpers. The signature column exposes every explicit input even when an internal helper has no dedicated parameter prose.
This module does not declare classes or functions.