|
6 | 6 | [](https://github.com/lightspeed-core/lightspeed-stack/blob/main/LICENSE) |
7 | 7 | [](https://www.python.org/) |
8 | 8 | [](https://www.python.org/) |
9 | | -[](https://github.com/lightspeed-core/lightspeed-stack/releases/tag/0.3.1) |
| 9 | +[](https://github.com/lightspeed-core/lightspeed-stack/releases/tag/0.4.0) |
10 | 10 |
|
11 | 11 | Lightspeed Core Stack (LCS) is an AI-powered assistant that provides answers to product questions using backend LLM services, agents, and RAG databases. |
12 | 12 |
|
@@ -390,7 +390,7 @@ mcp_servers: |
390 | 390 | Authorization: "kubernetes" # Uses user's k8s token from request auth |
391 | 391 | ``` |
392 | 392 |
|
393 | | -The user's Kubernetes token is extracted from the incoming request's `Authorization` header and forwarded to the MCP server. |
| 393 | +**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. |
394 | 394 |
|
395 | 395 | ##### 3. Client-Provided Tokens (For Per-User Authentication) |
396 | 396 |
|
@@ -418,6 +418,34 @@ curl -X POST "http://localhost:8080/v1/query" \ |
418 | 418 |
|
419 | 419 | **Structure**: `MCP-HEADERS: {"<server-name>": {"<header-name>": "<header-value>", ...}, ...}` |
420 | 420 |
|
| 421 | +##### Client-Authenticated MCP Servers Discovery |
| 422 | + |
| 423 | +To help clients determine which MCP servers require client-provided tokens, use the **MCP Client Auth Options** endpoint: |
| 424 | + |
| 425 | +```bash |
| 426 | +GET /v1/mcp-auth/client-options |
| 427 | +``` |
| 428 | + |
| 429 | +**Response:** |
| 430 | +```json |
| 431 | +{ |
| 432 | + "servers": [ |
| 433 | + { |
| 434 | + "name": "user-specific-service", |
| 435 | + "client_auth_headers": ["Authorization", "X-User-Token"] |
| 436 | + }, |
| 437 | + { |
| 438 | + "name": "github-integration", |
| 439 | + "client_auth_headers": ["Authorization"] |
| 440 | + } |
| 441 | + ] |
| 442 | +} |
| 443 | +``` |
| 444 | + |
| 445 | +This endpoint returns only MCP servers configured with `authorization_headers: "client"`, along with the specific header names that need to be provided via `MCP-HEADERS`. Servers using file-based or Kubernetes authentication are not included in this response. |
| 446 | + |
| 447 | +**Use case:** Clients can call this endpoint at startup or before making requests to discover which servers they can authenticate with using their own tokens. |
| 448 | + |
421 | 449 | ##### Combining Authentication Methods |
422 | 450 |
|
423 | 451 | You can mix and match authentication methods across different MCP servers, and even combine multiple methods for a single server: |
|
0 commit comments