Skip to main content
Glama

Marketstack MCP Server

by matteoantoci

マーケットスタック MCP サーバー

Model Context Protocol(MCP)サーバーは、Marketstackの様々なAPIエンドポイントをMCPツールとして公開し、終値、日中取引、分割、配当、ティッカー、取引所、通貨、タイムゾーン、債券、ETFデータなどの金融データへのアクセスを提供します。このサーバーは、MarketstackデータをMCP対応のエージェントやシステムに統合することを簡素化します。

前提条件

  • Node.js (v18以降を推奨)
  • npm (Node.js に付属)
  • マーケットスタックAPIキー
  • (オプション) MCP 互換クライアントまたはランナー (例: VSCode 拡張機能、CLI)

設定

  1. リポジトリをクローンするか、プロジェクト ディレクトリにいることを確認します。
  2. 依存関係をインストールします:
    npm install
  3. 構成:
    • https://marketstack.com/から Marketstack API キーを取得します。
    • MCPランナーの設定からMARKETSTACK_API_KEY環境変数を設定してください。これは、MCPクライアントとのシームレスな統合に推奨される方法です。MCPランナー経由で実行する場合は、この目的で.envファイルを使用することは避けてください。

構築と実行

  1. サーバーを構築します。
    npm run build
    これにより、コンパイルされた JavaScript コードを含むbuildディレクトリが作成されます。
  2. サーバーを実行します。
    npm run start
    または直接:
    node build/index.js
  3. MCPランナー経由: MCPクライアントをstdioトランスポートを使用してサーバーを実行するように設定します。MCP設定エントリの例( /path/to/mcp-marketstack実際のパスに調整し、 YOUR_API_KEY_HEREを実��のキーに置き換えます):
    "marketstack": { "transportType": "stdio", "command": "node", "args": [ "/path/to/mcp-marketstack/build/index.js" ], "env": { "MARKETSTACK_API_KEY": "YOUR_API_KEY_HERE" } // ... other optional settings ... }

利用可能なツール

サーバーは、Marketstack API エンドポイントを機能別に分類された個別の MCP ツールとして公開します。

  • 市場データ
  • 参照データ
  • 金融商品

各ツールの詳細な入力スキーマと説明は、イントロスペクションを介してサーバーに接続する MCP エージェントによって自動的に検出されます。

プロジェクト構造

このプロジェクトはモジュール構造に従っています。

. ├── src/ │ ├── index.ts # Server entry point │ ├── marketstackClient.ts # Centralized API client with caching │ ├── cacheConfig.ts # Cache TTL configurations │ └── tools/ │ ├── index.ts # Registers all tool categories │ ├── marketData/ # Market Data tools │ │ └── ... │ ├── referenceData/ # Reference Data tools │ │ └── ... │ ├── financialInstruments/ # Financial Instruments tools │ │ └── ... │ └── wrapToolHandler.ts # Wrapper for tool handlers ├── memory-bank/ # Project documentation │ └── ... ├── package.json # Project dependencies and scripts ├── tsconfig.json # TypeScript configuration ├── eslint.config.js # ESLint configuration ├── .prettierrc # Prettier configuration ├── LICENSE # Project license └── README.md # This file

キャッシング

サーバーは、ツールのレスポンス用にメモリ内のLRU(Least Recently Used)キャッシュを実装しています。これにより、Marketstack APIへの冗長な呼び出しが削減され、パフォーマンスが向上し、レート制限を遵守できます。

  • **メカニズム:**キャッシュには、ツール名と入力パラメータに基づいて応答が保存されます。
  • **設定可能なTTL:**各ツールには、キャッシュデータのTime To Live(TTL)が設定可能で、 src/cacheConfig.tsで定義されています。これにより、各Marketstackエンドポイントから提供されるデータの更新頻度に基づいて、異なるキャッシュ期間を設定できます。

ライセンス

このプロジェクトは、フリーソフトウェア財団が発行するGNU一般公衆利用許諾書(バージョン3、または(オプションで)それ以降のバージョン)に基づいてライセンスされています。詳細はLICENSEファイルをご覧ください。

貢献

貢献を歓迎します!標準的なフォークとプルリクエストのワークフローに従ってください。

サポート

問題や質問がある場合は、GitHub リポジトリで問題を開いてください。

Install Server
A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

さまざまな Marketstack API エンドポイントを MCP ツールとして公開し、EOD、日中取引、分割、配当、ティッカー、取引所、その他の金融情報を含む金融市場データへのアクセスを提供します。

  1. 前提条件
    1. 設定
      1. 構築と実行
        1. 利用可能なツール
          1. プロジェクト構造
            1. キャッシング
              1. ライセンス
                1. 貢献
                  1. サポート

                    Related MCP Servers

                    • A
                      security
                      A
                      license
                      A
                      quality
                      MCP server that provides AI assistants access to stock market data including financial statements, stock prices, and market news through a Model Context Protocol interface.
                      Last updated -
                      11
                      433
                      Python
                      MIT License
                      • Apple
                    • A
                      security
                      A
                      license
                      A
                      quality
                      A Model Context Protocol implementation for the CoinMarketCap API that provides standardized access to cryptocurrency market data, exchange information, and blockchain metrics.
                      Last updated -
                      26
                      225
                      28
                      JavaScript
                      MIT License
                      • Linux
                      • Apple
                    • A
                      security
                      A
                      license
                      A
                      quality
                      MCP service that provides real-time access to Binance cryptocurrency market data, allowing AI agents to fetch current prices, order books, candlestick charts, and trading statistics through natural language queries.
                      Last updated -
                      12
                      390
                      24
                      JavaScript
                      Apache 2.0
                    • A
                      security
                      F
                      license
                      A
                      quality
                      MCP server that exposes Alpaca Market Data & Broker API as tools, enabling access to financial data like stock bars, assets, market days, and news through the Message Control Protocol.
                      Last updated -
                      4
                      11
                      2
                      TypeScript

                    View all related MCP servers

                    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