- Add postman-docs MCP server to plugin.json (v1.1.0) - Update command instructions to use docs MCP for "how do I" questions - Update README with documentation intelligence section - Plugin now combines operations (scripts) + knowledge (docs MCP) This turns AI into a true Postman expert that can both execute and explain. Jon Konrath's Learning Center MCP endpoint: https://learning.postman.com/_mcp/server Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
9.3 KiB
description
| description |
|---|
| Manage Postman collections, environments, monitors, and APIs |
Postman Command
Execute Postman API operations to manage your API lifecycle. This command provides access to Postman collections, environments, monitors, and more through Python scripts.
Documentation Intelligence
This plugin includes the Postman Learning Center MCP (postman-docs) for documentation access. Use it when:
- User asks "how do I..." questions about Postman features
- User needs best practices or guidance
- User asks about V12, Agent Mode, or new features
- User wants to understand a concept before executing
For "how do I" questions: Query the postman-docs MCP first to get accurate documentation, then execute the operation.
For execution requests: Run the scripts directly, but reference docs if the user seems confused.
Prerequisites
Before using this command, ensure:
- A
.envfile exists in thepostman-slash-command/directory withPOSTMAN_API_KEYset - Python 3 is available
curlis installed (usually pre-installed on macOS and Linux)- Optional:
python-dotenvfor easier .env loading (has fallback if not available)
If the user hasn't set up their environment yet, guide them through:
cd postman-slash-command
cp .env.example .env
# Edit .env and add POSTMAN_API_KEY=PMAK-your-key-here
Available Operations
Discovery & Listing
List all resources:
python postman-slash-command/scripts/list_collections.py --all
List collections only:
python postman-slash-command/scripts/list_collections.py
List environments:
python postman-slash-command/scripts/list_collections.py --environments
List monitors:
python postman-slash-command/scripts/list_collections.py --monitors
List APIs:
python postman-slash-command/scripts/list_collections.py --apis
Collection Management
List collections:
python postman-slash-command/scripts/manage_collections.py --list
Get collection details:
python postman-slash-command/scripts/manage_collections.py --get <collection-id>
Create new collection:
python postman-slash-command/scripts/manage_collections.py --create --name="My Collection"
Update collection:
python postman-slash-command/scripts/manage_collections.py --update <collection-id> --name="New Name"
Delete collection:
python postman-slash-command/scripts/manage_collections.py --delete <collection-id>
Duplicate collection:
python postman-slash-command/scripts/manage_collections.py --duplicate <collection-id> --name="Copy"
Environment Management
List environments:
python postman-slash-command/scripts/manage_environments.py --list
Create environment:
python postman-slash-command/scripts/manage_environments.py --create --name="Development"
Get environment details:
python postman-slash-command/scripts/manage_environments.py --get <environment-id>
Update environment:
python postman-slash-command/scripts/manage_environments.py --update <environment-id> --name="New Name"
Delete environment:
python postman-slash-command/scripts/manage_environments.py --delete <environment-id>
Duplicate environment:
python postman-slash-command/scripts/manage_environments.py --duplicate <environment-id> --name="Copy"
Monitor Management
List monitors:
python postman-slash-command/scripts/manage_monitors.py --list
Get monitor details:
python postman-slash-command/scripts/manage_monitors.py --get <monitor-id>
Analyze monitor runs:
python postman-slash-command/scripts/manage_monitors.py --analyze <monitor-id> --limit 10
Test Execution
Run collection tests:
python postman-slash-command/scripts/run_collection.py --collection="Collection Name"
Run with environment:
python postman-slash-command/scripts/run_collection.py --collection="Collection Name" --environment="Environment Name"
Agent-Readiness Analysis
Analyze APIs to determine if they're ready for AI agents to discover, understand, and self-heal from errors. Uses Clara, the AI Agent API Readiness Analyzer.
Analyze a local OpenAPI spec:
python postman-slash-command/scripts/analyze_agent_readiness.py ./openapi.yaml
Analyze a spec from URL:
python postman-slash-command/scripts/analyze_agent_readiness.py --url https://petstore3.swagger.io/api/v3/openapi.json
Analyze a Postman collection:
python postman-slash-command/scripts/analyze_agent_readiness.py --collection <collection-id>
Get detailed JSON output:
python postman-slash-command/scripts/analyze_agent_readiness.py ./openapi.yaml --json
Save reports to files:
python postman-slash-command/scripts/analyze_agent_readiness.py ./openapi.yaml -o report.json -o report.md
What Clara Checks
Clara analyzes APIs across 8 pillars:
- Metadata - operationIds, summaries, descriptions
- Errors - Structured error responses with codes and details
- Introspection - Parameter types, required fields, examples
- Naming - Consistent casing, RESTful paths
- Predictability - Response schemas, pagination patterns
- Documentation - Auth docs, rate limits
- Performance - Response times, rate limit headers
- Discoverability - Server URLs, spec accessibility
Understanding Results
- Score 70%+ with no critical failures = Agent Ready
- Below 70% or critical failures = Not Agent Ready
- Priority Fixes = Most impactful improvements, ranked by severity x endpoints affected
For conceptual questions about agent-ready APIs, refer to skills/knowledge/agent-ready-apis.md.
How to Respond
When the user asks about Postman:
-
Understand the intent - What do they want?
For "how do I" / conceptual questions:
- "How do I set up OAuth?" → Query
postman-docsMCP for authentication docs - "What's the best way to organize collections?" → Query
postman-docsMCP for best practices - "What's new in V12?" → Query
postman-docsMCP for V12 features - "How do monitors work?" → Query
postman-docsMCP, then offer to show their monitors
For action/execution requests:
- List resources? → Use list_collections.py
- Manage collections? → Use manage_collections.py
- Manage environments? → Use manage_environments.py
- Check monitors? → Use manage_monitors.py
- Run tests? → Use run_collection.py
- Check agent-readiness? → Use analyze_agent_readiness.py
- Ask about API design for AI? → Reference skills/knowledge/agent-ready-apis.md
- "How do I set up OAuth?" → Query
-
Execute the appropriate action - Query docs OR run scripts based on intent
-
Parse and present results - Format the output in a user-friendly way
-
Suggest next steps - Based on what they accomplished, suggest related actions
Examples
Example 1: User wants to see their collections
User: "Show me my Postman collections"
You should:
- Run:
python postman-slash-command/scripts/list_collections.py - Parse the output
- Present in a clear format
- Ask if they want to do anything with the collections
Example 2: User wants to create a new collection
User: "Create a new collection called 'Payment API Tests'"
You should:
- Run:
python postman-slash-command/scripts/manage_collections.py --create --name="Payment API Tests" - Confirm success
- Show the collection ID
- Ask if they want to add requests to it
Example 3: User wants to check monitor status
User: "How is my API monitoring doing?"
You should:
- First list monitors:
python postman-slash-command/scripts/manage_monitors.py --list - For each monitor, analyze runs:
python postman-slash-command/scripts/manage_monitors.py --analyze <monitor-id> --limit 5 - Summarize the health (success rates, response times, recent failures)
- Alert if any monitors are failing
Example 4: User wants to check if their API is agent-ready
User: "Is my Payment API ready for AI agents?"
You should:
- Find or ask for the OpenAPI spec location
- Run:
python postman-slash-command/scripts/analyze_agent_readiness.py ./payment-api.yaml - Present the overall score and agent-ready status
- Highlight critical issues that block agent usage
- Show top priority fixes with specific recommendations
- Offer to explain any pillar in more detail
User: "Why can't AI agents use my API well?"
You should:
- Run agent-readiness analysis
- Focus on failed checks, especially critical ones
- Explain the impact: "Missing operationIds means agents can't reference your endpoints uniquely"
- Reference
skills/knowledge/agent-ready-apis.mdfor detailed explanations - Suggest specific fixes with examples
Error Handling
If a script fails:
- Check if
.envfile exists and hasPOSTMAN_API_KEY - Verify the API key is valid (starts with
PMAK-) - Check if the resource ID/name is correct
- Provide helpful error messages to the user
Notes
- All scripts automatically load configuration from
.envfile - Scripts use retry logic for rate limits
- Collection/environment IDs are UUIDs (e.g.,
12345678-1234-1234-1234-123456789012) - Monitor IDs are shorter alphanumeric strings
- Use
--helpflag on any script to see all available options