Skip to main content
Glama

Gemini Context MCP Server

by ogoldberg
test-direct.js1.37 kB
// Test discover_capabilities directly by importing the server code import { loadManifest } from './dist/mcp-server.js'; async function testDiscoverCapabilities() { console.log('Testing discover_capabilities function directly...'); try { // Call the loadManifest function directly const manifest = loadManifest(); const apiKey = 'YOUR_GEMINI_API_KEY'; console.log('Initializing Gemini API...'); const genAI = new GoogleGenerativeAI(apiKey); console.log('Creating model...'); const model = genAI.getGenerativeModel({ model: "gemini-2.0-flash", generationConfig: { temperature: 0.7, topK: 40, topP: 0.9, maxOutputTokens: 8192, } }); console.log('Sending message...'); const result = await model.generateContent("What is 2+2?"); if (manifest) { console.log('Manifest loaded successfully!'); console.log('Manifest name:', manifest.name); console.log('Number of tools:', manifest.tools ? manifest.tools.length : 0); } else { console.error('Failed to load manifest.'); } } catch (error) { console.error('Test error:', error); } } // Run the test testDiscoverCapabilities(); main();

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/ogoldberg/gemini-context-mcp-server'

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