MCP cover image
See in Github
2025-03-13

一个简单的API包装器,围绕Postman/Newman功能用于API测试和模拟服务器生成

1

Github Watches

1

Github Forks

2

Github Stars

Postman MCP Server

A server for managing Postman collections, creating mock servers, and running API tests using Newman.

Overview

The Postman MCP (Mock Collection Processor) Server is a Node.js Express application that provides a simple interface for:

  1. Test Scenario Management - Create and manage test scenarios using Postman collections
  2. Mock Server Generation - Generate mock servers based on Postman collections
  3. API Testing - Run tests against APIs using Newman (Postman's command-line collection runner)

This server is designed to be used in conjunction with test environments for API development and testing.

Getting Started

Prerequisites

  • Node.js (v14 or higher)
  • npm or yarn
  • Postman API key

Installation

  1. Clone the repository:
git clone <repository-url>
cd postman-mcp-server
  1. Install dependencies:
npm install
  1. Copy the example environment file and update with your values:
cp .env.example .env
  1. Update the .env file with your Postman API key and other configuration.

Running the Server

npm start

The server will run on the port specified in your .env file (default: 3000).

API Endpoints

Create Test Scenario

POST /create-scenario

Create a new test scenario based on a Postman collection.

Create Mock Server

POST /create-mock

Create a new mock server based on a Postman collection.

Run Tests

POST /run-tests/:scenarioId

Run tests for a specific scenario using Newman.

Project Structure

postman-mcp-server/
├── .cursor/            # Cursor rules directory
├── data/               # Data storage
├── examples/           # Example requests and collections
├── src/                # Source code
│   ├── config/         # Configuration files
│   ├── controllers/    # Route controllers
│   ├── middleware/     # Express middleware
│   ├── models/         # Data models
│   ├── routes/         # API routes
│   ├── services/       # Business logic
│   ├── utils/          # Utility functions
│   └── index.js        # Application entry point
├── tests/              # Tests
├── .cursorrules        # Main cursor rules file
├── .env                # Environment variables
├── .gitignore          # Git ignore file
├── DEVELOPMENT_GUIDELINES.md # Development guidelines
├── SOLID_PRINCIPLES.md # SOLID principles guide
└── package.json        # Project dependencies

Development Guidelines

This project follows strict development guidelines and SOLID principles to ensure maintainability and high-quality code. Please refer to the following documents before contributing:

Cursor Rules

This project uses Cursor Rules to enforce our critical development guidelines. These rules are automatically applied when using Cursor as your development environment. Key rules include:

  • 150-Line File Limit - Any file exceeding 150 lines should be split (SRP)
  • No Code Duplication - Extract common functionality into utilities
  • Comprehensive Testing - All code must have 95% test coverage
  • API Examples - All endpoints need example requests
  • JSDoc Comments - All public functions require proper documentation
  • SOLID Principles - All code must adhere to SOLID principles

For details, check the .cursorrules file and .cursor/rules/ directory.

Examples

The examples directory contains practical examples showing how to use each API endpoint. These examples include both curl commands and JavaScript code snippets.

License

MIT

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • Bora Yalcin
  • Evaluator for marketplace product descriptions, checks for relevancy and keyword stuffing.

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • Contraband Interactive
  • Emulating Dr. Jordan B. Peterson's style in providing life advice and insights.

  • rustassistant.com
  • Your go-to expert in the Rust ecosystem, specializing in precise code interpretation, up-to-date crate version checking, and in-depth source code analysis. I offer accurate, context-aware insights for all your Rust programming questions.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • modelcontextprotocol
  • 模型上下文协议服务器

  • Mintplex-Labs
  • 带有内置抹布,AI代理,无代理构建器,MCP兼容性等的多合一桌面和Docker AI应用程序。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • OffchainLabs
  • 进行以太坊的实施

  • n8n-io
  • 具有本机AI功能的公平代码工作流程自动化平台。将视觉构建与自定义代码,自宿主或云相结合,400+集成。

  • huahuayu
  • 统一的API网关,用于将多个Etherscan样区块链Explorer API与对AI助手的模型上下文协议(MCP)支持。

    Reviews

    4 (1)
    Avatar
    user_1epqyDia
    2025-04-16

    The postman-mcp-server by freebeiro is an outstanding tool for managing your MCP applications. Its seamless integration and robust features make it an essential resource for developers. Easy to set up and extremely user-friendly, it's a must-have for anyone looking to streamline their workflow. Check it out on GitHub and enhance your development process!