Files
aptsalt 980a31bc4b fix(mcp): sync User-Agent version with package.json and add CLI validation tests (#343)
* fix(mcp): sync User-Agent version with package.json and add missing CLI tests

- VERSION in userAgent.ts was stuck at 0.3.1 while package.json is 0.3.3
- Add test coverage for validateApiKey, validateStripeAccount, and --tools deprecation

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* style: fix Prettier formatting in test file

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* refactor(mcp): inject version at build time via PACKAGE_VERSION

Replace hardcoded VERSION constant with process.env.PACKAGE_VERSION,
injected at build time by scripts/inject-version.js. This mirrors the
pattern used by the shared toolkit (tsup define in tools/typescript)
and eliminates manual version sync between userAgent.ts and package.json.

- userAgent.ts: read VERSION from process.env.PACKAGE_VERSION
- scripts/inject-version.js: post-tsc step replaces the env reference
  with the actual version from package.json
- jest.setup.ts: sets PACKAGE_VERSION for test environment
- package.json: updated build script to run inject-version.js

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* refactor(mcp): replace inject-version.js with tsup build system

Use tsup's define option to inline PACKAGE_VERSION at build time,
matching the pattern used by the shared toolkit (tools/typescript).
Removes the brittle post-build string replacement script.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: aptsalt <aptsalt@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-09 21:49:27 +02:00

72 lines
1.9 KiB
JSON

{
"name": "@stripe/mcp",
"version": "0.3.3",
"homepage": "https://github.com/stripe/ai/tree/main/tools/modelcontextprotocol",
"description": "A command line tool for setting up Stripe MCP server",
"bin": "dist/index.js",
"files": [
"dist/**",
"LICENSE",
"README.md",
"VERSION",
"package.json"
],
"scripts": {
"build": "tsup && node -e \"require('fs').chmodSync('dist/index.js', '755')\"",
"clean": "rm -rf dist",
"lint": "eslint \"./**/*.ts*\"",
"prettier": "prettier './**/*.{js,ts,md,html,css}' --write",
"prettier-check": "prettier './**/*.{js,ts,md,html,css}' --check",
"test": "jest",
"build-dxt-extension": "node build-dxt.js"
},
"packageManager": "pnpm@9.11.0",
"engines": {
"node": ">=18"
},
"dependencies": {
"@modelcontextprotocol/sdk": "^1.17.1",
"colors": "^1.4.0"
},
"repository": {
"type": "git",
"url": "https://github.com/stripe/ai"
},
"keywords": [
"mcp",
"modelcontextprotocol",
"stripe"
],
"author": "Stripe <support@stripe.com> (https://stripe.com/)",
"license": "MIT",
"devDependencies": {
"@anthropic-ai/dxt": "^0.1.0",
"@eslint/compat": "^1.2.6",
"@types/jest": "^29.5.14",
"@types/node": "^22.13.4",
"@typescript-eslint/eslint-plugin": "^8.24.1",
"esbuild": "^0.25.5",
"tsup": "^8.4.0",
"eslint-config-prettier": "^10.0.1",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-jest": "^28.11.0",
"eslint-plugin-prettier": "^5.2.3",
"globals": "^15.15.0",
"jest": "^29.7.0",
"prettier": "^3.5.1",
"ts-jest": "^29.2.5",
"ts-node": "^10.9.2",
"typescript": "^5.8.3"
},
"pnpm": {
"overrides": {
"form-data": "^4.0.4",
"@babel/helpers": "^7.26.10",
"jsondiffpatch": "^0.7.2",
"brace-expansion": "^2.0.2",
"@eslint/plugin-kit": "^0.3.4",
"tmp": "^0.2.4"
}
}
}