Skip to main content
Glama
Postman MCP Server

Postman MCP Server

by sondang91

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

Related MCP server: Postman MCP Generator

πŸ“‹ Requirements

πŸš€ Quick Start

Step 1: Install Dependencies

cd .cursor/mcp-servers/postman
npm install

Step 2: Build Project

npm run build

Or use the setup script:

./setup.sh

Step 3: Get Postman API Key

  1. Go to Postman Account Settings

  2. 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:

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.

Step 5: Restart Cursor IDE

  1. Quit Cursor completely (Cmd + Q on macOS)

  2. Reopen Cursor

  3. Test: Type "List all Postman collections" in Cursor chat

πŸ“– Usage Examples

1. List Collections

List all Postman collections

2. Create Collection

Create a new Postman collection named "FEEC PM System APIs" with description "Project Management System API endpoints"

3. Create Folder

Create folder "API V1" with description "Version 1.0 endpoints" in Postman collection 97f3e1da-a4e9-44f6-8d1a-83766a827e54

4. Create Request Manually

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:

  • Parse all HTTP endpoints ([HttpGet], [HttpPost], etc.)

  • Extract routes from [Route] attributes

  • Extract API version from [ApiVersion] attributes

  • Extract 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 PagedRequest into pageNumber, pageSize, searchTerm

  • Add Authorization header only if [Authorize] attribute is present

6. Delete Request

Delete 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

πŸ”§ 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 name

    • description (string, optional): Collection description

  • Returns: Created collection object

