Skip to main content
Glama

Website Generator MCP Server

test-gemini.js848 B
import { GoogleGenerativeAI } from "@google/generative-ai"; import dotenv from "dotenv"; dotenv.config(); async function testGemini() { try { console.log('Testing Gemini API...'); const apiKey = process.env.GEMINI_API_KEY; if (!apiKey) { throw new Error("GEMINI_API_KEY not found"); } console.log('API Key exists:', apiKey.substring(0, 10) + '...'); const genAI = new GoogleGenerativeAI(apiKey); const model = genAI.getGenerativeModel({ model: "gemini-1.5-flash" }); console.log('Sending test request...'); const result = await model.generateContent("Say hello in HTML"); const response = await result.response; const text = response.text(); console.log('Success! Response:', text); } catch (error) { console.error('Error:', error); } } testGemini();

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/lasindu-themiya/mcpwebgenerator'

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