Unify auth and MCP servers into single modular codebase
- Merge auth-server and mcp-server into unified architecture under src/modules/ - Add configurable auth modes: internal (single process) and external (separate processes) - Update example scripts to support OAuth discovery and both auth modes - Consolidate OAuth documentation into comprehensive implementation guide - Add configuration options for development vs production deployments - Support both Redis-backed and in-memory session storage
This commit is contained in:
parent
22c7f7476b
commit
bc3619c73c
1 changed files with 3946 additions and 17945 deletions
79
package.json
79
package.json
|
|
@ -1,31 +1,56 @@
|
|||
{
|
||||
"name": "mcp-server-feature-reference",
|
||||
"version": "0.1.0",
|
||||
"description": "Feature Reference MCP Server - Example with External OAuth",
|
||||
"private": true,
|
||||
"workspaces": [
|
||||
"auth-server",
|
||||
"mcp-server"
|
||||
],
|
||||
"name": "mcp-server-example-remote",
|
||||
"version": "1.0.0",
|
||||
"description": "MCP Feature Reference Server with OAuth - Unified Implementation",
|
||||
"type": "module",
|
||||
"main": "dist/index.js",
|
||||
"scripts": {
|
||||
"dev:auth-server": "npm run dev --workspace=auth-server",
|
||||
"dev:mcp-server": "npm run dev --workspace=mcp-server",
|
||||
"dev": "concurrently -n \"AUTH,MCP\" -c \"yellow,cyan\" \"npm run dev:auth-server\" \"npm run dev:mcp-server\"",
|
||||
|
||||
"build": "npm run build --workspaces --if-present",
|
||||
|
||||
"start:auth-server": "npm run start --workspace=auth-server",
|
||||
"start:mcp-server": "npm run start --workspace=mcp-server",
|
||||
"start": "concurrently -n \"AUTH,MCP\" -c \"yellow,cyan\" \"npm run start:auth-server\" \"npm run start:mcp-server\"",
|
||||
|
||||
"test": "npm run test --workspaces --if-present",
|
||||
"test:e2e": "./scripts/test-e2e.sh",
|
||||
|
||||
"lint": "npm run lint --workspaces --if-present",
|
||||
|
||||
"typecheck": "npm run typecheck --workspaces --if-present"
|
||||
"dev": "tsx watch --inspect src/index.ts",
|
||||
"dev:internal": "AUTH_MODE=internal tsx watch --inspect src/index.ts",
|
||||
"dev:external": "concurrently \"AUTH_MODE=auth_server PORT=3001 BASE_URI=http://localhost:3001 tsx watch src/index.ts\" \"sleep 3 && AUTH_MODE=external AUTH_SERVER_URL=http://localhost:3001 tsx watch --inspect src/index.ts\"",
|
||||
"build": "tsc && npm run copy-static",
|
||||
"copy-static": "mkdir -p dist/static dist/modules/auth/static && cp -r src/static/* dist/static/ 2>/dev/null || true && cp src/modules/auth/static/mcp.png dist/modules/auth/static/ 2>/dev/null || true",
|
||||
"start": "node dist/index.js",
|
||||
"start:internal": "AUTH_MODE=internal npm start",
|
||||
"start:external": "concurrently \"AUTH_MODE=auth_server PORT=3001 BASE_URI=http://localhost:3001 node dist/index.js\" \"sleep 3 && AUTH_MODE=external AUTH_SERVER_URL=http://localhost:3001 node dist/index.js\"",
|
||||
"test": "NODE_OPTIONS=--experimental-vm-modules jest",
|
||||
"test:e2e:internal": "./scripts/test-e2e-internal.sh",
|
||||
"test:e2e:external": "./scripts/test-e2e-external.sh",
|
||||
"test:e2e": "./scripts/test-e2e-all.sh",
|
||||
"lint": "eslint src/",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"clean": "rm -rf dist"
|
||||
},
|
||||
"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"
|
||||
},
|
||||
"devDependencies": {
|
||||
"concurrently": "^8.2.0"
|
||||
}
|
||||
}
|
||||
"@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"
|
||||
},
|
||||
"overrides": {
|
||||
"@types/express": "^5.0.0",
|
||||
"@types/express-serve-static-core": "^5.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16"
|
||||
},
|
||||
"author": "",
|
||||
"license": "MIT"
|
||||
}
|
||||
Loading…
Reference in a new issue