Skip to main content
Glama

Marketstack MCP Server

by matteoantoci
index.ts2.7 kB
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'; import { wrapToolHandler } from '../wrapToolHandler.js'; import type { MarketstackClient } from '../../marketstackClient.js'; import { getTickerDetailsTool } from './getTickerDetails.js'; import { listTickersTool } from './listTickers.js'; import { getTickerInfoTool } from './getTickerInfo.js'; import { listExchangesTool } from './listExchanges.js'; import { getExchangeDetailsTool } from './getExchangeDetails.js'; import { listExchangeTickersTool } from './listExchangeTickers.js'; import { listCurrenciesTool } from './listCurrencies.js'; import { listTimezonesTool } from './listTimezones.js'; /** * Registers Reference Data tools with the MCP server. * @param server The McpServer instance. * @param client The Marketstack client instance. */ export const registerReferenceDataTools = (server: McpServer, client: MarketstackClient): void => { console.log('Registering Marketstack Reference Data tools...'); server.tool( getTickerDetailsTool.name, getTickerDetailsTool.description, getTickerDetailsTool.inputSchemaShape, wrapToolHandler((input) => getTickerDetailsTool.handler(input, client)) ); server.tool( listTickersTool.name, listTickersTool.description, listTickersTool.inputSchemaShape, wrapToolHandler((input) => listTickersTool.handler(input, client)) ); server.tool( getTickerInfoTool.name, getTickerInfoTool.description, getTickerInfoTool.inputSchemaShape, wrapToolHandler((input) => getTickerInfoTool.handler(input, client)) ); server.tool( listExchangesTool.name, listExchangesTool.description, listExchangesTool.inputSchemaShape, wrapToolHandler((input) => listExchangesTool.handler(input, client)) ); server.tool( getExchangeDetailsTool.name, getExchangeDetailsTool.description, getExchangeDetailsTool.inputSchemaShape, wrapToolHandler((input) => getExchangeDetailsTool.handler(input, client)) ); server.tool( listExchangeTickersTool.name, listExchangeTickersTool.description, listExchangeTickersTool.inputSchemaShape, wrapToolHandler((input) => listExchangeTickersTool.handler(input, client)) ); server.tool( listCurrenciesTool.name, listCurrenciesTool.description, listCurrenciesTool.inputSchemaShape, wrapToolHandler((input) => listCurrenciesTool.handler(input, client)) ); server.tool( listTimezonesTool.name, listTimezonesTool.description, listTimezonesTool.inputSchemaShape, wrapToolHandler((input) => listTimezonesTool.handler(input, client)) ); console.log('Finished registering Marketstack Reference Data tools.'); };

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/matteoantoci/mcp-marketstack'

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