Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions 4 .github/workflows/dxt-pack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
35 changes: 35 additions & 0 deletions 35 .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -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 }}


27 changes: 27 additions & 0 deletions 27 .npmignore
Original file line number Diff line number Diff line change
@@ -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
*~
16 changes: 13 additions & 3 deletions 16 dist/package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion 2 dist/src/index.js
100644 → 100755

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion 2 eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
7 changes: 5 additions & 2 deletions 7 package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 12 additions & 2 deletions 14 package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion 2 src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env tsx
#!/usr/bin/env node

import dotenv from 'dotenv';
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
Expand Down
4 changes: 2 additions & 2 deletions 4 src/tests/integration/direct.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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 () => {
Expand Down
2 changes: 1 addition & 1 deletion 2 src/tests/integration/factories/dataFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
}
Expand Down
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.