Tool: create_folder

  • Description: Create folder in collection to organize requests

  • Parameters:

    • collectionId (string, required): Collection ID

    • name (string, required): Folder name

    • description (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 ID

    • name (string, required): Request name

    • method (string, required): HTTP method (GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS)

    • url (string, required): Full URL or path

    • headers (object, optional): HTTP headers as key-value pairs

    • body (object, optional): Request body for POST/PUT/PATCH

      • mode: "raw", "urlencoded", "formdata"

      • raw: JSON string for raw body

    • description (string, optional): Request description

    • folderId (string, optional): Folder ID to organize requests

  • Returns: Updated collection object

Tool: update_request

  • Description: Update existing request

  • Parameters:

    • collectionId (string, required): Collection ID

    • requestId (string, required): Request ID (UID) to update

    • name, 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 ID

    • requestId (string, optional): Request ID (UID) to delete

    • requestName (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 ID

    • controllerCode (string, required): Full C# controller code with XML comments

    • baseUrl (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] attributes

    • Extracts 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} β†’ :id Postman format)

    • Handles query parameters ([FromQuery])

    • Expands PagedRequest into individual query parameters

    • Adds Authorization header only if [Authorize] attribute is present

    • Replaces [controller] placeholder with actual controller name

    • Extracts 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: XXXX in comments for request naming

  • βœ… Screen 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:

  • Name: QS0041 - Get vendor quotation history for specified vendors within a specific ES Version

  • URL: {{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)

  1. Create Collection for each system (PM, DC, ES, QS, Master)

  2. Develop API in .NET controller

  3. Create Request in Postman via Cursor prompt

  4. Test in Postman

  1. Develop API in .NET controller with complete XML comments

  2. Use /migrate-endpoint-to-postman command or sync manually

  3. Verify in Postman

  4. Update if needed

Workflow 3: GitHub Actions Integration (Future)

Create 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

πŸ” Security Notes

  • API Key: Do not commit POSTMAN_API_KEY to git (already in .gitignore)

  • Local Only: Server runs locally, not exposed externally

  • Environment Variables: Use .env file if needed (do not commit)

πŸ› Troubleshooting

Server Not Starting

  • Check Node.js version: node --version (requires >= 18)

  • Check build: npm run build

  • Check 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: XXXX is present in XML comments

  • Check summary format in <summary> tags

  • Rebuild MCP server after code changes: npm run build

Headers Not Added

  • Authorization header is only added when [Authorize] attribute is explicitly present

  • No 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

.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

πŸ› οΈ Development

Run in Development Mode

npm run dev

Type Check

npm run type-check

Build

npm run build

Important: After making code changes, you must:

  1. Quit Cursor completely

  2. Run npm run build

  3. Reopen Cursor

Or use the helper script:

./rebuild-after-quit.sh

πŸ“š 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 PagedRequest into individual parameters

  • Authorization header based on [Authorize] attribute

  • No 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

  1. Naming: Use API Code in XML comments for consistent naming

  2. Organization: Create folders by system/version for easy management

  3. Documentation: Add descriptions for requests for better understanding

  4. Testing: Test requests after migration to ensure correctness

  5. Authorization: Use [Authorize] attribute explicitly when authentication is required

  6. Headers: Only add headers when explicitly defined in code

🀝 Contributing

When adding new features:

  1. Update this README with new features

  2. Test thoroughly

  3. Update roadmap section

  4. Rebuild and test in Cursor


Last Updated: 2026-01-23
Version: 1.0.0
Status: βœ… Production Ready

Available Tools

8 tools
create_collectionC

Create a new Postman collection

Inputs: name (required), description.

create_folderC

Create a new folder in a Postman collection

Inputs: collectionId (required), name (required), description.

create_requestB

Create a new API request in a Postman collection

Inputs: collectionId (required), name (required), method (required), url (required), +5 more.

delete_requestC

Delete an API request from a Postman collection

Inputs: collectionId (required), requestId, requestName.

get_collectionC

Get details of a specific Postman collection by ID

Inputs: collectionId (required).

list_collectionsB

List all Postman collections

Inputs: no named parameters.

sync_from_controllerB

Auto-migrate API endpoint from .NET controller code to Postman

Inputs: collectionId (required), controllerCode (required), baseUrl (required), apiVersion, +2 more.

update_requestC

Update an existing API request in a Postman collection

Inputs: collectionId (required), requestId (required), name, method, +4 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 8 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose targeting specific Postman entities (collections, folders, requests) with unambiguous actions. There is no overlap between tools like create_collection, create_folder, and create_request, which operate on different resources.

    Naming Consistency5/5

    All tools follow a consistent verb_noun pattern using snake_case (e.g., create_collection, list_collections, update_request). The naming is predictable and uniform across all eight tools, making them easy to identify and use.

    Tool Count5/5

    With 8 tools, the server is well-scoped for managing Postman collections and requests. Each tool serves a clear purpose in the domain, covering essential operations without being overly sparse or bloated, which is appropriate for this functionality.

    Completeness4/5

    The tool set provides strong CRUD coverage for collections and requests, including create, get, list, update, and delete operations. However, there are minor gaps such as missing update/delete for collections and folders, and the sync_from_controller tool stands out as a specialized feature not fully integrated into the core workflow.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    • Give your AI agents trusted access to the full Postman platform.

    • Carbon Voice MCP serves as a bridge that connects AI assistants like ChatGPT, Claude, and Cursor to a user's Carbon Voice account, turning voice messages and conversations into a private, on-demand knowledge base. It provides 28 specialized tools for comprehensive voice messaging management, including creating and sending messages, accessing conversation history with instant transcription, running AI actions (summarization, TLDR generation, meeting notes), and managing workspace collaboration through folders, contacts, and team communications.

      https://mcp.carbonvoice.app
    • Bring meeting decisions, tasks and user stories into your AI editor (Claude, Cursor, Copilot).

      https://api.attendmeet.com/mcp
    • Run, debug, and triage tests from your IDE using natural language, no dashboard switching, no manual data transfers. The TestMu AI (formerly LambdaTest) MCP Server is a single remote server exposing four tool suites: HyperExecute β€” analyze your project, generate YAML configs and test runner commands, then monitor jobs and sessions. Automation β€” pull a TestID's details plus command, network, and console logs into one chat for instant root-cause analysis. Includes mobile app upload. SmartUI β€” explain pixel, layout, DOM, and perceptual changes in a visual regression run, with context-aware React/HTML/CSS fixes. Accessibility β€” audit any public URL or a local React app against WCAG and get ready-to-apply remediation steps. Connects over https://mcp.lambdatest.com/mcp using OAuth 2.1 β€” no API keys in your config. One-click install in Cursor; works with Claude, GitHub Copilot, Cline, and any MCP client. Tests execute on the TestMu AI cloud: 3,000+ browsers and 10,000+ real devices.

      https://mcp.lambdatest.com/mcp

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Automatically converts Postman API collections into MCP-compatible tools for AI assistants. Enables users to interact with any API through natural language by generating JavaScript tools from Postman requests.
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables interaction with Postman workspaces, collections, requests, responses, and monitors through the Postman API. Allows users to manage API collections, create and update requests/responses, and execute monitors directly from chat.
      28 npm
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to create, manage, and interact with Postman collections, workspaces, environments, and API requests directly from conversations.
      75 npm
      5
      MIT