- Add express-rate-limit to custom endpoints for security: - /introspect: 100 requests per 5 minutes - /fakeupstreamauth/*: 20 requests per minute - Static files: 25 requests per 10 minutes - Add automated e2e testing npm scripts using concurrently: - npm run test:e2e:integrated: Auto-starts server and runs test - npm run test:e2e:separate: Auto-starts both servers and runs test - Update README with automated testing approach documentation - Update docs/streamable-http-design.md with current file structure - Remove redundancy in README e2e testing documentation - Verified: All tests, linting, and e2e scripts pass with rate limiting
54 lines
2.2 KiB
JSON
54 lines
2.2 KiB
JSON
{
|
|
"name": "mcp-server-everything",
|
|
"version": "0.1.0",
|
|
"description": "Example MCP Server",
|
|
"type": "module",
|
|
"main": "dist/index.js",
|
|
"scripts": {
|
|
"start": "node dist/index.js",
|
|
"start:auth-server": "node dist/auth-server/index.js",
|
|
"dev": "tsx watch --inspect src/index.ts",
|
|
"dev:break": "tsx --inspect-brk watch src/index.ts",
|
|
"dev:integrated": "AUTH_MODE=integrated npm run dev",
|
|
"dev:separate": "AUTH_MODE=separate AUTH_SERVER_URL=http://localhost:3001 npm run dev",
|
|
"dev:auth-server": "AUTH_SERVER_PORT=3001 tsx watch --inspect auth-server/index.ts",
|
|
"dev:with-separate-auth": "concurrently -n \"AUTH,MCP\" -c \"yellow,cyan\" \"npm run dev:auth-server\" \"npm run dev:separate\"",
|
|
"build": "tsc && npm run copy-static",
|
|
"build:auth-server": "tsc -p auth-server/tsconfig.json",
|
|
"build:all": "tsc && tsc -p auth-server/tsconfig.json && npm run copy-static",
|
|
"copy-static": "mkdir -p dist/static && cp -r src/static/* dist/static/",
|
|
"lint": "eslint src/ auth-server/",
|
|
"test": "NODE_OPTIONS=--experimental-vm-modules jest",
|
|
"test:integrated": "AUTH_MODE=integrated npm test",
|
|
"test:separate": "AUTH_MODE=separate npm test",
|
|
"test:e2e:integrated": "concurrently --kill-others --success first \"npm run dev:integrated\" \"sleep 4 && ./scripts/test-integrated-e2e.sh\"",
|
|
"test:e2e:separate": "concurrently --kill-others --success first \"npm run dev:with-separate-auth\" \"sleep 6 && ./scripts/test-separate-e2e.sh\""
|
|
},
|
|
"devDependencies": {
|
|
"@eslint/js": "^9.15.0",
|
|
"@types/content-type": "^1.1.8",
|
|
"@types/cors": "^2.8.17",
|
|
"@types/express": "^5.0.0",
|
|
"@types/jest": "^29.5.14",
|
|
"@types/node": "^22.10.0",
|
|
"concurrently": "^8.2.0",
|
|
"jest": "^29.7.0",
|
|
"ts-jest": "^29.2.5",
|
|
"tsx": "^4.19.2",
|
|
"typescript": "^5.7.2",
|
|
"typescript-eslint": "^8.18.0"
|
|
},
|
|
"dependencies": {
|
|
"@modelcontextprotocol/sdk": "^1.15.1",
|
|
"@redis/client": "^1.6.0",
|
|
"cors": "^2.8.5",
|
|
"dotenv": "^16.4.7",
|
|
"express": "^4.21.2",
|
|
"express-rate-limit": "^8.0.1",
|
|
"raw-body": "^3.0.0"
|
|
},
|
|
"overrides": {
|
|
"@types/express": "^5.0.0",
|
|
"@types/express-serve-static-core": "^5.0.2"
|
|
}
|
|
}
|