loading…
Search for a command to run...
loading…
Integrates Postman with Cursor IDE to manage collections and requests through natural language. It features specialized tools for automatically migrating API en
Integrates Postman with Cursor IDE to manage collections and requests through natural language. It features specialized tools for automatically migrating API endpoints and metadata directly from .NET controller code into Postman collections.
Model Context Protocol (MCP) server for integrating Postman API with Cursor IDE, enabling automatic migration of API endpoints from .NET controllers to Postman collections.
cd .cursor/mcp-servers/postman
npm install
npm run build
Or use the setup script:
./setup.sh
PMAK-xxxxx-xxxxx)Add to Cursor MCP configuration (usually in ~/.cursor/mcp.json or Cursor Settings):
macOS - Get absolute path:
cd .cursor/mcp-servers/postman
./get-path.sh
# Script will copy path to clipboard
Configuration:
{
"mcpServers": {
"postman": {
"command": "node",
"args": ["/absolute/path/to/.cursor/mcp-servers/postman/dist/index.js"],
"env": {
"POSTMAN_API_KEY": "your-postman-api-key-here"
}
}
}
}
Example for macOS:
{
"mcpServers": {
"postman": {
"command": "node",
"args": ["/Users/dangvietson/Desktop/feec-phase1-pm/feec-phase1-pmsystem/.cursor/mcp-servers/postman/dist/index.js"],
"env": {
"POSTMAN_API_KEY": "PMAK-xxxxx-xxxxx-xxxxx"
}
}
}
}
Note: Replace /absolute/path/to/ with your actual absolute path.
Cmd + Q on macOS)List all Postman collections
Create a new Postman collection named "FEEC PM System APIs" with description "Project Management System API endpoints"
Create folder "API V1" with description "Version 1.0 endpoints" in Postman collection 97f3e1da-a4e9-44f6-8d1a-83766a827e54
Create a new GET request in collection 97f3e1da-a4e9-44f6-8d1a-83766a827e54:
- Name: "Get User by ID"
- Method: GET
- URL: {{baseUrl}}/api/v1/users/{userId}
- Headers: Content-Type: application/json
- Description: Retrieve user details by ID
Use the custom command /migrate-endpoint-to-postman or manually:
Sync API endpoints from this controller code to Postman collection 97f3e1da-a4e9-44f6-8d1a-83766a827e54:
[Paste full C# controller code here]
Base URL: http://localhost:5020
API Version: 1.0
Folder: PM System API V1
The server will automatically:
[HttpGet], [HttpPost], etc.)[Route] attributes[ApiVersion] attributes{API Code} - {API Name}{id:guid} → :id)[FromQuery])PagedRequest into pageNumber, pageSize, searchTerm[Authorize] attribute is presentDelete request "Test API Request" from Postman collection PMSystem
Or by ID:
Delete request with ID 8ea7c1f4-c9ba-4293-bbf4-b037f7962854 from collection 97f3e1da-a4e9-44f6-8d1a-83766a827e54
list_collectionsid, name, uidget_collectioncollectionId (string, required): Collection ID (UID)create_collectionname (string, required): Collection namedescription (string, optional): Collection descriptioncreate_foldercollectionId (string, required): Collection IDname (string, required): Folder namedescription (string, optional): Folder descriptioncreate_requestcollectionId (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 bodydescription (string, optional): Request descriptionfolderId (string, optional): Folder ID to organize requestsupdate_requestcollectionId (string, required): Collection IDrequestId (string, required): Request ID (UID) to updatename, method, url, headers, body, description (optional): Fields to updatedelete_requestcollectionId (string, required): Collection IDrequestId (string, optional): Request ID (UID) to deleterequestName (string, optional): Request name to find and deletesync_from_controllercollectionId (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)[Route], [HttpGet], [HttpPost], [HttpPut], [HttpDelete], [HttpPatch] attributes/// <summary>, API Code:, Screen ID:){API Code} - {API Name} (from summary){id:guid} → :id Postman format)[FromQuery])PagedRequest into individual query parameters[Authorize] attribute is present[controller] placeholder with actual controller name{{baseUrl}} Postman variable for URLsFor sync_from_controller to work optimally:
[ApiController] attribute[HttpGet], [HttpPost], etc.)/// <summary> for descriptionsAPI Code: XXXX in comments for request namingScreen ID: XXXX in comments (optional)Example:
/// <summary>
/// Get vendor quotation history for specified vendors within a specific ES Version (v1.0)
/// API Code: QS0041
/// Screen ID: QS-L0004-2 (Estimation quotation vendor history)
/// </summary>
[HttpGet("quotation-history")]
public async Task<IActionResult> GetVendorQuotationHistory(
[FromQuery] Guid versionId,
[FromQuery(Name = "vendorId")] List<Guid> vendorIds,
CancellationToken cancellationToken)
{
// Implementation...
}
Generated Request:
QS0041 - Get vendor quotation history for specified vendors within a specific ES Version{{baseUrl}}/api/v1/Vendors/quotation-history?versionId=...&vendorId=...[Authorize] is present/migrate-endpoint-to-postman command or sync manuallyCreate GitHub Action workflow to auto-sync when PR is merged:
name: Sync APIs to Postman
on:
pull_request:
types: [closed]
jobs:
sync-postman:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- run: |
# Parse changed controllers
# Call Postman MCP Server
# Create/update requests
POSTMAN_API_KEY to git (already in .gitignore).env file if needed (do not commit)node --version (requires >= 18)npm run buildnpm run buildPMAK-...)///)[ApiController] attributeAPI Code: XXXX is present in XML comments<summary> tagsnpm run build[Authorize] attribute is explicitly present[FromHeader] parameters).cursor/mcp-servers/postman/
├── src/
│ ├── index.ts # Main MCP server implementation
│ └── controller-parser.ts # .NET controller parser
├── dist/ # Compiled JavaScript (after build)
├── package.json
├── tsconfig.json
├── .gitignore
├── README.md # This file
├── get-path.sh # Helper script to get absolute path
├── setup.sh # Setup script
└── rebuild-after-quit.sh # Rebuild script after quitting Cursor
npm run dev
npm run type-check
npm run build
Important: After making code changes, you must:
npm run buildOr use the helper script:
./rebuild-after-quit.sh
{API Code} - {API Name}PagedRequest into individual parameters[Authorize] attribute[FromForm] parameters (multipart/form-data)[FromHeader] parameters (already parsed, need to add to headers)[Authorize] attribute explicitly when authentication is requiredWhen adding new features:
Last Updated: 2026-01-23
Version: 1.0.0
Status: ✅ Production Ready
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"postman-mcp-server": {
"command": "npx",
"args": []
}
}
}