# Use AI agents with the Postman API from the Postman VS Code extension With the Postman VS Code extension, you can integrate the [Postman Model Context Protocol (MCP) server](https://www.postman.com/postman/postman-public-workspace/collection/681dc649440b35935978b8b7) with your AI agent in VS Code. This enables you to manage your Postman resources, like [workspaces](/docs/collaborating-in-postman/using-workspaces/overview/) and [collections](/docs/collections/use-collections/use-collections-overview/), with your agent using the Postman API. This integration uses the [streamable HTTP Postman MCP server](/docs/developer/postman-api/postman-mcp-server/set-up-postman-mcp-server/#remote-server) with the minimal tool configuration mode, which includes tools for basic Postman operations. You can also [manually integrate the Postman MCP server with VS Code](/docs/developer/postman-api/postman-mcp-server/set-up-postman-mcp-server/#manual-installation). ## Create the Postman MCP server integration To get started, integrate the Postman MCP server with your AI agent in VS Code. An API key is generated to authenticate with Postman, giving your AI agent permission to manage your Postman resources with the Postman API. Learn about [using AI agents in VS Code](https://code.visualstudio.com/docs/copilot/chat/chat-agent-mode). To integrate the Postman MCP server with VS Code, do the following: 1. Click MCP icon **Add / Update Postman MCP**. 2. Click **Add MCP** in the in-app notification. An API key is generated for your user account. If the API key isn't generated for you, learn how to [manually generate an API key](#manually-generate-an-api-key). Learn about [tips and best practices](/docs/developer/postman-api/postman-mcp-server/postman-mcp-server-tips/) for using the Postman MCP server. ### Manually generate an API key If the API key isn’t generated when you set up the Postman MCP server, you can create one instead. 1. Click MCP icon **Add / Update Postman MCP**. 2. Click **Add MCP** in the in-app notification. 3. Choose one of the following in the in-app notification: * Click **Generate API Key** to open Postman and [create a Postman API key](/docs/developer/postman-api/authentication/#generate-a-postman-api-key). * Click **I already have a key** if you already have a Postman API key you'd like to use. 4. Enter your Postman API key then press **Return** or **Enter**. ## Update your Postman API key Update the Postman API key you're using to authenticate with Postman. Make sure to delete Postman API keys you're no longer using. To update your Postman API key, do the following: 1. Create a new [Postman API key](https://go.postman.co/settings/me/api-keys). 2. Click MCP icon **Add / Update Postman MCP**. 3. Click **Update API Key** in the in-app notification. 4. Enter your new Postman API key then press **Return** or **Enter**. ## Use language model tools The Postman VS Code extension provides language model tools that make the AI agent context-aware about the extension's state and enable the AI agent to interact with the extension. To view the available tools, open the **Chat** view and select the **Configure Tools** button. You can specify the tool to use with your prompt or let the AI agent infer the tool you need for your task. For example, you can ask it to add some requests to your current workspace using the **getCurrentWorkspace** tool. To learn more, see [Use tools in your prompts](https://code.visualstudio.com/docs/copilot/chat/chat-tools#_use-tools-in-your-prompts).