- {/* ------------------------------------------------------------------ */}
- {/* Left sidebar */}
- {/* ------------------------------------------------------------------ */}
-
-
- {/* ------------------------------------------------------------------ */}
- {/* Main content area */}
- {/* ------------------------------------------------------------------ */}
-
- {/* Top bar */}
-
-
-
- L
-
-
-
- LiteLLM MCP Demo
-
-
- External chat UI
-
-
-
-
-
- BYOK OAuth Flow
-
-
- {truncatedKey}
-
-
-
-
- {/* Chat messages */}
-
- {/* Explainer card */}
-
-
- How this demo works
-
-
- {[
- "This page calls GET /v1/mcp/server to list available MCP servers.",
- "BYOK servers require you to supply your own API key — they show a lock icon.",
- 'Click "Connect" to start the OAuth 2.1 PKCE authorization flow.',
- "A popup opens the LiteLLM authorization page where you enter your key.",
- "LiteLLM redirects back with an authorization code.",
- "This page exchanges the code for an access token (PKCE verified).",
- "Your key is now securely stored — no plain-text transmission to this page.",
- ].map((step, i) => (
-
-
- {i + 1}
-
- {step}
-
- ))}
-
-
-
- {/* Chat messages */}
-
- {chatMessages.map((msg, idx) => (
-
- ))}
-
-
-
- {/* Chat input (UI only — no LLM call in this demo) */}
-
-
-
- {
- if (e.key === "Enter") {
- const input = e.currentTarget;
- const value = input.value.trim();
- if (!value) return;
- setChatMessages((prev) => [
- ...prev,
- { role: "user", content: value },
- {
- role: "assistant",
- content:
- "This is a demo UI. Connect a BYOK server from the sidebar to enable real MCP tool calls.",
- },
- ]);
- input.value = "";
- }
- }}
- />
-
-
-
- Demo only — chat responses are simulated. MCP tool calls require a connected server.
-