
REST-to-Postman MCP
Converts REST API code (like NestJS controllers or FastAPI endpoints) to Postman collections and environments, helping developers automatically sync their API endpoints with Postman.
README
REST-to-Postman MCP
A Model Context Protocol (MCP) server that converts REST API code (e.g., NestJS controllers, FastAPI/Flask endpoints) to Postman collections and environments. This tool helps developers automatically sync their REST API endpoints and environment configurations with Postman.
Features
- Convert REST API endpoints to Postman collections
- Sync environment variables with Postman environments
- Support for various authentication methods (e.g., Bearer token)
- Intelligent merging of new endpoints with existing collections
- Automatic handling of sensitive environment variables
- Support for both stdio and SSE transport modes
Prerequisites
- Bun v1.2.2 or later
- Postman API Key
- Postman Workspace ID
Installation & Usage
This is a Model Context Protocol (MCP) stdio server that requires access to your Postman workspace to create/update collections and environments.
Installing via Smithery
To install REST-to-Postman MCP for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @runninghare/rest-to-postman-mcp --client claude
Running the MCP Server
To use the MCP server in production:
- Install the package globally:
npm install -g rest-to-postman-mcp
- Run the server with your Postman credentials:
rest-to-postman-mcp --postman-api-key your_api_key --postman-workspace-id your_workspace_id
Or use environment variables:
export POSTMAN_API_KEY=your_api_key
export POSTMAN_ACTIVE_WORKSPACE_ID=your_workspace_id
rest-to-postman-mcp
You can integrate this command with various AI code editors that support MCP:
- Claude Desktop
- Cursor
- Windsurf
- Roo Cline Editor
Important Note: The server requires Postman API credentials to function. Make sure you have both the API key and workspace ID ready before starting the server.
Tool Descriptions
The server provides two main tools:
1. REST to Postman Environment (rest_to_postman_env
)
Creates or updates a Postman environment with your application's environment variables.
Input Parameters:
envName
(string): Name of the Postman environmentenvVars
(object): Key-value pairs of environment variables
Example Input:
{
"envName": "REST Environment",
"envVars": {
"API_URL": "https://api.example.com",
"API_TOKEN": "secret-token-1"
}
}
2. REST to Postman Collection (rest_to_postman_collection
)
Creates or updates a Postman collection with your REST API endpoints.
Input Parameters:
collectionRequest
(object): Postman collection configuration containing:info
: Collection metadataauth
: Authentication settingsitem
: Array of API endpoints
Example Input:
{
"info": {
"name": "REST Collection",
"description": "REST Collection",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"auth": {
"type": "bearer",
"bearer": [
{
"key": "Authorization",
"value": "Bearer {{API_TOKEN}}",
"type": "string"
}
]
},
"item": [
{
"name": "Get Users",
"request": {
"method": "GET",
"url": {
"raw": "{{API_URL}}/users",
"protocol": "https",
"host": ["api", "example", "com"],
"path": ["users"]
}
}
}
]
}
Response Format
Both tools return a success message confirming the creation/update of the Postman resource:
{
"content": [{
"type": "text",
"text": "Successfully created/updated Postman environment: REST Environment"
}]
}
Development
Local Setup
- Clone the repository:
git clone https://github.com/yourusername/rest-to-postman-mcp.git
cd rest-to-postman-mcp
- Install dependencies:
bun install
- Create a
.env
file:
POSTMAN_API_KEY=your_api_key_here
POSTMAN_ACTIVE_WORKSPACE_ID=your_workspace_id_here
Running in Development Mode
For development, you can run the server directly using Bun:
# Start in stdio mode (default)
bun run src/mcp.ts
# Start in SSE mode
bun run src/mcp.ts --sse
Building
To build the project:
bun run build
This will create a bundled output in the dist
directory.
Scripts
bun run build
- Build the projectbun run dev
- Run the server in development modebun run startSSE
- Start the server in SSE mode
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.