概览
What is REST-to-Postman MCP?
REST-to-Postman MCP is a Model Context Protocol (MCP) server that converts REST API code (e.g., NestJS controllers, FastAPI/Flask endpoints) into Postman collections and environments. It is designed for developers who want to automatically sync their REST API endpoints and environment configurations with Postman.
How to use REST-to-Postman MCP?
Install via Smithery with npx -y @smithery/cli install @runninghare/rest-to-postman-mcp --client claude or run directly with npx -y rest-to-postman@latest --postman-api-key your_api_key --postman-workspace-id your_workspace_id. The server exposes two tools: rest_to_postman_env (for environment variables) and rest_to_postman_collection (for API endpoints). Integrate with Claude Desktop, Cursor, Windsurf, or Roo Cline Editor.
Key features of REST-to-Postman MCP
- Converts REST API code to Postman collections automatically.
- Syncs environment variables with Postman environments.
- Supports Bearer token and other authentication methods.
- Intelligent merging of new endpoints with existing collections.
- Handles sensitive environment variables automatically.
- Supports both stdio and SSE transport modes.
Use cases of REST-to-Postman MCP
- Generate a Postman collection from a NestJS TypeScript controller.
- Sync API environment variables (e.g., base URL, tokens) into Postman environments.
- Update an existing Postman collection when new API endpoints are added.
- Keep Postman collections in sync with a FastAPI or Flask backend.
- Use in Cursor to create Postman collections directly from code prompts.
FAQ from REST-to-Postman MCP
What prerequisites are needed to run REST-to-Postman MCP?
Bun v1.2.2 or later, a Postman API Key, and a Postman Workspace ID are required.
What transport modes does REST-to-Postman MCP support?
It supports both stdio (default) and SSE transport modes. Use --sse flag to enable SSE mode.
What tools does REST-to-Postman MCP provide?
Two tools: rest_to_postman_env for creating/updating Postman environments and rest_to_postman_collection for creating/updating Postman collections.
How do I provide Postman credentials to REST-to-Postman MCP?
Pass them as command-line arguments (--postman-api-key and --postman-workspace-id) or set environment variables POSTMAN_API_KEY and