Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
A direct command skips the review prompt. Inspect the source before running it.
Connect AI agents to Postman APIs for workspace management, collection operations, environment handling, and code generation
triggers
["help me manage my Postman collections","generate client code from my API definition","create a new Postman workspace","test my API using Postman","update my Postman environment variables","sync my code with Postman collections","create a spec from my API","search for public APIs in Postman"]
The Postman MCP Server connects AI tools to Postman, enabling agents to access workspaces, manage collections and environments, evaluate APIs, and automate workflows through natural language. It supports three configurations: Minimal (essential operations), Full (100+ tools), and Code (API definition search and client code generation).
Installation
Remote Server (Recommended)
The remote server is hosted by Postman and requires no local setup. It supports OAuth (US region) or API key authentication.
US Server: https://mcp.postman.comEU Server: https://mcp.eu.postman.com (API key only)
Claude Code Installation
OAuth (US only):
# Minimal (default)
claude mcp add --transport http postman https://mcp.postman.com/minimal
# Code generation
claude mcp add --transport http postman https://mcp.postman.com/code
# Full (100+ tools)
claude mcp add --transport http postman https://mcp.postman.com/mcp
{"servers":{"postman":{"type":"http","url":"https://mcp.postman.com/minimal","headers":{"Authorization":"Bearer ${input:postman-api-key}"}}},"inputs":[{"id":"postman-api-key","type":"promptString","description":"Enter your Postman API key"}]}
Cursor Installation
Click the install button or manually configure mcp.json:
Set environment variable: export POSTMAN_API_KEY=your_key_here
OAuth Setup (US Remote Server Only)
OAuth is automatically configured when using the US remote server without headers. The MCP host will handle authentication flow when tools are first accessed.
Core Capabilities
1. Workspace Management
Create a workspace:
// Via natural language to AI agent:// "Create a new team workspace called 'Mobile API' with description 'APIs for mobile app'"// The agent calls:
{
"tool": "create_workspace",
"arguments": {
"name": "Mobile API",
"type": "team",
"description": "APIs for mobile app"
}
}
List workspaces:
// "Show me all my workspaces"
{
"tool": "get_all_workspaces",
"arguments": {}
}
// "Create a new collection named 'User API' in my workspace"
{
"tool": "create_collection",
"arguments": {
"workspaceId": "workspace-123",
"name": "User API",
"description": "User management endpoints"
}
}
Add a request to collection:
// "Add a GET request to /users endpoint in my User API collection"
{
"tool": "create_request",
"arguments": {
"collectionId": "collection-456",
"name": "Get Users",
"method": "GET",
"url": "https://api.example.com/users",
"description": "Retrieve all users"
}
}
Update collection documentation:
// "Update the documentation for my User API collection"
{
"tool": "update_collection",
"arguments": {
"collectionId": "collection-456",
"collection": {
"info": {
"description": "# User API\n\nComplete user management API with CRUD operations."
}
}
}
}
Tag a collection:
// "Tag my collection with 'production' and 'v2'"
{
"tool": "tag_collection",
"arguments": {
"collectionId": "collection-456",
"tags": ["production", "v2"]
}
}
3. Environment Management
Create environment:
// "Create a development environment with base URL"
{
"tool": "create_environment",
"arguments": {
"workspaceId": "workspace-123",
"name": "Development",
"values": [
{
"key": "baseUrl",
"value": "https://dev.api.example.com",
"type": "default"
},
{
"key": "apiKey",
"value": "",
"type": "secret"
}
]
}
}
Update environment variables:
// "Update the baseUrl in my production environment"
{
"tool": "update_environment",
"arguments": {
"environmentId": "env-789",
"environment": {
"values": [
{
"key": "baseUrl",
"value": "https://api.example.com",
"type": "default"
}
]
}
}
}
4. API Testing
Run a collection:
// "Test my User API collection in the development environment"
{
"tool": "run_collection",
"arguments": {
"collectionId": "collection-456",
"environmentId": "env-789"
}
}
// "Create a Python client from my User API collection"
{
"tool": "generate_code_from_collection",
"arguments": {
"collectionId": "collection-456",
"language": "python",
"variant": "requests"
}
}
6. API Specifications
Create spec from OpenAPI:
// "Import my OpenAPI spec into Postman"
{
"tool": "create_api_spec",
"arguments": {
"workspaceId": "workspace-123",
"name": "User API Spec",
"schema": {
"type": "openapi",
"content": "... OpenAPI YAML/JSON ..."
}
}
}
Generate collection from spec:
// "Generate a collection from my API spec"
{
"tool": "generate_collection_from_spec",
"arguments": {
"apiId": "api-spec-123",
"name": "Generated User API Collection"
}
}
Common Patterns
Pattern 1: API-First Development Workflow
// 1. Create workspace// "Create a workspace for my new project"// 2. Import OpenAPI spec// "Import my OpenAPI spec for the Product API"// 3. Generate collection// "Generate a collection from the Product API spec"// 4. Create environments// "Create dev, staging, and prod environments"// 5. Test endpoints// "Test all endpoints in the Product API collection using dev environment"// 6. Generate client code// "Generate TypeScript client code with types"
Pattern 2: Environment Variable Management
// Create environment with common variables// "Create a new environment with these variables: baseUrl, apiKey, timeout"// Example structure:
{
"tool": "create_environment",
"arguments": {
"workspaceId": "${WORKSPACE_ID}",
"name": "Production",
"values": [
{ "key": "baseUrl", "value": "https://api.example.com", "type": "default" },
{ "key": "apiKey", "value": "", "type": "secret" },
{ "key": "timeout", "value": "30000", "type": "default" }
]
}
}
// Update specific variable// "Update the timeout to 60000 in production environment"
Pattern 3: Automated Testing Pipeline
// 1. Create test collection// "Create a collection for smoke tests"// 2. Add test requests with assertions// "Add a health check request that verifies 200 status"// 3. Run collection// "Run the smoke tests collection"// 4. Parse results// Agent processes test results and reports failures
Pattern 4: Multi-Collection Code Sync
// Keep client code synchronized with multiple collections// "Generate updated TypeScript clients for all my API collections"// Agent iterates through collections:// 1. List collections in workspace// 2. Generate code for each// 3. Organize into project structure// 4. Update import statements
Pattern 5: Local API Testing
// Use local server to test APIs running on localhost// "Test my local API at http://localhost:3000"// Local server can access local endpoints:
{
"tool": "send_request",
"arguments": {
"method": "GET",
"url": "http://localhost:3000/api/health"
}
}
OAuth only supported on US remote server (mcp.postman.com)
EU server requires API key authentication
Ensure MCP host supports OAuth specification
API key errors:
# Verify API key is setecho${POSTMAN_API_KEY}# Regenerate key if compromised# Visit: https://postman.postman.co/settings/me/api-keys# Check key format in headers"Authorization": "Bearer ${POSTMAN_API_KEY}"# Correct"Authorization": "${POSTMAN_API_KEY}"# Wrong
Local Server Issues
Server not starting:
# Check Node.js version (requires 14+)
node --version
# Install dependencies
npm install -g @postman/postman-mcp-server
# Run with verbose logging
npx @postman/postman-mcp-server --apiKey ${POSTMAN_API_KEY} --verbose
Cannot access local APIs:
Remote server cannot reach localhost/private networks
Use local server for testing local APIs
Ensure firewall allows localhost connections
Tool Execution Errors
"Tool not found" errors:
Verify correct toolset is configured (minimal/code/full)
Minimal toolset doesn't include all 100+ tools
Switch to full toolset if needed:
--toolset full
Collection/workspace not found:
// List available workspaces first// "Show me all my workspaces"// Use correct ID format (check Postman UI or API response)// Workspace IDs: UUID format// Collection IDs: alphanumeric
Rate limiting:
Postman API has rate limits
Batch operations when possible
Add delays between requests for large operations
Environment Variable Issues
Variables not resolving:
Use double curly braces: {{variableName}}
Ensure environment is selected when running requests
Check variable scope (environment vs. global vs. collection)
// Process multiple collections// "Update documentation for all collections tagged 'public'"// Agent workflow:// 1. Search collections by tag// 2. Iterate and update each// 3. Report results
Collaboration Features (Full Toolset)
// Add comments to collection// "Add a comment to the Users endpoint about rate limiting"// Manage team members// "List all members of my workspace"// Track changes// "Show recent changes to my API collection"