Skip to content

Commit 361e10c

Browse files
committed
feat(docs): enhance authentication modes section in README for clarity
1 parent d911654 commit 361e10c

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

README.md

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,28 @@ server.registerTool(
189189
);
190190
```
191191

192-
## Enable Authentication (Optional)
192+
## Authentication Modes
193+
194+
This template supports two modes of operation:
195+
196+
- **Authentication Disabled** (`ENABLE_AUTH=false` or omitted):
197+
- No authentication required for MCP server
198+
199+
- **Authentication Enabled** (`ENABLE_AUTH=true`):
200+
- OAuth 2.1 authentication and token validation enforced for all MCP server endpoints
201+
- Suitable for secure, self-contained deployments or production servers without gateway infrastructure
202+
203+
Switch between modes by setting the `ENABLE_AUTH` environment variable in your `.env` file.
204+
205+
---
206+
207+
### Gateways & Proxies for MCP Security
208+
209+
You can deploy MCP servers behind API gateways, identity-aware proxies (IAP), or AI Gateways, recommended by the [MCP Security Best Practices](https://modelcontextprotocol.org/docs/security#mcp-proxy).
210+
211+
- **Pomerium**: Full MCP support, including OAuth/OIDC authentication, fine-grained access policies, not just for the server but also for at the tool level, and session management. You can run your MCP server with authentication disabled (`ENABLE_AUTH=false`) and let Pomerium handle all security. See: [Pomerium MCP Capabilities](https://docs.pomerium.com/docs/capabilities/mcp).
212+
213+
Have a gateway suggestion? [Create an issue](https://github.com/nickytonline/mcp-typescript-template/issues) to help expand this list!
193214

194215
When you need OAuth 2.1 authentication with token validation, it's just a few config lines away:
195216

@@ -218,7 +239,6 @@ Your MCP server now requires valid OAuth tokens for all API requests.
218239

219240
- Public MCP servers
220241
- Gateway-protected deployments (Pomerium, nginx with auth, etc.)
221-
- Development and testing
222242
- Internal corporate networks with perimeter security
223243

224244
**Authentication Enabled** (`ENABLE_AUTH=true`):

0 commit comments

Comments
 (0)