Skip to content

Postman

The Postman MCP Server connects your ADK agent to the Postman ecosystem. This integration gives your agent the ability to access workspaces, manage collections and environments, evaluate APIs, and automate workflows through natural language interactions.

Use cases

  • API testing: Continuously test your APIs using your Postman collections.

  • Collection management: Create and tag collections, update documentation, add comments, or perform actions across multiple collections without leaving your editor.

  • Workspace and environment management: Create workspaces and environments, and manage your environment variables.

  • Client code generation: Generate production-ready client code that consumes APIs following best practices and project conventions.

Prerequisites

Use with agent

from google.adk.agents import Agent
from google.adk.tools.mcp_tool import McpToolset
from google.adk.tools.mcp_tool.mcp_session_manager import StdioConnectionParams
from mcp import StdioServerParameters

POSTMAN_API_KEY = "YOUR_POSTMAN_API_KEY"

root_agent = Agent(
    model="gemini-2.5-pro",
    name="postman_agent",
    instruction="Help users manage their Postman workspaces and collections",
    tools=[
        McpToolset(
            connection_params=StdioConnectionParams(
                server_params=StdioServerParameters(
                    command="npx",
                    args=[
                        "-y",
                        "@postman/postman-mcp-server",
                        # "--full",  # Use all 100+ tools
                        # "--code",  # Use code generation tools
                        # "--region", "eu",  # Use EU region
                    ],
                    env={
                        "POSTMAN_API_KEY": POSTMAN_API_KEY,
                    },
                ),
                timeout=30,
            ),
        )
    ],
)
from google.adk.agents import Agent
from google.adk.tools.mcp_tool import McpToolset
from google.adk.tools.mcp_tool.mcp_session_manager import StreamableHTTPServerParams

POSTMAN_API_KEY = "YOUR_POSTMAN_API_KEY"

root_agent = Agent(
    model="gemini-2.5-pro",
    name="postman_agent",
    instruction="Help users manage their Postman workspaces and collections",
    tools=[
        McpToolset(
            connection_params=StreamableHTTPServerParams(
                url="https://mcp.postman.com/mcp",
                # (Optional) Use "/minimal" for essential tools only
                # (Optional) Use "/code" for code generation tools
                # (Optional) Use "https://mcp.eu.postman.com" for EU region
                headers={
                    "Authorization": f"Bearer {POSTMAN_API_KEY}",
                },
            ),
        )
    ],
)

Configuration

Postman offers three tool configurations:

  • Minimal (default): Essential tools for basic Postman operations. Best for simple modifications to collections, workspaces, or environments.
  • Full: All available Postman API tools (100+ tools). Ideal for advanced collaboration and enterprise features.
  • Code: Tools for searching API definitions and generating client code. Perfect for developers who need to consume APIs.

To select a configuration:

  • Local server: Add --full or --code to the args list.
  • Remote server: Change the URL path to /minimal, /mcp (full), or /code.

For EU region, use --region eu (local) or https://mcp.eu.postman.com (remote).

Additional resources