From 4350d720cf3094517de02e165de28571fcf2d298 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Garc=C3=ADa?= Date: Fri, 22 Aug 2025 08:11:52 +0200 Subject: [PATCH 1/9] docs: point bearer auth format --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index dd42811..b336a00 100644 --- a/README.md +++ b/README.md @@ -72,6 +72,7 @@ The streamable HTTP version is available at `https://mcp.postman.com`. It suppor ### Cursor integration To integrate the MCP server with Cursor, click the following button: +> Ensure the Authorization header uses the Bearer format. [![Install the Postman MCP Server](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en/install-mcp?name=postman_mcp_server&config=eyJ1cmwiOiJodHRwczovL21jcC5wb3N0bWFuLmNvbS9taW5pbWFsIiwiaGVhZGVycyI6eyJBdXRob3JpemF0aW9uIjoiQmVhcmVyIFlPVVJfQVBJX0tFWSJ9fQ%3D%3D) From 03c349fcd1896cdf306860b8f08f0a7b5b76795b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Garc=C3=ADa?= Date: Tue, 26 Aug 2025 17:43:13 +0200 Subject: [PATCH 2/9] docs: update README.md (#35) --- README.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b336a00..c3db446 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ This is a lightweight solution that's ideal for integration with editors and too ### VS Code integration > **Note:** -> VS Code only supports up to 128 tools. By default, this server provides 37 tools (minimal mode). Use the `--full` flag to access all 106 tools, but note this may exceed VS Code's 128 tool limit when combined with other MCP servers. +> By default, this server provides 37 tools (minimal mode). Use the `--full` flag to access all 106 tools. Integrate your MCP server with Visual Studio Code and use it with VS Code extensions that support MCP. To do this, do the following: @@ -78,7 +78,7 @@ To integrate the MCP server with Cursor, click the following button: ### VS Code integration -> VS Code only supports up to 128 tools. By default, the server provides 37 tools. Use **Full** (`https://mcp.postman.com//mcp`) mode to access all 106 tools, but note this may exceed VS Code's 128 tool limit when combined with other MCP servers. +> By default, the server provides 37 tools. Use **Full** (`https://mcp.postman.com//mcp`) mode to access all 106 tools. To install in VS Code, add the following to the *.vscode/mcp.json* file: @@ -86,7 +86,7 @@ To install in VS Code, add the following to the *.vscode/mcp.json* file: { "servers": { "postman-api-http-server": { - "type": "sse", + "type": "http", "url": "https://mcp.postman.com/{minimal | mcp}", // choose "minimal" or "mcp" "headers": { "Authorization": "Bearer ${input:postman-api-key}" @@ -113,7 +113,6 @@ When prompted, enter your Postman API key. Afterwards, the agent performs calls - `delete-environment` → `deleteEnvironment` - **Tool availability changes** - The default (Minimal) behavior provides only 37 essential tools. - - Minimal mode is designed to stay within VS Code's 128 tool limit when combined with other MCP servers. - The `--full` flag provides access to all 106 tools. ## Questions and support From 5e364d74deaab68ae69a25bbe75774db065063a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Garc=C3=ADa?= Date: Wed, 27 Aug 2025 15:12:57 +0200 Subject: [PATCH 3/9] feat: publish npm package on release (#36) * feat: publish npm package on release * fixup! feat: publish npm package on release * fixup! fixup! feat: publish npm package on release --- .github/workflows/dxt-pack.yaml | 4 +-- .github/workflows/publish.yml | 35 +++++++++++++++++++ .npmignore | 27 ++++++++++++++ dist/package.json | 16 +++++++-- dist/src/index.js | 2 +- eslint.config.mjs | 2 +- package-lock.json | 7 ++-- package.json | 14 ++++++-- src/index.ts | 2 +- src/tests/integration/direct.test.ts | 4 +-- .../integration/factories/dataFactory.ts | 2 +- 11 files changed, 100 insertions(+), 15 deletions(-) create mode 100644 .github/workflows/publish.yml create mode 100644 .npmignore mode change 100644 => 100755 dist/src/index.js diff --git a/.github/workflows/dxt-pack.yaml b/.github/workflows/dxt-pack.yaml index 8ef674a..216058a 100644 --- a/.github/workflows/dxt-pack.yaml +++ b/.github/workflows/dxt-pack.yaml @@ -12,10 +12,10 @@ jobs: - name: Checkout repository uses: actions/checkout@v5 - - name: Use Node.js 20 + - name: Use Node.js 22 uses: actions/setup-node@v4 with: - node-version: '20' + node-version: '22' cache: 'npm' - name: Install dependencies diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..58da26c --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,35 @@ +name: Publish to npm + +on: + push: + tags: + - 'v*' + +jobs: + publish: + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write + steps: + - name: Checkout + uses: actions/checkout@v5 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '22' + registry-url: 'https://registry.npmjs.org' + + - name: Install dependencies + run: npm ci + + - name: Build + run: npm run build + + - name: Publish to npm + run: npm publish --provenance --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..45d2cb8 --- /dev/null +++ b/.npmignore @@ -0,0 +1,27 @@ +# Source files (only dist/ should be published) +src/ +tsconfig.json +eslint.config.mjs + +# Development and build files +.github/ +scripts/ +node_modules/ +*.log + +# Test files +**/*.test.ts +**/*.test.js + +# Documentation (except README.md which is included) +DOCKER.md + +# Git and editor files +.git/ +.gitignore +.vscode/ +.cursor/ +.idea/ +*.swp +*.swo +*~ diff --git a/dist/package.json b/dist/package.json index db933b6..98d365c 100644 --- a/dist/package.json +++ b/dist/package.json @@ -1,16 +1,26 @@ { - "name": "postman-api-mcp", - "version": "1.2.1", + "name": "@postman/postman-mcp-server", + "version": "2.0.1", "description": "A simple MCP server to operate on the Postman API", - "main": "index.js", + "main": "dist/src/index.js", "type": "module", "scripts": { "start:stdio": "node dist/src/index.js", "build": "eslint --fix ./src && prettier --write \"src/**/*.ts\" && tsc", + "prepack": "npm run build && node scripts/sync-dist-pkg.mjs", "test": "vitest", "lint": "eslint", "lint:fix": "eslint --fix" }, + "bin": "dist/src/index.js", + "files": [ + "dist", + "README.md", + "LICENSE" + ], + "publishConfig": { + "access": "public" + }, "dependencies": { "@apidevtools/swagger-parser": "^11.0.0", "@modelcontextprotocol/sdk": "^1.17.0", diff --git a/dist/src/index.js b/dist/src/index.js old mode 100644 new mode 100755 index 9a53227..7682a26 --- a/dist/src/index.js +++ b/dist/src/index.js @@ -1,4 +1,4 @@ -#!/usr/bin/env tsx +#!/usr/bin/env node import dotenv from 'dotenv'; import { Server } from '@modelcontextprotocol/sdk/server/index.js'; import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'; diff --git a/eslint.config.mjs b/eslint.config.mjs index 35975c5..7d86701 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -4,9 +4,9 @@ import unusedImports from "eslint-plugin-unused-imports"; import eslintConfigPrettier from 'eslint-config-prettier'; // Ensures ESLint doesn't conflict with Prettier export default tseslint.config( + { ignores: ['dist/**', '**/*.js'] }, { files: ['src/**/*.ts'], - ignores: ['**/*.js'] }, eslint.configs.recommended, tseslint.configs.recommended, diff --git a/package-lock.json b/package-lock.json index 86fe392..f8df328 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "postman-api-mcp", + "name": "@postman/postman-mcp-server", "version": "2.0.1", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "postman-api-mcp", + "name": "@postman/postman-mcp-server", "version": "2.0.1", "license": "Apache-2.0", "dependencies": { @@ -15,6 +15,9 @@ "es-toolkit": "^1.37.2", "express": "^5.1.0" }, + "bin": { + "postman-mcp-server": "dist/src/index.js" + }, "devDependencies": { "@eslint/js": "^9.26.0", "@types/express": "^5.0.1", diff --git a/package.json b/package.json index 80772de..6643634 100644 --- a/package.json +++ b/package.json @@ -1,16 +1,26 @@ { - "name": "postman-api-mcp", + "name": "@postman/postman-mcp-server", "version": "2.0.1", "description": "A simple MCP server to operate on the Postman API", - "main": "index.js", + "main": "dist/src/index.js", "type": "module", "scripts": { "start:stdio": "node dist/src/index.js", "build": "eslint --fix ./src && prettier --write \"src/**/*.ts\" && tsc", + "prepack": "npm run build && node scripts/sync-dist-pkg.mjs", "test": "vitest", "lint": "eslint", "lint:fix": "eslint --fix" }, + "bin": "dist/src/index.js", + "files": [ + "dist", + "README.md", + "LICENSE" + ], + "publishConfig": { + "access": "public" + }, "dependencies": { "@apidevtools/swagger-parser": "^11.0.0", "@modelcontextprotocol/sdk": "^1.17.0", diff --git a/src/index.ts b/src/index.ts index 3fe49e9..7524bcf 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,4 @@ -#!/usr/bin/env tsx +#!/usr/bin/env node import dotenv from 'dotenv'; import { Server } from '@modelcontextprotocol/sdk/server/index.js'; diff --git a/src/tests/integration/direct.test.ts b/src/tests/integration/direct.test.ts index 11f1311..59bda46 100644 --- a/src/tests/integration/direct.test.ts +++ b/src/tests/integration/direct.test.ts @@ -84,7 +84,7 @@ describe('Postman MCP - Direct Integration Tests', () => { createdSpecIds = []; }); - describe('Workspace Workflow',{ timeout: 30000 }, () => { + describe('Workspace Workflow', { timeout: 30000 }, () => { it('should create, list, search, update, and delete a single workspace', async () => { const workspaceData = WorkspaceDataFactory.createWorkspace(); const workspaceId = await createWorkspace(workspaceData); @@ -126,7 +126,7 @@ describe('Postman MCP - Direct Integration Tests', () => { expect(WorkspaceDataFactory.validateResponse(verifyUpdateResult)).toBe(true); expect((verifyUpdateResult.content as any)[0].text).toContain(updatedName); }); - }, ); + }); describe('Environment Workflow', () => { it('should create, list, search, update, and delete a single environment', async () => { diff --git a/src/tests/integration/factories/dataFactory.ts b/src/tests/integration/factories/dataFactory.ts index 330453c..befb36b 100644 --- a/src/tests/integration/factories/dataFactory.ts +++ b/src/tests/integration/factories/dataFactory.ts @@ -151,7 +151,7 @@ export class SpecDataFactory extends TestDataFactory { return { path: 'index.yaml', content: - 'openapi: 3.0.0\ninfo:\n title: My API\n version: 1.0.0\npaths:\n /:\n get:\n summary: My Endpoint\n responses:\n \'200\':\n description: OK', + "openapi: 3.0.0\ninfo:\n title: My API\n version: 1.0.0\npaths:\n /:\n get:\n summary: My Endpoint\n responses:\n '200':\n description: OK", ...overrides, }; } From 875af7c149d3a32ba90e0402e2e4cf5b3c1e416c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Garc=C3=ADa?= Date: Wed, 27 Aug 2025 15:13:36 +0200 Subject: [PATCH 4/9] chore: v2.1.0 --- dist/package.json | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dist/package.json b/dist/package.json index 98d365c..1ee993f 100644 --- a/dist/package.json +++ b/dist/package.json @@ -1,6 +1,6 @@ { "name": "@postman/postman-mcp-server", - "version": "2.0.1", + "version": "2.1.0", "description": "A simple MCP server to operate on the Postman API", "main": "dist/src/index.js", "type": "module", diff --git a/package-lock.json b/package-lock.json index f8df328..f5e4d94 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@postman/postman-mcp-server", - "version": "2.0.1", + "version": "2.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@postman/postman-mcp-server", - "version": "2.0.1", + "version": "2.1.0", "license": "Apache-2.0", "dependencies": { "@apidevtools/swagger-parser": "^11.0.0", diff --git a/package.json b/package.json index 6643634..e27fec4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@postman/postman-mcp-server", - "version": "2.0.1", + "version": "2.1.0", "description": "A simple MCP server to operate on the Postman API", "main": "dist/src/index.js", "type": "module", From 8fabfe05ac08e7cde8a1facb451bc3ec2fd22232 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Garc=C3=ADa?= Date: Wed, 27 Aug 2025 15:19:00 +0200 Subject: [PATCH 5/9] fix: npm prepack --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e27fec4..2184193 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "scripts": { "start:stdio": "node dist/src/index.js", "build": "eslint --fix ./src && prettier --write \"src/**/*.ts\" && tsc", - "prepack": "npm run build && node scripts/sync-dist-pkg.mjs", + "prepack": "npm run build", "test": "vitest", "lint": "eslint", "lint:fix": "eslint --fix" From 45d0ae240ad63f86cdbb521edace98601b8ab834 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Garc=C3=ADa?= Date: Wed, 27 Aug 2025 15:19:31 +0200 Subject: [PATCH 6/9] chore: v2.1.1 --- dist/package.json | 4 ++-- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dist/package.json b/dist/package.json index 1ee993f..d351d83 100644 --- a/dist/package.json +++ b/dist/package.json @@ -1,13 +1,13 @@ { "name": "@postman/postman-mcp-server", - "version": "2.1.0", + "version": "2.1.1", "description": "A simple MCP server to operate on the Postman API", "main": "dist/src/index.js", "type": "module", "scripts": { "start:stdio": "node dist/src/index.js", "build": "eslint --fix ./src && prettier --write \"src/**/*.ts\" && tsc", - "prepack": "npm run build && node scripts/sync-dist-pkg.mjs", + "prepack": "npm run build", "test": "vitest", "lint": "eslint", "lint:fix": "eslint --fix" diff --git a/package-lock.json b/package-lock.json index f5e4d94..907ecb5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@postman/postman-mcp-server", - "version": "2.1.0", + "version": "2.1.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@postman/postman-mcp-server", - "version": "2.1.0", + "version": "2.1.1", "license": "Apache-2.0", "dependencies": { "@apidevtools/swagger-parser": "^11.0.0", diff --git a/package.json b/package.json index 2184193..e51f7e7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@postman/postman-mcp-server", - "version": "2.1.0", + "version": "2.1.1", "description": "A simple MCP server to operate on the Postman API", "main": "dist/src/index.js", "type": "module", From 8092f046c030164bc1623f3ceecead47387c908b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Garc=C3=ADa?= Date: Wed, 27 Aug 2025 15:26:47 +0200 Subject: [PATCH 7/9] docs: add repository info --- .github/workflows/publish.yml | 3 --- dist/package.json | 10 +++++++++- package.json | 12 ++++++++++-- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 58da26c..0364272 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -24,9 +24,6 @@ jobs: - name: Install dependencies run: npm ci - - name: Build - run: npm run build - - name: Publish to npm run: npm publish --provenance --access public env: diff --git a/dist/package.json b/dist/package.json index d351d83..56bdcd2 100644 --- a/dist/package.json +++ b/dist/package.json @@ -50,5 +50,13 @@ "node": ">=20.0.0" }, "author": "Postman, Inc.", - "license": "Apache-2.0" + "license": "Apache-2.0", + "repository": { + "type": "git", + "url": "https://github.com/postmanlabs/postman-mcp-server.git" + }, + "bugs": { + "url": "https://github.com/postmanlabs/postman-mcp-server/issues" + }, + "homepage": "https://github.com/postmanlabs/postman-mcp-server#readme" } diff --git a/package.json b/package.json index e51f7e7..08452d6 100644 --- a/package.json +++ b/package.json @@ -50,5 +50,13 @@ "node": ">=20.0.0" }, "author": "Postman, Inc.", - "license": "Apache-2.0" -} + "license": "Apache-2.0", + "repository": { + "type": "git", + "url": "https://github.com/postmanlabs/postman-mcp-server.git" + }, + "bugs": { + "url": "https://github.com/postmanlabs/postman-mcp-server/issues" + }, + "homepage": "https://github.com/postmanlabs/postman-mcp-server#readme" +} \ No newline at end of file From 86c30c318dc401cb3eea8c6e135b15b8281c4bab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Garc=C3=ADa?= Date: Wed, 27 Aug 2025 15:27:40 +0200 Subject: [PATCH 8/9] chore: v2.1.1-alpha.2 --- dist/package.json | 2 +- package-lock.json | 4 ++-- package.json | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dist/package.json b/dist/package.json index 56bdcd2..a0052b3 100644 --- a/dist/package.json +++ b/dist/package.json @@ -1,6 +1,6 @@ { "name": "@postman/postman-mcp-server", - "version": "2.1.1", + "version": "2.1.1-alpha.2", "description": "A simple MCP server to operate on the Postman API", "main": "dist/src/index.js", "type": "module", diff --git a/package-lock.json b/package-lock.json index 907ecb5..64483a1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@postman/postman-mcp-server", - "version": "2.1.1", + "version": "2.1.1-alpha.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@postman/postman-mcp-server", - "version": "2.1.1", + "version": "2.1.1-alpha.2", "license": "Apache-2.0", "dependencies": { "@apidevtools/swagger-parser": "^11.0.0", diff --git a/package.json b/package.json index 08452d6..21d89e0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@postman/postman-mcp-server", - "version": "2.1.1", + "version": "2.1.1-alpha.2", "description": "A simple MCP server to operate on the Postman API", "main": "dist/src/index.js", "type": "module", @@ -59,4 +59,4 @@ "url": "https://github.com/postmanlabs/postman-mcp-server/issues" }, "homepage": "https://github.com/postmanlabs/postman-mcp-server#readme" -} \ No newline at end of file +} From 7e299f99d4d2d980467a618a27278e536569668c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Garc=C3=ADa?= Date: Wed, 27 Aug 2025 15:34:37 +0200 Subject: [PATCH 9/9] chore: v2.1.1 --- dist/package.json | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dist/package.json b/dist/package.json index a0052b3..56bdcd2 100644 --- a/dist/package.json +++ b/dist/package.json @@ -1,6 +1,6 @@ { "name": "@postman/postman-mcp-server", - "version": "2.1.1-alpha.2", + "version": "2.1.1", "description": "A simple MCP server to operate on the Postman API", "main": "dist/src/index.js", "type": "module", diff --git a/package-lock.json b/package-lock.json index 64483a1..907ecb5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@postman/postman-mcp-server", - "version": "2.1.1-alpha.2", + "version": "2.1.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@postman/postman-mcp-server", - "version": "2.1.1-alpha.2", + "version": "2.1.1", "license": "Apache-2.0", "dependencies": { "@apidevtools/swagger-parser": "^11.0.0", diff --git a/package.json b/package.json index 21d89e0..54f84b0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@postman/postman-mcp-server", - "version": "2.1.1-alpha.2", + "version": "2.1.1", "description": "A simple MCP server to operate on the Postman API", "main": "dist/src/index.js", "type": "module",