Provides specialized tools to automatically parse .NET C# controller code and migrate API endpoints to Postman, including support for routes, HTTP methods, XML documentation comments, and request body generation.
Enables comprehensive management of Postman collections, folders, and requests, allowing users to list, create, update, and delete API resources programmatically.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Postman MCP ServerSync endpoints from this C# controller to my 'API V1' collection."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Postman MCP Server
Model Context Protocol (MCP) server for integrating Postman API with Cursor IDE, enabling automatic migration of API endpoints from .NET controllers to Postman collections.
šÆ Features
ā List Collections: List all Postman collections in workspace
ā Get Collection: Get detailed collection information
ā Create Collection: Create new Postman collections
ā Create Folder: Create folders to organize requests (with auto-fix validation errors)
ā Create Request: Create API requests manually
ā Update Request: Update existing requests
ā Delete Request: Delete requests by ID or name (with recursive search)
ā Sync from Controller: Automatically parse .NET controller code and migrate endpoints to Postman
š Requirements
Node.js >= 18.0.0
Postman API Key (Get from Postman Account Settings)
Cursor IDE with MCP support
š Quick Start
Step 1: Install Dependencies
Step 2: Build Project
Or use the setup script:
Step 3: Get Postman API Key
Go to Postman Account Settings
Create or copy your API Key (format:
PMAK-xxxxx-xxxxx)
Step 4: Configure Cursor MCP Settings
Add to Cursor MCP configuration (usually in ~/.cursor/mcp.json or Cursor Settings):
macOS - Get absolute path:
Configuration:
Example for macOS:
Note: Replace /absolute/path/to/ with your actual absolute path.
Step 5: Restart Cursor IDE
Quit Cursor completely (
Cmd + Qon macOS)Reopen Cursor
Test: Type "List all Postman collections" in Cursor chat
š Usage Examples
1. List Collections
2. Create Collection
3. Create Folder
4. Create Request Manually
5. Auto-Sync from Controller (Recommended)
Use the custom command /migrate-endpoint-to-postman or manually:
The server will automatically:
Parse all HTTP endpoints (
[HttpGet],[HttpPost], etc.)Extract routes from
[Route]attributesExtract API version from
[ApiVersion]attributesExtract XML comments for descriptions
Extract API Code and Screen ID from comments
Generate request names:
{API Code} - {API Name}Generate request bodies for POST/PUT/PATCH
Handle path parameters (
{id:guid}ā:id)Handle query parameters (
[FromQuery])Expand
PagedRequestintopageNumber,pageSize,searchTermAdd Authorization header only if
[Authorize]attribute is present
6. Delete Request
Or by ID:
š§ API Reference
Tool: list_collections
Description: List all Postman collections
Parameters: None
Returns: Array of collections with
id,name,uid
Tool: get_collection
Description: Get detailed collection information
Parameters:
collectionId(string, required): Collection ID (UID)
Returns: Full collection object with items, variables, etc.
Tool: create_collection
Description: Create new Postman collection
Parameters:
name(string, required): Collection namedescription(string, optional): Collection description
Returns: Created collection object
Tool: create_folder
Description: Create folder in collection to organize requests
Parameters:
collectionId(string, required): Collection IDname(string, required): Folder namedescription(string, optional): Folder description
Returns: Updated collection object
Features:
Auto-fixes invalid collection variables (type validation)
Creates folder with placeholder request (avoids empty folder validation error)
Preserves entire collection structure
Tool: create_request
Description: Create API request in collection
Parameters:
collectionId(string, required): Collection IDname(string, required): Request namemethod(string, required): HTTP method (GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS)url(string, required): Full URL or pathheaders(object, optional): HTTP headers as key-value pairsbody(object, optional): Request body for POST/PUT/PATCHmode: "raw", "urlencoded", "formdata"raw: JSON string for raw body
description(string, optional): Request descriptionfolderId(string, optional): Folder ID to organize requests
Returns: Updated collection object
Tool: update_request
Description: Update existing request
Parameters:
collectionId(string, required): Collection IDrequestId(string, required): Request ID (UID) to updatename,method,url,headers,body,description(optional): Fields to update
Returns: Updated collection object
Tool: delete_request
Description: Delete API request from collection
Parameters:
collectionId(string, required): Collection IDrequestId(string, optional): Request ID (UID) to deleterequestName(string, optional): Request name to find and delete
Returns: Updated collection object
Features:
Delete by ID or name
Recursive search in folders
Auto-fixes collection variables
Preserves collection structure
Tool: sync_from_controller
Description: Automatically migrate endpoints from .NET controller code
Parameters:
collectionId(string, required): Postman collection IDcontrollerCode(string, required): Full C# controller code with XML commentsbaseUrl(string, required): Base URL (e.g.,http://localhost:5020)apiVersion(string, optional): API version (default: "1.0")folderName(string, optional): Folder name to organize requests (will be created if not exists)
Returns: Summary of created requests with endpoint details
Features:
Parses
[Route],[HttpGet],[HttpPost],[HttpPut],[HttpDelete],[HttpPatch]attributesExtracts XML comments (
/// <summary>,API Code:,Screen ID:)Generates request names:
{API Code} - {API Name}(from summary)Generates request bodies from DTO properties
Handles path parameters (
{id:guid}ā:idPostman format)Handles query parameters (
[FromQuery])Expands
PagedRequestinto individual query parametersAdds Authorization header only if
[Authorize]attribute is presentReplaces
[controller]placeholder with actual controller nameExtracts major version from API version (e.g., "1.0" ā "v1")
Uses
{{baseUrl}}Postman variable for URLs
šØ Controller Code Requirements
For sync_from_controller to work optimally:
ā Controller must have
[ApiController]attributeā Methods must have HTTP method attributes (
[HttpGet],[HttpPost], etc.)ā XML comments with
/// <summary>for descriptionsā
API Code: XXXXin comments for request namingā
Screen ID: XXXXin comments (optional)
Example:
Generated Request:
Name:
QS0041 - Get vendor quotation history for specified vendors within a specific ES VersionURL:
{{baseUrl}}/api/v1/Vendors/quotation-history?versionId=...&vendorId=...Method: GET
Headers: Only Authorization if
[Authorize]is present
š Development Workflow
Workflow 1: Manual Migration (Step-by-step)
Create Collection for each system (PM, DC, ES, QS, Master)
Develop API in .NET controller
Create Request in Postman via Cursor prompt
Test in Postman
Workflow 2: Auto-Sync (Bulk Migration) ā Recommended
Develop API in .NET controller with complete XML comments
Use or sync manually
Verify in Postman
Update if needed
Workflow 3: GitHub Actions Integration (Future)
Create GitHub Action workflow to auto-sync when PR is merged:
š Security Notes
API Key: Do not commit
POSTMAN_API_KEYto git (already in.gitignore)Local Only: Server runs locally, not exposed externally
Environment Variables: Use
.envfile if needed (do not commit)
š Troubleshooting
Server Not Starting
Check Node.js version:
node --version(requires >= 18)Check build:
npm run buildCheck absolute path in MCP config (must be absolute path)
After code changes: Quit Cursor completely and rebuild with
npm run build
Postman API Errors
Verify API Key: Check key format (
PMAK-...)Check API limits: Postman has rate limits
Verify Collection ID: Collection ID must be UID (not name)
Check workspace permissions: Need Editor or Admin role
Endpoints Not Parsed
Ensure controller code has complete attributes
Check XML comments format (must use
///)Verify route patterns
Check for
[ApiController]attribute
Request Names Not Correct
Ensure
API Code: XXXXis present in XML commentsCheck summary format in
<summary>tagsRebuild MCP server after code changes:
npm run build
Headers Not Added
Authorization header is only added when
[Authorize]attribute is explicitly presentNo default headers (X-API-Version, Accept, Content-Type) are added automatically
Headers are only added when explicitly defined in code (e.g.,
[FromHeader]parameters)
š Project Structure
š ļø Development
Run in Development Mode
Type Check
Build
Important: After making code changes, you must:
Quit Cursor completely
Run
npm run buildReopen Cursor
Or use the helper script:
š References
šŗļø Roadmap
ā Completed Features
List collections
Get collection details
Create collection
Create folder (with auto-fix validation errors)
Create request
Update request
Delete request (by ID or name, recursive search)
Sync from .NET controller (parse routes, methods, parameters)
Extract XML comments (summary, API Code, Screen ID)
Generate request names:
{API Code} - {API Name}Handle path/query parameters
Expand
PagedRequestinto individual parametersAuthorization header based on
[Authorize]attributeNo default headers (only explicit headers from code)
š Planned Enhancements
Phase 1: Enhanced Parsing
Support for
[FromForm]parameters (multipart/form-data)Support for
[FromHeader]parameters (already parsed, need to add to headers)Better DTO property type detection
Support for nested DTOs
Extract validation rules from FluentValidation
Phase 2: Advanced Features
Update existing requests (detect changes and update)
Delete deprecated endpoints
Support for multiple API versions in same collection
Generate Postman tests from controller code
Support for authentication (JWT, API Key, etc.)
Phase 3: Integration
GitHub Actions integration (auto-sync on PR merge)
Support for other frameworks (FastAPI, Express.js, etc.)
Export collection to OpenAPI/Swagger
Import from OpenAPI/Swagger
š Best Practices
Naming: Use API Code in XML comments for consistent naming
Organization: Create folders by system/version for easy management
Documentation: Add descriptions for requests for better understanding
Testing: Test requests after migration to ensure correctness
Authorization: Use
[Authorize]attribute explicitly when authentication is requiredHeaders: Only add headers when explicitly defined in code
š¤ Contributing
When adding new features:
Update this README with new features
Test thoroughly
Update roadmap section
Rebuild and test in Cursor
Last Updated: 2026-01-23
Version: 1.0.0
Status: ā
Production Ready