Using Postman MCP Server with Gemini CLI for API Workflows
Quick Overview
The video demonstrates a complete workflow for using the Gemini CLI with the Postman MCP (Monitor, Collection, and Project) Server extension to analyze existing code, generate a Postman collection, add tests to that collection, and set up monitoring, all through command-line interactions.
Key Points: The Postman MCP Server extension for Gemini CLI was installed using the command: 'gemini extensions install https://github.com/postmanlabs/postman-mcp-server' (0:46). API key configuration for the Postman MCP Server extension can be done by exporting the environment variable POSTMANAPIKEY or setting it in the extension's .env file (1:05-1:16). The Gemini CLI was used to analyze a sample 'server.js' file, which generated a 'Planets API Collection' in the specified Postman workspace (2:54-3:02). Tests were added to the newly created Postman collection using the command: 'gemini postman mcp server add tests to the "Planets API Collection"' (3:42-3:49). The generated tests included status code checks (200 OK), validation of a 'success' property, verification of a 'data' array for GET /planets, and checking for specific properties like 'distanceFromSun' and 'diameter' for individual planet requests (3:44). Monitoring support was added to the collection to run hourly and send notifications on test failures by invoking the Postman MCP Server (4:30-4:47). Finally, Gemini generated a new React application structure based on the Postman collection structure, including necessary service files and components (6:03-7:06).
Context: Quinton Wall, Head of Developer Relations at Postman, demonstrates how to leverage the Gemini CLI in conjunction with the Postman MCP Server extension to automate API workflow tasks. This process starts with integrating the extension, then uses it to analyze existing server code (a sample 'server.js' file), automatically generating a Postman Collection, adding automated tests to it, and finally setting up a monitor for continuous testing and failure notifications.