Skip to main content
Glama

Marketstack MCP Server

by matteoantoci
index.ts2.15 kB
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'; import { wrapToolHandler } from '../wrapToolHandler.js'; import type { MarketstackClient } from '../../marketstackClient.js'; import { listIndicesTool } from './listIndices.js'; import { getIndexInfoTool } from './getIndexInfo.js'; import { listBondsCountriesTool } from './listBondsCountries.js'; import { getBondInfoTool } from './getBondInfo.js'; import { listEtfTickersTool } from './listEtfTickers.js'; import { getEtfHoldingsTool } from './getEtfHoldings.js'; /** * Registers Financial Instruments tools with the MCP server. * @param server The McpServer instance. * @param client The Marketstack client instance. */ export const registerFinancialInstrumentsTools = (server: McpServer, client: MarketstackClient): void => { console.log('Registering Marketstack Financial Instruments tools...'); server.tool( listIndicesTool.name, listIndicesTool.description, listIndicesTool.inputSchemaShape, wrapToolHandler((input) => listIndicesTool.handler(input, client)) ); server.tool( getIndexInfoTool.name, getIndexInfoTool.description, getIndexInfoTool.inputSchemaShape, wrapToolHandler((input) => getIndexInfoTool.handler(input, client)) ); server.tool( listBondsCountriesTool.name, listBondsCountriesTool.description, listBondsCountriesTool.inputSchemaShape, wrapToolHandler((input) => listBondsCountriesTool.handler(input, client)) ); server.tool( getBondInfoTool.name, getBondInfoTool.description, getBondInfoTool.inputSchemaShape, wrapToolHandler((input) => getBondInfoTool.handler(input, client)) ); server.tool( listEtfTickersTool.name, listEtfTickersTool.description, listEtfTickersTool.inputSchemaShape, wrapToolHandler((input) => listEtfTickersTool.handler(input, client)) ); server.tool( getEtfHoldingsTool.name, getEtfHoldingsTool.description, getEtfHoldingsTool.inputSchemaShape, wrapToolHandler((input) => getEtfHoldingsTool.handler(input, client)) ); console.log('Finished registering Marketstack Financial Instruments 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