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
@@ -355,7 +356,7 @@ In addition to the basic configuration above, you can configure authentication h
355
356
356
357
#### Configuring MCP Server Authentication
357
358
358
-
Lightspeed Core Stack supports three methods for authenticating with MCP servers, each suited for different use cases:
359
+
Lightspeed Core Stack supports four methods for authenticating with MCP servers, each suited for different use cases:
359
360
360
361
##### 1. Static Tokens from Files (Recommended for Service Credentials)
361
362
@@ -392,7 +393,7 @@ mcp_servers:
392
393
Authorization: "kubernetes"# Uses user's k8s token from request auth
393
394
```
394
395
395
-
**Note:** Kubernetes token-based MCP authorization only works when Lightspeed Core Stack is configured with Kubernetes authentication (`authentication.k8s`). For any other authentication types, MCP servers configured with `Authorization: "kubernetes"` are removed from the available MCP servers list.
396
+
**Note:** Kubernetes token-based MCP authorization only works when Lightspeed Core Stack is configured with Kubernetes authentication (`authentication.module` is `k8s`) or `noop-with-token`. For any other authentication types, MCP servers configured with `Authorization: "kubernetes"` are removed from the available MCP servers list.
Use the special `"oauth"` keyword when the MCP server requires OAuth and the client will supply a token (e.g. via `MCP-HEADERS` after obtaining it from an OAuth flow):
427
+
428
+
```yaml
429
+
mcp_servers:
430
+
- name: "oauth-protected-service"
431
+
url: "https://mcp.example.com"
432
+
authorization_headers:
433
+
Authorization: "oauth"# Token provided via MCP-HEADERS (from OAuth flow)
434
+
```
435
+
436
+
When no token is provided foran OAuth-configured server, the service may respond with **401 Unauthorized** and a **`WWW-Authenticate`** header (probed from the MCP server). Clients can use this to drive an OAuth flow and then retry with the tokenin`MCP-HEADERS`.
437
+
423
438
##### Client-Authenticated MCP Servers Discovery
424
439
425
440
To help clients determine which MCP servers require client-provided tokens, use the **MCP Client Auth Options** endpoint:
@@ -481,6 +496,7 @@ mcp_servers:
481
496
|**Static File**| Service tokens, API keys | File path in config | Global (all users) |`"/var/secrets/token"`|
- A server with `Authorization: "kubernetes"` will be skipped if the user's request doesn't include a Kubernetes token
491
507
- A server with `Authorization: "client"` will be skipped if no `MCP-HEADERS` are provided in the request
508
+
- A server with `Authorization: "oauth"` and no token in`MCP-HEADERS` may cause the API to return**401 Unauthorized** with a **`WWW-Authenticate`** header (so the client can perform OAuth and retry)
492
509
- A server with multiple headers will be skipped if**any** required header cannot be resolved
493
510
494
511
Skipped servers are logged as warnings. Check Lightspeed Core logs to see which servers were skipped and why.
| authorization_headers | object | Headers to send to the MCP server. The map contains the header name and the path to a file containing the header value (secret). There are 2 special cases: 1. Usage of the kubernetes token in the header. To specify this use a string 'kubernetes' instead of the file path. 2. Usage of the clientprovided token in the header. To specify this use a string 'client' instead of the file path. |
375
+
| authorization_headers | object | Headers to send to the MCP server. The map contains the header name and the path to a file containing the header value (secret). There are 3 special cases: 1. Usage of the kubernetes token in the header — use the string 'kubernetes' instead of the file path. 2. Usage of the client-provided token in the header — use the string 'client' instead of the file path. 3. Usage of OAuth token (resolved at request time or 401 with WWW-Authenticate) — use the string 'oauth' instead of the file path. |
376
376
| timeout | integer | Timeout in seconds for requests to the MCP server. If not specified, the default timeout from Llama Stack will be used. Note: This field is reserved for future use when Llama Stack adds timeout support. |
0 commit comments