Skip to main content
Glama
test_api.spec.ts2.06 kB
/** * Tests for the GetOutpost MCP Server */ import request from 'supertest'; import { Express } from 'express'; import app from '../mcp_server'; describe('MCP Server API', () => { test('Health check endpoint', async () => { const response = await request(app).get('/health'); expect(response.status).toBe(200); expect(response.body).toEqual({ status: 'healthy' }); }); test('IV endpoint', async () => { const testData = { symbols: ['NIFTY'], daysToExpiry: 30, moneyness: 0, realizedVolatility: 'Parkinson', lookbackPeriod: '20' }; // Since we can't actually call the API without valid tokens, // we'll just test that the endpoint responds const response = await request(app).post('/iv').send(testData); // The endpoint should return 500 because tokens can't be loaded expect(response.status).toBeGreaterThanOrEqual(400); // Could be 401, 500, etc. }); test('VOL endpoint', async () => { const testData = { symbols: ['NIFTY', 'GOOGL', 'MSFT'] }; const response = await request(app).post('/vol').send(testData); // The endpoint should return >= 400 because tokens can't be loaded expect(response.status).toBeGreaterThanOrEqual(400); }); test('VRP endpoint', async () => { const testData = { symbols: ['NIFTY'], moneyness: 0, daysToExpiry: 30, realizedVolatility: 'c2c', lookbackPeriod: '20' }; const response = await request(app).post('/vrp').send(testData); // The endpoint should return >= 400 because tokens can't be loaded expect(response.status).toBeGreaterThanOrEqual(400); }); test('SKEW endpoint', async () => { const testData = { symbols: ['NIFTY'], moneyness: 0, daysToExpiry: 30, realizedVolatility: 'c2c', lookbackPeriod: '20' }; const response = await request(app).post('/skew').send(testData); // The endpoint should return >= 400 because tokens can't be loaded expect(response.status).toBeGreaterThanOrEqual(400); }); });

Latest Blog Posts

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/aoutpost2-rgb/getoutpost-mcp-server'

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