mcp: have /api/mcp/servers read MCP_SERVERS from config manager to match server-side flow (remove stray comment)
Browse files
src/routes/api/mcp/servers/+server.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
import type { MCPServer } from "$lib/types/Tool";
|
| 2 |
-
import {
|
| 3 |
|
| 4 |
export async function GET() {
|
| 5 |
-
|
| 6 |
-
|
| 7 |
|
| 8 |
let servers: Array<{ name: string; url: string; headers?: Record<string, string> }> = [];
|
| 9 |
|
|
|
|
| 1 |
import type { MCPServer } from "$lib/types/Tool";
|
| 2 |
+
import { config } from "$lib/server/config";
|
| 3 |
|
| 4 |
export async function GET() {
|
| 5 |
+
// Parse MCP_SERVERS environment variable
|
| 6 |
+
const mcpServersEnv = config.MCP_SERVERS || "[]";
|
| 7 |
|
| 8 |
let servers: Array<{ name: string; url: string; headers?: Record<string, string> }> = [];
|
| 9 |
|