Skip to main content
Glama

Qdrant Retrieve MCP Server

main.ts1.67 kB
import type { AppState } from "@features/app-state/AppState"; import { getAppState } from "@features/app-state/getAppState"; import { initializeAppState } from "@features/app-state/initializeAppState"; import { createMcpServer } from "@features/mcp-server/createMcpServer"; import { setupMcpServerGracefulShutdown } from "@features/mcp-server/setupMcpServerGracefulShutdown"; import { setupMcpTransports } from "@features/mcp-server/setupMcpTransports"; import { registerTools } from "@features/mcp-tool-request-handler/registerTools"; import { setupRestServer } from "@features/rest-server/setupRestServer"; import { parseCliArgs } from "./internal/parseCliArgs"; import { tools } from "./internal/tools"; /** * Main entry point for the application * Initializes and configures the MCP server and related components */ export async function main() { const cliArgs = parseCliArgs(); // Read the API key from environment variables const qdrantApiKey = process.env.QDRANT_API_KEY; // Create the application state with CLI args, tools, and API key const initialState: AppState = { ...cliArgs, tools, mode: "mcpAct", // Default mode qdrantApiKey, // This will be undefined if env var is not set }; // Initialize the global application state initializeAppState(initialState); try { const server = createMcpServer(getAppState()); registerTools(server); await setupMcpTransports(server); setupMcpServerGracefulShutdown(server); const appState = getAppState(); if (appState.enableRestServer) { setupRestServer(); } } catch (error) { console.error("Fatal error:", error); process.exit(1); } }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/gergelyszerovay/mcp-server-qdrant-retrive'

If you have feedback or need assistance with the MCP directory API, please join our Discord server