Skip to main content
Glama

Financial Modeling Prep MCP Server

Apache 2.0
17
59
  • Linux
  • Apple
SessionConfigSchema.test.ts1.15 kB
import { describe, it, expect } from 'vitest'; import { SessionConfigSchema } from './SessionConfigSchema.js'; import { QuotesClient } from '../../api/quotes/QuotesClient.js'; import type { FMPContext } from '../../types/index.js'; describe('SessionConfigSchema', () => { it('accepts configuration without FMP_ACCESS_TOKEN', () => { const parsed = SessionConfigSchema.parse({}); expect(parsed).toBeDefined(); expect(parsed.FMP_ACCESS_TOKEN).toBeUndefined(); }); it('accepts configuration with optional fields', () => { const parsed = SessionConfigSchema.parse({ FMP_TOOL_SETS: 'search,quotes', DYNAMIC_TOOL_DISCOVERY: 'true', }); expect(parsed.FMP_TOOL_SETS).toBe('search,quotes'); expect(parsed.DYNAMIC_TOOL_DISCOVERY).toBe('true'); }); }); describe('FMP token requirement at call time', () => { it('throws when calling a client operation without a token', async () => { const client = new QuotesClient(); const context: FMPContext = { config: {} }; await expect( client.getQuote({ symbol: 'AAPL' }, { context }) ).rejects.toThrow(/FMP_ACCESS_TOKEN is required/); }); });

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/imbenrabi/Financial-Modeling-Prep-MCP-Server'

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