You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Phase 7: Complete README documentation for dual auth modes
- Updated Prerequisites with Redis setup (Docker Compose + OrbStack)
- Added comprehensive Authentication Modes section
- Added Testing with MCP Inspector section with step-by-step guides
- Updated Features to highlight dual mode support
- Updated Configuration with new environment variables
- Updated Development Commands with all new npm scripts
- Added architecture diagrams for both modes
- Referenced auth-server/README.md for detailed auth server info
All phases now completed - Mode 2 implementation ready for use!
Copy file name to clipboardExpand all lines: README.md
+183-8Lines changed: 183 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,19 +33,145 @@ This server serves as both primarily as a learning resource, and an example impl
33
33
-**Horizontal Scaling**: Any instance can handle any request
34
34
35
35
### Authentication & Security
36
+
-**Dual Mode Support**: Run with integrated or separate authorization server
36
37
-**[OAuth 2.0](https://modelcontextprotocol.io/specification/2025-03-26/basic/authorization)**: Complete authorization flow with PKCE support
37
-
-**Fake Auth Provider**: Built-in testing provider with localStorage user management
38
-
-**Session Ownership**: User isolation and access control
38
+
-**External Auth Ready**: Demonstrates integration with external OAuth providers
39
+
-**Session Ownership**: User isolation and access control
39
40
-**Security Headers**: CSP, HSTS, X-Frame-Options, and more
40
41
-**Bearer Token Auth**: Middleware for protected endpoints
41
42
43
+
## Authentication Modes
44
+
45
+
The Everything Server supports two authentication modes to demonstrate different MCP deployment patterns:
46
+
47
+
### Integrated Mode (Default)
48
+
The MCP server acts as its own OAuth 2.0 authorization server. This is simpler to deploy and suitable for standalone MCP servers.
49
+
50
+
```bash
51
+
npm run dev:integrated
52
+
```
53
+
54
+
### Separate Mode
55
+
The MCP server delegates authentication to a standalone authorization server. This demonstrates how MCP servers can integrate with existing OAuth infrastructure. See [auth-server/README.md](auth-server/README.md) for more details about the standalone auth server.
56
+
57
+
```bash
58
+
# Start both the auth server and MCP server
59
+
npm run dev:with-separate-auth
60
+
61
+
# Or run them separately:
62
+
# Terminal 1: Start the authorization server
63
+
npm run dev:auth-server
64
+
65
+
# Terminal 2: Start the MCP server in separate mode
66
+
npm run dev:separate
67
+
```
68
+
69
+
In production, the separate authorization server would typically be replaced with:
70
+
- Corporate SSO (Auth0, Okta)
71
+
- Cloud providers (AWS Cognito, Azure AD)
72
+
- Social providers (Google, GitHub)
73
+
74
+
### Testing with MCP Inspector
75
+
76
+
The MCP Inspector is a web-based tool for testing MCP servers. You can run it locally:
77
+
```bash
78
+
npx -y @modelcontextprotocol/inspector
79
+
```
80
+
81
+
#### Integrated Mode
82
+
```bash
83
+
# 1. Start Redis
84
+
docker compose up -d
85
+
86
+
# 2. Start the server
87
+
npm run dev:integrated
88
+
89
+
# 3. Open MCP Inspector
90
+
npx -y @modelcontextprotocol/inspector
91
+
92
+
# 4. Connect and test:
93
+
# - Connect to http://localhost:3232
94
+
# - Navigate to the Auth tab
95
+
# - Complete the OAuth flow
96
+
# - All auth endpoints will be served from :3232
97
+
```
98
+
99
+
#### Separate Mode
100
+
```bash
101
+
# 1. Start Redis
102
+
docker compose up -d
103
+
104
+
# 2. Start both servers
105
+
npm run dev:with-separate-auth
106
+
107
+
# 3. Open MCP Inspector
108
+
npx -y @modelcontextprotocol/inspector
109
+
110
+
# 4. Connect and test:
111
+
# - Connect to http://localhost:3232
112
+
# - Navigate to the Auth tab
113
+
# - The auth flow will redirect to :3001 for authentication
114
+
# - After auth, tokens from :3001 will be used on :3232
0 commit comments