Skip to main content
Glama

Simple MCP Server

test-weather.js719 B
import { spawn } from 'child_process'; import { dirname } from 'path'; import { fileURLToPath } from 'url'; const __dirname = dirname(fileURLToPath(import.meta.url)); const server = spawn('node', ['build/weather-server.js'], { stdio: ['pipe', 'pipe', 'pipe'] }); const request = { jsonrpc: '2.0', id: '1', method: 'CallTool', params: { name: 'get_forecast', arguments: { latitude: 25.7617, longitude: -80.1918 } } }; server.stdout.on('data', (data) => { console.log('Response:', data.toString()); }); server.stderr.on('data', (data) => { console.error('Server log:', data.toString()); }); server.stdin.write(JSON.stringify(request) + '\n');

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/shaleen-wonder-ent/simple-mcp-server'

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