fix(lightspeed): Update Lightspeed router for handling multiple MCP Servers#2408
Conversation
Assisted-by: Claude Opus 4.5 Generated-by: Cursor Signed-off-by: Maysun J Faisal <maysunaneek@gmail.com>
|
Important This PR includes changes that affect public-facing API. Please ensure you are adding/updating documentation for new features or behavior. Changed Packages
|
|
Test Coverage: |
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||
|
…veloper#2408) Assisted-by: Claude Opus 4.5 Generated-by: Cursor Signed-off-by: Maysun J Faisal <maysunaneek@gmail.com>





User description
Hey, I just made a Pull Request!
dangerouslyAllowSignInWithoutUserInCatalogin app-config for local dev without a User entity, so local dev can use Github Auth with a Github OAuth applicationAddresses https://issues.redhat.com/browse/RHIDP-10127
✔️ Checklist
How to test changes?
Llama Stack 0.3.5
No changes, just run
podman run -it -p 8321:8321 --env-file ./env/values.env -v ./embeddings_model:/rag-content/embeddings_model:Z -v ./vector_db/rhdh_product_docs:/rag-content/vector_db/rhdh_product_docs:Z quay.io/redhat-ai-dev/llama-stack:0.1.4from https://github.com/redhat-ai-dev/llama-stackLightspeed Stack (LCORE 0.4.0)
In your
lightspeed-stack.yaml, add the MCP Server config:mcp-integration-toolsserver, I basically port forwarded the RHDH AI Backstage MCP Server from OpenShift withoc port-forward -n rolling-demo-ns svc/rolling-demo-backstage 7008:7007(dont use 7007 on localhost as Backstage backend uses it)test-mcp-server, use this simple test MCP server at https://github.com/maysunfaisal/test-mcp-serverRun
podman run -it -p 8080:8080 -v ./lightspeed-stack.yaml:/app-root/lightspeed-stack.yaml:Z quay.io/lightspeed-core/lightspeed-stack:0.4.0from https://github.com/redhat-ai-dev/llama-stackBackstage
In the lightspeed
app-config.yaml, add MCP config for lightspeed:PR Type
Enhancement, Tests
Description
Support multiple MCP servers with individual authentication headers
Build MCP headers map from all configured servers during router initialization
Add comprehensive test coverage for single, multiple, and no MCP servers
Document optional GitHub auth configuration for local development
Diagram Walkthrough
File Walkthrough
router.ts
Enable multiple MCP servers with unified header handlingworkspaces/lightspeed/plugins/lightspeed-backend/src/service/router.ts
configuration
mcpHeadersmap containing all configured servers with Bearertoken authorization
of conditional string formatting
router.test.ts
Add comprehensive MCP server configuration testsworkspaces/lightspeed/plugins/lightspeed-backend/src/service/router.test.ts
structure
dirty-mayflies-walk.md
Changelog entry for multiple MCP serversworkspaces/lightspeed/.changeset/dirty-mayflies-walk.md
authentication
app-config.yaml
Document GitHub auth configuration for local devworkspaces/lightspeed/app-config.yaml
dangerouslyAllowSignInWithoutUserInCatalogGitHub auth option