loading…
Search for a command to run...
loading…
MCP server providing 41 tools to manage Postman collections, environments, mocks, API specs, and workspaces via Streamable HTTP, SSE, or stdio.
MCP server providing 41 tools to manage Postman collections, environments, mocks, API specs, and workspaces via Streamable HTTP, SSE, or stdio.
A production-ready Model Context Protocol (MCP) server that provides 41 Postman API tools for managing collections, environments, mocks, API specifications, and workspaces. Supports Streamable HTTP, SSE, and stdio transports.
createCollection - Create a collection (v2.1.0 format)getCollection - Get collection info (map/minimal/full)getCollections - List workspace collectionsputCollection - Replace collection contentsduplicateCollection - Duplicate to another workspacegetDuplicateCollectionTaskStatus - Check duplication statuscreateCollectionRequest - Create request in collectionupdateCollectionRequest - Update existing requestcreateCollectionResponse - Create request responsecreateEnvironment - Create environmentgetEnvironment - Get environment detailsgetEnvironments - List all environmentsputEnvironment - Replace environment contentscreateMock - Create mock servergetMock - Get mock server detailsgetMocks - List all mock serversupdateMock - Update mock serverpublishMock - Publish mock server (set public)createSpec - Create API spec (OpenAPI/AsyncAPI/protobuf/GraphQL)getSpec - Get spec detailsgetAllSpecs - List workspace specsupdateSpecProperties - Update spec propertiesgetSpecDefinition - Get complete spec definitioncreateSpecFile - Create spec filegetSpecFiles - List all spec filesgetSpecFile - Get file contentsupdateSpecFile - Update spec filegenerateCollection - Generate collection from specgetSpecCollections - List spec's generated collectionsgenerateSpecFromCollection - Generate spec from collectiongetGeneratedCollectionSpecs - Get collection's generated specssyncCollectionWithSpec - Sync collection with specsyncSpecWithCollection - Sync spec with collectioncreateWorkspace - Create workspacegetWorkspace - Get workspace detailsgetWorkspaces - List all workspacesupdateWorkspace - Update workspace propertiesgetAuthenticatedUser - Get current user infogetTaggedEntities - Get entities by tag (Enterprise)runCollection - Run collection with NewmangetEnabledTools - List enabled toolsRequired:
cd postman-tool
# Install in editable mode
pip install -e .
# Verify installation
postman-mcp --help
Required:
export POSTMAN_API_KEY="your_postman_api_key"
Windows PowerShell:
$env:POSTMAN_API_KEY = "your_postman_api_key"
Streamable HTTP (Recommended):
postman-mcp --mode streamable-http --port 8010
SSE:
postman-mcp --mode sse --port 8010
Stdio (for MCP clients):
postman-mcp --mode stdio
# Build image
docker build -t postman-mcp .
# Run container
docker run -e POSTMAN_API_KEY=your_key -p 8010:8010 postman-mcp
{
"mcpServers": {
"postman": {
"type": "streamable-http",
"url": "http://localhost:8010/mcp"
}
}
}
{
"mcpServers": {
"postman": {
"command": "postman-mcp",
"args": ["--mode", "stdio"],
"env": {
"POSTMAN_API_KEY": "your_postman_api_key"
}
}
}
}
await call_tool("getAuthenticatedUser", {})
# List my personal workspaces
user = await call_tool("getAuthenticatedUser", {})
workspaces = await call_tool("getWorkspaces", {
"createdBy": user["user"]["id"],
"type": "personal",
"limit": 100
})
await call_tool("createCollection", {
"workspace": "workspace-id",
"collection": {
"info": {
"name": "My API Collection",
"description": "Collection for testing",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": []
}
})
# Get lightweight map (default)
await call_tool("getCollection", {
"collectionId": "12345-abc123def456"
})
# Get full payload
await call_tool("getCollection", {
"collectionId": "12345-abc123def456",
"model": "full"
})
await call_tool("createMock", {
"workspace": "workspace-id",
"mock": {
"name": "My Mock Server",
"collection": "12345-abc123def456", # Collection UID
"environment": "env-id",
"private": false
}
})
await call_tool("createSpec", {
"workspaceId": "workspace-id",
"name": "My API",
"type": "openapi",
"files": [
{
"path": "openapi.yaml",
"content": "openapi: 3.0.0\ninfo:\n title: My API\n version: 1.0.0"
}
]
})
await call_tool("generateCollection", {
"specId": "spec-id",
"name": "Generated Collection",
"elementType": "collection",
"options": {
"requestParametersResolution": "example",
"exampleParametersResolution": "example"
}
})
await call_tool("createEnvironment", {
"workspace": "workspace-id",
"environment": {
"name": "Production",
"values": [
{"key": "base_url", "value": "https://api.example.com", "enabled": true},
{"key": "api_key", "value": "secret", "enabled": true, "type": "secret"}
]
}
})
await call_tool("runCollection", {
"collectionId": "12345-abc123def456",
"environmentId": "env-id",
"iterationCount": 1,
"requestTimeout": 30000
})
When running with HTTP transports:
GET / - Server infoGET /health - Health check/mcp/* - MCP protocol endpoints (streamable-http)/sse - SSE endpoint/messages - SSE messages endpointpytest
postman-tool/
├── postman_server.py # Main MCP server
├── tools/
│ ├── toolhandler.py # Base class
│ └── postman_tools.py # All 41 tool implementations
├── tests/
│ └── test_postman.py
├── pyproject.toml
├── Dockerfile
└── README.md
Uses X-Api-Key header with your Postman API key. Get yours at: https://postman.com/settings/me/api-keys
https://api.getpostman.com
Many endpoints require collection UID in format: <OWNER_ID>-<COLLECTION_ID>
To get the UID:
getCollection and read the uid field{ownerId}-{collectionId} where:ownerId = me.teamId (from getAuthenticatedUser)ownerId = me.user.id (from getAuthenticatedUser)Postman API has rate limits. See: https://learning.postman.com/docs/developer/postman-api/postman-api-rate-limits/
Error: Postman API error (401)
Solution:
POSTMAN_API_KEY is set correctlyError: Collection not found
Solution:
12345-abc123def456getCollection responseError: Workspace is required
Solution:
getWorkspaces to list available workspacesworkspace query parametergetAuthenticatedUser firstThe runCollection tool requires Newman (Postman's CLI runner) to be integrated programmatically. This is a placeholder that returns instructions.
MIT License - See LICENSE file for details
For issues, questions, or contributions, please visit the project repository.
Выполни в терминале:
claude mcp add postman-mcp -- npx PRs, issues, code search, CI status
автор: GitHubDatabase, auth and storage
автор: SupabaseSecure file operations with configurable access controls.
Reference / test server with prompts, resources, and tools.
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории development